Skip to content

Commit a993ed2

Browse files
committed
Document that assertions and exceptions take precedence over assumptions
Resolves #4084.
1 parent 906a739 commit a993ed2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

junit-jupiter-api/src/main/java/org/junit/jupiter/api/Assumptions.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@
2727
*
2828
* <p>In direct contrast to failed {@linkplain Assertions assertions},
2929
* failed assumptions do not result in a test <em>failure</em>; rather,
30-
* a failed assumption results in a test being <em>aborted</em>.
30+
* a failed assumption results in a test being <em>aborted</em>. However,
31+
* failed assertions and other exceptions thrown by tests take precedence over
32+
* failed assumptions when both are thrown during the execution of a test
33+
* (for example, by different lifecycle methods), regardless of the order they
34+
* are thrown in. In such cases, the test will be reported as <em>failed</em>
35+
* rather than <em>aborted</em>.
3136
*
3237
* <p>Assumptions are typically used whenever it does not make sense to
3338
* continue execution of a given test method &mdash; for example, if the

0 commit comments

Comments
 (0)