Skip to content

Commit aa02545

Browse files
committed
Improve tests with AssumptionViolatedExceptions
The expectations that the test are failing and not being skipped is now explicit.
1 parent 926b1d4 commit aa02545

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/java/org/junit/rules/ErrorCollectorTest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public static Object[][] testsWithEventMatcher() {
3636
hasNumberOfFailures(2)},
3737
{
3838
AddInternalAssumptionViolatedException.class,
39-
hasSingleFailure()},
39+
allOf(hasSingleFailure(), hasNoAssumptionFailure())},
4040
{
4141
CheckMatcherThatDoesNotFailWithoutProvidedReason.class,
4242
everyTestRunSuccessful()},
@@ -65,10 +65,10 @@ public static Object[][] testsWithEventMatcher() {
6565
hasNumberOfFailures(2)},
6666
{
6767
CheckCallableThatThrowsInternalAssumptionViolatedException.class,
68-
hasSingleFailure()},
68+
allOf(hasSingleFailure(), hasNoAssumptionFailure())},
6969
{
7070
CheckCallableWithFailingAssumption.class,
71-
hasSingleFailure()},
71+
allOf(hasSingleFailure(), hasNoAssumptionFailure())},
7272
{
7373
CheckCallableThatDoesNotThrowAnException.class,
7474
everyTestRunSuccessful()},

0 commit comments

Comments
 (0)