We need to have Java code that violates the architecture rules and shows our ArchUnit test(s) in action.
For implementing this story, we should first think about the design as there are several options:
- create one project with a sample app and ArchUnit test as JUnit test for it including github CI action that is failing and red giving the summary of all architecture violations showing that the ArchUnit test is properly working by example
- create Java files for each ArchUnit test/rule and setup some test infrastructure that verifies that exactly expected issues are found in according Java files. See the sonar-devon4j-plugin for example that used such approach:
We need to have Java code that violates the architecture rules and shows our ArchUnit test(s) in action.
For implementing this story, we should first think about the design as there are several options: