Skip to content

Commit 510e906

Browse files
stefanbirknermarcphilipp
authored andcommitted
Add sub headlines to class Javadoc
Structure the Javadoc.
1 parent 610155b commit 510e906

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/main/java/org/junit/Test.java

+9-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,12 @@
2323
* }
2424
* </pre>
2525
* <p>
26-
* The <code>Test</code> annotation supports two optional parameters.
27-
* The first, <code>expected</code>, declares that a test method should throw
26+
* The <code>Test</code> annotation supports two optional parameters for
27+
* exception testing and for limiting test execution time.
28+
*
29+
* <h3>Exception Testing</h3>
30+
* <p>
31+
* The parameter <code>expected</code> declares that a test method should throw
2832
* an exception. If it doesn't throw an exception or if it throws a different exception
2933
* than the one declared, the test fails. For example, the following test succeeds:
3034
* <pre>
@@ -36,8 +40,10 @@
3640
* {@link org.junit.rules.ExpectedException ExpectedException} rule can be used. Further
3741
* information about exception testing can be found at the
3842
* <a href="https://github.com/junit-team/junit4/wiki/Exception-testing">JUnit Wiki</a>.
43+
*
44+
* <h3>Timeout</h3>
3945
* <p>
40-
* The second optional parameter, <code>timeout</code>, causes a test to fail if it takes
46+
* The parameter <code>timeout</code> causes a test to fail if it takes
4147
* longer than a specified amount of clock time (measured in milliseconds). The following test fails:
4248
* <pre>
4349
* &#064;Test(<b>timeout=100</b>) public void infinity() {

0 commit comments

Comments
 (0)