diff --git a/Chapter-1-initial-architecture/Src/Fitnet.ArchitectureTests/Conventions/EndpointsConventionsTests.cs b/Chapter-1-initial-architecture/Src/Fitnet.ArchitectureTests/Conventions/EndpointsConventionsTests.cs new file mode 100644 index 00000000..3735f8d4 --- /dev/null +++ b/Chapter-1-initial-architecture/Src/Fitnet.ArchitectureTests/Conventions/EndpointsConventionsTests.cs @@ -0,0 +1,26 @@ +namespace EvolutionaryArchitecture.Fitnet.ArchitectureTests.Conventions; + +using Common; + +public sealed class EndpointsConventionsTests +{ + private const string Endpoint = "Endpoint"; + + [Fact] + internal void ShouldBeStatic() + { + // Arrange + var rules = Solution.Types.That() + .AreClasses() + .And() + .HaveNameEndingWith(Endpoint) + .Should() + .BeStatic(); + + // Act + var result = rules.GetResult(); + + // Assert + result.IsSuccessful.Should().BeTrue(); + } +} diff --git a/Chapter-1-initial-architecture/Src/Fitnet.ArchitectureTests/Conventions/InterfacesConventionsTests.cs b/Chapter-1-initial-architecture/Src/Fitnet.ArchitectureTests/Conventions/InterfacesConventionsTests.cs new file mode 100644 index 00000000..37b1690e --- /dev/null +++ b/Chapter-1-initial-architecture/Src/Fitnet.ArchitectureTests/Conventions/InterfacesConventionsTests.cs @@ -0,0 +1,22 @@ +namespace EvolutionaryArchitecture.Fitnet.ArchitectureTests.Conventions; + +using Common; + +public sealed class InterfacesConventionsTests +{ + [Fact] + internal void ShouldStartWithI() + { + // Arrange + var rules = Solution.Types.That() + .AreInterfaces() + .Should() + .HaveNameStartingWith("I"); + + // Act + var result = rules.GetResult(); + + // Assert + result.IsSuccessful.Should().BeTrue(); + } +}