BenMorris / NetArchTest

A fluent API for .Net that can enforce architectural rules in unit tests.
MIT License
1.39k stars 82 forks source link

How do check class should be with internal modifier? #121

Closed arjundate closed 1 year ago

BenMorris commented 1 year ago

AreNotPublic() is your friend here, i.e. this code snippet from the unit tests

            var result = Types
                .InAssembly(Assembly.GetAssembly(typeof(ClassA1)))
                .That()
                .ResideInNamespace("NetArchTest.TestStructure.Scope")
                .And()
                .AreNotPublic().GetTypes();

Returns the InternalClass type.