From 75fbee2c2faf1e2b70d9622cf616e8f38aa3ecfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20J=C3=B8rgen=20Skogstad?= Date: Fri, 20 Sep 2024 20:43:27 +0200 Subject: [PATCH] chore: Add assertion to infrastructure internal classes test (#1164) ## Description Adding an assertion on FailingTypes array, if there are failures, the class names will be printed in the fail output ## Summary by CodeRabbit - **Documentation** - Clarified comments in the architecture test for improved readability. - **Tests** - Added a new line before assertions in the test method to enhance structure. --- .../InfrastructureArchitectureTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Digdir.Domain.Dialogporten.Architecture.Tests/InfrastructureArchitectureTests.cs b/tests/Digdir.Domain.Dialogporten.Architecture.Tests/InfrastructureArchitectureTests.cs index 4a6b0e824..6b06c5865 100644 --- a/tests/Digdir.Domain.Dialogporten.Architecture.Tests/InfrastructureArchitectureTests.cs +++ b/tests/Digdir.Domain.Dialogporten.Architecture.Tests/InfrastructureArchitectureTests.cs @@ -16,7 +16,7 @@ public void All_Classes_In_Infrastructure_Should_Be_Internal() nameof(InfrastructureAssemblyMarker), nameof(InfrastructureExtensions), - // These classes are currently public, but should be internal, moved to another assembly, or deleted + // These classes are currently public but should be internal, moved to another assembly, or deleted nameof(OutboxScheduler), nameof(IUpstreamServiceError) }; @@ -29,6 +29,8 @@ public void All_Classes_In_Infrastructure_Should_Be_Internal() .And().DoNotHaveName(publicByDesignClasses) .Should().NotBePublic() .GetResult(); + + publicClasses.FailingTypes.Should().BeNullOrEmpty(); publicClasses.IsSuccessful.Should().BeTrue(); } }