diff --git a/src/main/java/org/junit/Test.java b/src/main/java/org/junit/Test.java index a003b2e6794b..1d5d3e1dd263 100644 --- a/src/main/java/org/junit/Test.java +++ b/src/main/java/org/junit/Test.java @@ -23,8 +23,12 @@ * } * *

- * The Test annotation supports two optional parameters. - * The first, expected, declares that a test method should throw + * The Test annotation supports two optional parameters for + * exception testing and for limiting test execution time. + * + *

Exception Testing

+ *

+ * The parameter expected declares that a test method should throw * an exception. If it doesn't throw an exception or if it throws a different exception * than the one declared, the test fails. For example, the following test succeeds: *

@@ -36,8 +40,10 @@
  * {@link org.junit.rules.ExpectedException ExpectedException} rule can be used. Further
  * information about exception testing can be found at the
  * JUnit Wiki.
+ *
+ * 

Timeout

*

- * The second optional parameter, timeout, causes a test to fail if it takes + * The parameter timeout causes a test to fail if it takes * longer than a specified amount of clock time (measured in milliseconds). The following test fails: *

  *    @Test(timeout=100) public void infinity() {