Class JCRTestResult


  • public class JCRTestResult
    extends junit.framework.TestResult
    Extends the standard JUnit TestResult class. This class ignores test errors that originated in throwing a NotExecutableException.
    • Constructor Detail

      • JCRTestResult

        public JCRTestResult​(junit.framework.TestResult orig,
                             LogPrintWriter log)
        Creates a new JCRTestResult that delegates to orig.
        Parameters:
        orig - the original TestResult this result wraps.
        log - the logger
    • Method Detail

      • run

        protected void run​(junit.framework.TestCase test)
        Overrides:
        run in class junit.framework.TestResult
      • addError

        public void addError​(junit.framework.Test test,
                             Throwable throwable)
        Only add an error if throwable is not of type NotExecutableException and the test case is not a known issue.
        Overrides:
        addError in class junit.framework.TestResult
        Parameters:
        test - the test.
        throwable - the exception thrown by the test.
      • addFailure

        public void addFailure​(junit.framework.Test test,
                               junit.framework.AssertionFailedError assertionFailedError)
        Only adds a failure if test is not a known issue.
        Overrides:
        addFailure in class junit.framework.TestResult
        Parameters:
        test - the test case that failed.
        assertionFailedError - the assertion error.
      • addListener

        public void addListener​(junit.framework.TestListener testListener)
        Overrides:
        addListener in class junit.framework.TestResult
      • removeListener

        public void removeListener​(junit.framework.TestListener testListener)
        Overrides:
        removeListener in class junit.framework.TestResult
      • endTest

        public void endTest​(junit.framework.Test test)
        Overrides:
        endTest in class junit.framework.TestResult
      • errorCount

        public int errorCount()
        Overrides:
        errorCount in class junit.framework.TestResult
      • errors

        public Enumeration<junit.framework.TestFailure> errors()
        Overrides:
        errors in class junit.framework.TestResult
      • failureCount

        public int failureCount()
        Overrides:
        failureCount in class junit.framework.TestResult
      • failures

        public Enumeration<junit.framework.TestFailure> failures()
        Overrides:
        failures in class junit.framework.TestResult
      • runCount

        public int runCount()
        Overrides:
        runCount in class junit.framework.TestResult
      • shouldStop

        public boolean shouldStop()
        Overrides:
        shouldStop in class junit.framework.TestResult
      • startTest

        public void startTest​(junit.framework.Test test)
        Overrides:
        startTest in class junit.framework.TestResult
      • stop

        public void stop()
        Overrides:
        stop in class junit.framework.TestResult
      • wasSuccessful

        public boolean wasSuccessful()
        Overrides:
        wasSuccessful in class junit.framework.TestResult