Skip to content

Commit 154ff89

Browse files
committed
Polish @BeforeAll Javadoc regarding execution order
Issue: #1620
1 parent f510e82 commit 154ff89

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

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

+9-7
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,18 @@
5757
* deterministic but intentionally non-obvious.
5858
*
5959
* <p>In addition, {@code @BeforeAll} methods are in no way linked to
60-
* {@code @AfterAll} methods, i.e. there are no guarantees with regard to their
61-
* wrapping behavior. For example, given two {@code @BeforeAll} methods
62-
* {@code createA()} and {@code createB()} as well as two {@code @AfterAll}
60+
* {@code @AfterAll} methods. Consequently, there are no guarantees with regard
61+
* to their <em>wrapping</em> behavior. For example, given two {@code @BeforeAll}
62+
* methods {@code createA()} and {@code createB()} as well as two {@code @AfterAll}
6363
* methods {@code destroyA()} and {@code destroyB()}, the order in which the
6464
* {@code @BeforeAll} methods are executed (e.g. {@code createA()} before
6565
* {@code createB()}) does not imply any order for the seemingly corresponding
66-
* {@code @AfterAll} methods: (e.g. {@code destroyA()} might be called before
67-
* <em>or</em> after {@code destroyB()}). Thus, the JUnit Team recommends that
68-
* developers declare at most one {@code @BeforeAll}/{@code @AfterAll} method
69-
* per test class/interface unless there are no dependencies between them.
66+
* {@code @AfterAll} methods. In other words, {@code destroyA()} might be called
67+
* before <em>or</em> after {@code destroyB()}. The JUnit Team therefore recommends
68+
* that developers declare at most one {@code @BeforeAll} method and at most one
69+
* {@code @AfterAll} method per test class or test interface unless there are no
70+
* dependencies between the {@code @BeforeAll} methods or between the
71+
* {@code @AfterAll} methods.
7072
*
7173
* <h3>Composition</h3>
7274
*

0 commit comments

Comments
 (0)