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
failOnEmptyShould is a nice new feature, thanks for that.
Unfortunately we have to switch it off because we have a Maven test-jar that contains multiple AU tests that are run in each module of out multi-module Maven project and in some modules not all tests catch respective classes (because there none with such criteria).
It would be nice if there was e.g. *Should.failOnEmpty(boolean), to be able to override this case by case.
The text was updated successfully, but these errors were encountered:
Thanks for raising the issue 👍 I agree that we need some way to make this configurable on a per rule basis (compare #806). The question is just where to put it exactly 🤔
I guess it could go in the beginning ArchRuleDefinition.failOnEmptyShould(false).classes().that()... or in the end classes()...should()...allowEmptyShould(false). In any case this probably means we have to add it individually to various places 😞 Would be nice if this could easily be done in a generic way in one central place (i.e. add a new rule API and it will automatically support it), but I don't see a way for that. Maybe for the standard rules APIs (e.g. classes(), methods(), ...) we can introduce a common parent interface, because in the end containNumberOfElements(..) also is a rules method that makes sense no matter what type of element it is. We could introduce a parent ClassesShould extend ObjectsShould that different Should types could extend to inherit the parts that make sense for all rule APIs. One question is, if we also need to add this to the layeredArchitecture()/onionArchitecture() and slices() APIs 🤔
What do you think @oberprah? Do you want to tackle this as a follow-up? 😉
failOnEmptyShould
is a nice new feature, thanks for that.Unfortunately we have to switch it off because we have a Maven
test-jar
that contains multiple AU tests that are run in each module of out multi-module Maven project and in some modules not all tests catch respective classes (because there none with such criteria).It would be nice if there was e.g.
*Should.failOnEmpty(boolean)
, to be able to override this case by case.The text was updated successfully, but these errors were encountered: