Class TextListener

    • Field Detail

      • writer

        private final java.io.PrintStream writer
    • Constructor Detail

      • TextListener

        public TextListener​(JUnitSystem system)
      • TextListener

        public TextListener​(java.io.PrintStream writer)
    • Method Detail

      • testRunFinished

        public void testRunFinished​(Result result)
        Description copied from class: RunListener
        Called when all tests have finished. This may be called on an arbitrary thread.
        Overrides:
        testRunFinished in class RunListener
        Parameters:
        result - the summary of the test run, including all the tests that failed
      • testStarted

        public void testStarted​(Description description)
        Description copied from class: RunListener
        Called when an atomic test is about to be started.
        Overrides:
        testStarted in class RunListener
        Parameters:
        description - the description of the test that is about to be run (generally a class and method name)
      • testIgnored

        public void testIgnored​(Description description)
        Description copied from class: RunListener
        Called when a test will not be run, generally because a test method is annotated with Ignore.
        Overrides:
        testIgnored in class RunListener
        Parameters:
        description - describes the test that will not be run
      • getWriter

        private java.io.PrintStream getWriter()
      • printHeader

        protected void printHeader​(long runTime)
      • printFailures

        protected void printFailures​(Result result)
      • printFailure

        protected void printFailure​(Failure each,
                                    java.lang.String prefix)
      • printFooter

        protected void printFooter​(Result result)
      • elapsedTimeAsString

        protected java.lang.String elapsedTimeAsString​(long runTime)
        Returns the formatted string of the elapsed time. Duplicated from BaseTestRunner. Fix it.