Example #1
0
 protected void pause(boolean wait) {
   if (!wait) return;
   fPrinter.printWaitPrompt();
   try {
     System.in.read();
   } catch (Exception e) {
   }
 }
Example #2
0
  public TestResult doRun(Test suite, boolean wait) {
    TestResult result = createTestResult();
    result.addListener(fPrinter);
    long startTime = System.currentTimeMillis();
    suite.run(result);
    long endTime = System.currentTimeMillis();
    long runTime = endTime - startTime;
    fPrinter.print(result, runTime);

    pause(wait);
    return result;
  }
Example #3
0
 // add-two-numbers request
 public static void processTheAddCommand(int x, int y) {
   int result = Calculator.add(x, y);
   ResultPrinter.printResult(result);
 }