Skip to content

Commit

Permalink
chore: Add assertion to infrastructure internal classes test (#1164)
Browse files Browse the repository at this point in the history
<!--- Provide a general summary of your changes in the Title above -->

## Description

Adding an assertion on FailingTypes array, if there are failures, the
class names will be printed in the fail output



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## 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.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
oskogstad authored Sep 20, 2024
1 parent c2559d8 commit 75fbee2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
};
Expand All @@ -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();
}
}

0 comments on commit 75fbee2

Please sign in to comment.