From b1cd909d1b56b4363a4dc358a4b47bdae50e9b60 Mon Sep 17 00:00:00 2001 From: Mersho Date: Thu, 17 Aug 2023 15:09:28 +0330 Subject: [PATCH] FileConventions: add failing test --- .../Foo/DummyFileUnderFooWithWrongNamespace2.fs | 1 + src/FileConventions.Test/FileConventions.Test.fs | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 src/FileConventions.Test/DummyFiles/src/Foo/DummyFileUnderFooWithWrongNamespace2.fs diff --git a/src/FileConventions.Test/DummyFiles/src/Foo/DummyFileUnderFooWithWrongNamespace2.fs b/src/FileConventions.Test/DummyFiles/src/Foo/DummyFileUnderFooWithWrongNamespace2.fs new file mode 100644 index 000000000..d631c774a --- /dev/null +++ b/src/FileConventions.Test/DummyFiles/src/Foo/DummyFileUnderFooWithWrongNamespace2.fs @@ -0,0 +1 @@ +namespace FooBuzz diff --git a/src/FileConventions.Test/FileConventions.Test.fs b/src/FileConventions.Test/FileConventions.Test.fs index 22dbc43e2..21ad18b12 100644 --- a/src/FileConventions.Test/FileConventions.Test.fs +++ b/src/FileConventions.Test/FileConventions.Test.fs @@ -733,3 +733,18 @@ let NamespaceConvention6() = )) Assert.That(NotFollowingNamespaceConvention fileInfo, Is.EqualTo false) + + +[] +let NamespaceConvention7() = + let fileInfo = + (FileInfo( + Path.Combine( + dummyFilesDirectory.FullName, + "src", + "Foo", + "DummyFileUnderFooWithWrongNamespace2.fs" + ) + )) + + Assert.That(NotFollowingNamespaceConvention fileInfo, Is.EqualTo true)