-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Labels
Milestone
Description
Problem
Declaring a Matcher
using Matchers.{allOf,anyOf}(Matcher...)
containing just a single Matcher
, is redundant.
Description of the proposed new feature
- Support a stylistic preference.
- Avoid a common gotcha, or potential problem.
We can rewrite
allOf(annotations(AT_LEAST_ONE, isType("org.junit.jupiter.params.provider.MethodSource")));
anyOf(annotations(AT_LEAST_ONE, isType("org.junit.jupiter.params.provider.MethodSource")));
to:
annotations(AT_LEAST_ONE, isType("org.junit.jupiter.params.provider.MethodSource"));
annotations(AT_LEAST_ONE, isType("org.junit.jupiter.params.provider.MethodSource"));
Considerations
This should support the method overloads Matchers.{allOf,anyOf}(Iterable<? extends Matcher>)
.
Participation
This is a nice opportunity to get your hands dirty with BugChecker
s 🚀