ContextMapper / context-mapper-archunit-extension

Validate your code against the CML model with ArchUnit.
https://contextmapper.org/
Apache License 2.0
5 stars 0 forks source link

Make compatible with com.tngtech.archunit:archunit-junit5 1.x.x #8

Closed marcomima closed 1 year ago

marcomima commented 1 year ago

Currently this library is not working with archunit 1.x.x, due to a breaking change in archunit:

Used version of archunit: 1.0.1

Result when running org.contextmapper.archunitAbstractTacticArchUnitTest#entitiesShouldBeModeledInCML: `java.lang.IncompatibleClassChangeError: Found interface com.tngtech.archunit.lang.ConditionEvents, but class was expected

at org.contextmapper.archunit.conditions.ModeledAsEntityInContext.check(ModeledAsEntityInContext.java:40)
at org.contextmapper.archunit.conditions.ModeledAsEntityInContext.check(ModeledAsEntityInContext.java:28)
at com.tngtech.archunit.lang.ArchRule$Factory$SimpleArchRule.evaluate(ArchRule.java:186)
at com.tngtech.archunit.lang.ArchRule$Assertions.check(ArchRule.java:84)
at com.tngtech.archunit.lang.ArchRule$Factory$SimpleArchRule.check(ArchRule.java:165)
at com.tngtech.archunit.lang.syntax.ObjectsShouldInternal.check(ObjectsShouldInternal.java:81)
at org.contextmapper.archunit.AbstractTacticArchUnitTest.entitiesShouldBeModeledInCML(AbstractTacticArchUnitTest.java:86)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
`
stefan-ka commented 1 year ago

Thanks for reporting @marcomima! And sorry that it took so long... I just released version 1.2.0 of the extension that is now compatible with ArchUnit 1.x.x.