-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration test for Verifier-rules using ErrorCollector example …
…from JUnit 4 This test would fail correctly if commented in so serves as documentation only. #433
- Loading branch information
1 parent
aeb2045
commit 3169cc9
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
.../junit/jupiter/engine/vintage/rulesupport/VerifierSupportForErrorCollectorFieldTests.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright 2015-2016 the original author or authors. | ||
* | ||
* All rights reserved. This program and the accompanying materials are | ||
* made available under the terms of the Eclipse Public License v1.0 which | ||
* accompanies this distribution and is available at | ||
* | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
|
||
package org.junit.jupiter.engine.vintage.rulesupport; | ||
|
||
import org.junit.Rule; | ||
import org.junit.jupiter.api.extension.ExtendWith; | ||
import org.junit.rules.ErrorCollector; | ||
|
||
@ExtendWith(VerifierSupport.class) | ||
public class VerifierSupportForErrorCollectorFieldTests { | ||
|
||
@Rule | ||
public ErrorCollector collector = new ErrorCollector(); | ||
|
||
// TODO: this test does expose the correct behavior | ||
// - is there a way to formalize this in junit 5 without failing the test? | ||
// the expected org.junit.internal.runners.model.MultipleFailureException is only thrown | ||
// after the test method itself... | ||
// @Test | ||
void addingTwoThrowablesToErrorCollectorFailsLate() { | ||
collector.addError(new Throwable("first thing went wrong")); | ||
collector.addError(new Throwable("second thing went wrong")); | ||
} | ||
|
||
} |