UTF-X, Unit Testing Framework - Xslt

utfx.printers
Class JunitResultPrinter

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by java.io.PrintStream
              extended by utfx.printers.ResultPrinter
                  extended by utfx.printers.JunitResultPrinter
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable, junit.framework.TestListener

public class JunitResultPrinter
extends ResultPrinter

Simple result printer which produces output similar to that of junit.textui.ResultPrinter. This result printer is based on junit.textui.ResultPrinter by Kent Beck and Erich Gamma.

Copyright © 2004 - University of Southern Queensland.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

$Source: /cvs/utf-x/framework/src/java/utfx/printers/JunitResultPrinter.java,v $

Version:
$Revision: 1.2 $ $Date: 2006/03/17 23:34:36 $ $Name: release_0_0_8_alpha $
Author:
Jacek Radajewski, Kent Beck and Erich Gamma (authors of junit.textui.ResultPrinter)

Field Summary
private  int colNum
          column number
 
Fields inherited from class utfx.printers.ResultPrinter
indentString, log, suiteDepth, testCaseCount
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
JunitResultPrinter(java.io.OutputStream os)
           
 
Method Summary
 void addError(junit.framework.Test test, java.lang.Throwable t)
          Print error symbol.
 void addFailure(junit.framework.Test test, junit.framework.AssertionFailedError t)
          Print failure symbol.
 void endTestCase(junit.framework.TestCase testCase)
          End of a test case.
 void endTestSuite(junit.framework.TestSuite suite)
          End of a test suite.
 void printDefect(junit.framework.TestFailure booBoo, int count)
          Print a defect.
 void printDefectHeader(junit.framework.TestFailure booBoo, int count)
          Print defect header.
 void printDefects(java.util.Enumeration booBoos, int count, java.lang.String type)
          Print defects.
 void printDefectTrace(junit.framework.TestFailure booBoo)
          Print defect trace.
 void printErrors(junit.framework.TestResult result)
          Print errors.
 void printFailures(junit.framework.TestResult result)
          Print failures Based on junit.textui.ResultPrinter by Kent Beck and Erich Gamma.
 void printFooter(junit.framework.TestResult result)
          Print footer.
 void printHeader(junit.framework.TestResult result)
          Print summary header.
 void startTestCase(junit.framework.TestCase testCase)
          Start of a test case.
 void startTestSuite(junit.framework.TestSuite suite)
          Start of a test suite.
 
Methods inherited from class utfx.printers.ResultPrinter
endTest, getIndent, printElapsedTimeMillis, printIndent, printSummary, setIndentString, start, startTest
 
Methods inherited from class java.io.PrintStream
append, append, append, checkError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write
 
Methods inherited from class java.io.FilterOutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

colNum

private int colNum
column number

Constructor Detail

JunitResultPrinter

public JunitResultPrinter(java.io.OutputStream os)
Method Detail

printHeader

public void printHeader(junit.framework.TestResult result)
Print summary header. Based on junit.textui.ResultPrinter by Kent Beck and Erich Gamma.

Specified by:
printHeader in class ResultPrinter
See Also:
junit.textui.ResultPrinter

printErrors

public void printErrors(junit.framework.TestResult result)
Print errors. Based on junit.textui.ResultPrinter by Kent Beck and Erich Gamma.

Specified by:
printErrors in class ResultPrinter
Parameters:
result - test result
See Also:
junit.textui.ResultPrinter

printFailures

public void printFailures(junit.framework.TestResult result)
Print failures Based on junit.textui.ResultPrinter by Kent Beck and Erich Gamma.

Specified by:
printFailures in class ResultPrinter
Parameters:
result - test result
See Also:
junit.textui.ResultPrinter

printDefects

public void printDefects(java.util.Enumeration booBoos,
                         int count,
                         java.lang.String type)
Print defects. Based on junit.textui.ResultPrinter by Kent Beck and Erich Gamma.

See Also:
junit.textui.ResultPrinter

printDefect

public void printDefect(junit.framework.TestFailure booBoo,
                        int count)
Print a defect. Based on junit.textui.ResultPrinter by Kent Beck and Erich Gamma.

See Also:
junit.textui.ResultPrinter

printDefectHeader

public void printDefectHeader(junit.framework.TestFailure booBoo,
                              int count)
Print defect header. Based on junit.textui.ResultPrinter by Kent Beck and Erich Gamma.

See Also:
junit.textui.ResultPrinter

printDefectTrace

public void printDefectTrace(junit.framework.TestFailure booBoo)
Print defect trace. Based on junit.textui.ResultPrinter by Kent Beck and Erich Gamma.

See Also:
junit.textui.ResultPrinter

printFooter

public void printFooter(junit.framework.TestResult result)
Print footer. Based on junit.textui.ResultPrinter by Kent Beck and Erich Gamma.

Specified by:
printFooter in class ResultPrinter
See Also:
junit.textui.ResultPrinter

addError

public void addError(junit.framework.Test test,
                     java.lang.Throwable t)
Print error symbol. Based on junit.textui.ResultPrinter by Kent Beck and Erich Gamma.

See Also:
junit.textui.ResultPrinter, TestListener.addError(Test, Throwable)

addFailure

public void addFailure(junit.framework.Test test,
                       junit.framework.AssertionFailedError t)
Print failure symbol. Based on junit.textui.ResultPrinter by Kent Beck and Erich Gamma.

See Also:
junit.textui.ResultPrinter, TestListener.addFailure(Test, AssertionFailedError)

startTestCase

public void startTestCase(junit.framework.TestCase testCase)
Start of a test case.

Specified by:
startTestCase in class ResultPrinter
Parameters:
testCase - the TestSuite we are entering.

endTestCase

public void endTestCase(junit.framework.TestCase testCase)
End of a test case.

Specified by:
endTestCase in class ResultPrinter
Parameters:
testCase -

startTestSuite

public void startTestSuite(junit.framework.TestSuite suite)
Start of a test suite.

Specified by:
startTestSuite in class ResultPrinter
Parameters:
suite - the TestSuite we are entering.

endTestSuite

public void endTestSuite(junit.framework.TestSuite suite)
End of a test suite.

Specified by:
endTestSuite in class ResultPrinter
Parameters:
suite - the TestSuite we are leaving

UTF-X, Unit Testing Framework - Xslt