Class EntityVersionParityArchTest

java.lang.Object
com.aim2be.platform.archunit.EntityVersionParityArchTest

public class EntityVersionParityArchTest extends Object
Sample ArchUnit test class that consumers extend or copy.

Service-side usage pattern: replace the packages argument on AnalyzeClasses with the consuming service's root package (e.g. "com.aim2be.calendar"). The test runs as part of the consumer's standard mvn test cycle; failure means an entity violated the @Version parity rule.

v1.0 scaffold: this class is shipped in src/main/java (not src/test/java) so downstream services can @Import or subclass it. The real self-test that exercises BOTH a positive fixture (must pass) and a negative fixture (must fail) lands in src/test/java via PR-PLATFORM-5.

  • Field Details

    • entitiesMustCarryVersion

      public static final com.tngtech.archunit.lang.ArchRule entitiesMustCarryVersion
      The shared rule. Re-exported as a static final field so ArchUnit's JUnit5 runner picks it up via ArchTest.
  • Constructor Details

    • EntityVersionParityArchTest

      public EntityVersionParityArchTest()