Closed danibs closed 4 months ago
it seems that the enum fields have a special flag, whereas the compiler-generated field $VALUES
is marked as synthetic.
To only select the actual enum fields, you can therefore extend your that()
clause with
.and().haveModifier(JavaModifier.ENUM)
or
.and().doNotHaveModifier(JavaModifier.SYNTHETIC)
Perfect @hankem , you got the problem and your suggestion works!
Thanks so much!
Hi! I have an Enum like:
I want to find that
ANOTHER_VALUE
doesn't have@ErrorDescription
. I'm trying with:but ArchUnit said:
I tryied with version 1.2.1 and the last one 1.3.0.
Any suggestion? Thanks!