Пример #1
0
 /**
  * Called when the entire test case finished, but at least one unit did not pass successfully.
  * Default behavior is printing {@link #exitMessage()} to stdout followed by forceful termination
  * of the program via {@link System#exit(int)} with an exit code of 4.
  */
 protected void failed() {
   System.out.println(exitMessage());
   System.exit(4);
 }
Пример #2
0
 /**
  * Called when the entire test case is aborted (i.e. a unit throws an unexpected exception or
  * AssertionFatal). Default behavior is printing {@link #exitMessage()} to stdout followed by
  * forceful termination of the program via {@link System#exit(int)} with an exit code of 5.
  *
  * <p>Note that the entire test case is <b>not</b> considered aborted when a single unit of the
  * case fails or or aborted, and as such this method will not be called in that situation ({@link
  * #failed()} will be).
  */
 protected void aborted() {
   System.out.println(exitMessage());
   System.exit(5);
 }
Пример #3
0
 /**
  * Called when the entire test case finished with all units passing successfully. Default behavior
  * is printing {@link #exitMessage()} to stdout followed by forceful termination of the program
  * via {@link System#exit(int)} with an exit code of 0.
  */
 protected void succeeded() {
   System.out.println(exitMessage());
   System.exit(0);
 }