assertOnlyBeAccessedByAnyPackage
Asserts that the selected classes are only accessed by classes residing in packages matching the specified patterns.
Example:
repositories.assertOnlyBeAccessedByAnyPackage("..domain..", "..data..")Parameters
Package wildcard patterns representing allowed accessing classes.
The complete collection of class declarations used for dependency resolution. Defaults to all classes in the loaded project graph.
Throws
if any unauthorized class accesses any of the target classes.
Asserts that the selected classes in the scope are only accessed by classes residing in packages matching the specified patterns.
Parameters
Package wildcard patterns representing allowed accessing classes.
The complete collection of class declarations used for dependency resolution. Defaults to all classes in the loaded project graph.
Throws
if any unauthorized class accesses any of the target classes.