protected void pause(boolean wait) { if (!wait) return; fPrinter.printWaitPrompt(); try { System.in.read(); } catch (Exception e) { } }
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; }
// add-two-numbers request public static void processTheAddCommand(int x, int y) { int result = Calculator.add(x, y); ResultPrinter.printResult(result); }