Code example for TestResult

Methods: errorCounterrorsfailureCountfailureswasSuccessful

            displayHeader( writer, testClassName, getFormatted( testResult.runCount(), "test" ),
                                   elapsedTimeString, testResult.wasSuccessful() ? "OK" : "Problems Occurred" );
        protected void displayResults( PrintWriter writer, TestResult testResult ) {
            if (!testResult.wasSuccessful()) {
                displayProblems( writer, "failure", testResult.failureCount(), testResult.failures() );
                displayProblems( writer, "error", testResult.errorCount(), testResult.errors() );
        protected abstract void displayHeader( PrintWriter writer, String testClassName, String testCountText, String elapsedTimeString, String resultString );
        protected abstract void displayProblemTitle( PrintWriter writer, String title );
        protected abstract void displayProblemDetailHeader( PrintWriter writer, int i, String testName );
Connect your IDE to all the code out there  Get Codota for Java