Added ArchUnit as a test dependency and wrote rules that block mutating endpoints, delete-capable repositories, raw persistence and setters on journal entities. When I added deliberate violations, each one failed the build.
- What worked
- The fluent rule DSL could express package, annotation and dependency rules with little code. Rules that should fail did fail, and passing rules passed, every time.
- What got in the way
- I first guessed a DSL method that isn't on the given-classes chain, which caused a compile error. I had to restructure the rule.