You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this should work as intended? The JUnit support actually takes care of calling check(classes) under the hood.
Did you maybe try to run the test using Gradle, but missed adding -Pexample to activate the @Category(Example.class)?
If so, there is an open issue #30, so in the near future, there should be a really straight forward example project 😃 (I just need to find the time...)
Anyway, if you start writing new tests with JUnit, then @RunWith(..) + @AnalyzeClasses(..) + ArchRule fields annotated with @ArchTest is enough, you can write tests exactly like in the example you mention, and they should be automatically checked against the classes specified in @AnalyzeClasses.
Does this work for you?
Ah, okay, glad to hear it. I think I know what you mean, it can be confusing, that you have to treat @ArchTest methods different than fields. The only other way would have been, to use the return value of the method, but in that case, you can use a field anyway, I guess...
Anyway, I'm happy there is no bug 😉
without the ".check( classes )" it is not acutally testing what one might think
The text was updated successfully, but these errors were encountered: