org.apache.qpid.junit.extensions
Class NullResultPrinter

java.lang.Object
  extended by junit.textui.ResultPrinter
      extended by org.apache.qpid.junit.extensions.NullResultPrinter
All Implemented Interfaces:
junit.framework.TestListener

public class NullResultPrinter
extends junit.textui.ResultPrinter

A ResultPrinter that prints nothing. This exists, in order to provide a replacement to JUnit's ResultPrinter, which is refered to directly by JUnit code, rather that as an abstracted TestListener. JUnit's text ui TestRunner must have a ResultPrinter. This provides an implementation of it that prints nothing, so that a better mechanism can be used for providing feedback to the console instead.

CRC Card
Responsibilities Collaborations

Todo:
See todo in TKTestRunner about completely replacing the test ui runner. Doing things like this in order to extend JUnit is not nice, and there needs to be a better way to do it. Delete this class and use a listener instead.

Constructor Summary
NullResultPrinter(PrintStream writer)
          Builds a fake ResultPrinter that prints nothing.
 
Method Summary
 void addError(junit.framework.Test test, Throwable t)
          Does nothing.
 void addFailure(junit.framework.Test test, junit.framework.AssertionFailedError t)
          Does nothing.
 void endTest(junit.framework.Test test)
          Does nothing.
 void startTest(junit.framework.Test test)
          Does nothing.
 
Methods inherited from class junit.textui.ResultPrinter
elapsedTimeAsString, getWriter, printDefect, printDefectHeader, printDefects, printDefectTrace, printErrors, printFailures, printFooter, printHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullResultPrinter

public NullResultPrinter(PrintStream writer)
Builds a fake ResultPrinter that prints nothing.

Parameters:
writer - The writer to send output to.
Method Detail

addError

public void addError(junit.framework.Test test,
                     Throwable t)
Does nothing.

Specified by:
addError in interface junit.framework.TestListener
Overrides:
addError in class junit.textui.ResultPrinter
Parameters:
test - Ignored.
t - Ignored.

addFailure

public void addFailure(junit.framework.Test test,
                       junit.framework.AssertionFailedError t)
Does nothing.

Specified by:
addFailure in interface junit.framework.TestListener
Overrides:
addFailure in class junit.textui.ResultPrinter
Parameters:
test - Ignored.
t - Ignored.

endTest

public void endTest(junit.framework.Test test)
Does nothing.

Specified by:
endTest in interface junit.framework.TestListener
Overrides:
endTest in class junit.textui.ResultPrinter
Parameters:
test - Ignored.

startTest

public void startTest(junit.framework.Test test)
Does nothing.

Specified by:
startTest in interface junit.framework.TestListener
Overrides:
startTest in class junit.textui.ResultPrinter
Parameters:
test - Ignored.


Licensed to the Apache Software Foundation