Closed electronickai closed 4 years ago
You should be able to use the ResideInNamespaceContaining
method, Kai.
For your examples, try something like:
types.Should().ResideInNamespaceContaining("Persistence")
Or maybe even:
types.Should().ResideInNamespaceEndingWith("Persistence")
Check out the ResideInNamespaceMatching
method too for more complex regular expression matching.
Hi, in ArchUnit you can refer to packages by using a part of the name
..persistence..
. In NetArchTest it seems that you have always to provide the complete name of the namespace.How would you refer to classes in persistence namespaces that are distrubuted in different functional areas like
MyApp.User.Persistence
andMyApp.Booking.Persistence
? (e.g. to prevent any persistence classes from accessing any business service class)