Jacson

de.spieleck.app.jacson.report
Class TestReport

java.lang.Object
  extended byde.spieleck.app.jacson.report.PrintingReport
      extended byde.spieleck.app.jacson.report.TestReport
All Implemented Interfaces:
ConfigVerify.Acceptor, JacsonPrintReport, JacsonReport, JacsonStately

public class TestReport
extends PrintingReport

Report to test generated events against a reference file generated by PrintingReport.

Author:
fsn

Field Summary
protected  int diffCount
          Count different lines
static java.lang.String IGNORE
           
protected  int ignored
          Number of ignored lines
protected  gnu.trove.THashSet ignores
          names to be ignored on comparison
protected  java.io.LineNumberReader lnr
          Input for the reference file.
static java.lang.String REFERENCE_FILE
           
protected  java.lang.StringBuffer sb
           
protected  int valueCount
          Number of values
 
Fields inherited from class de.spieleck.app.jacson.report.PrintingReport
begins, FILENAME_NODE, pw
 
Constructor Summary
TestReport()
           
 
Method Summary
 boolean accept(ConfigNode cn)
           
 void addIgnore(java.lang.String ignore)
           
 void clear()
           
 void finish(boolean close)
          Finish and optionally close the underlying resources
 int getDiffCount()
           
 int getIgnores()
           
 int getLineNumber()
           
 int getValueCount()
           
 void init(ConfigNode config)
          Initialize the report.
 void report(java.lang.String localName, java.lang.String value)
          Report a single name value pair within a report
 void setReference(java.lang.String referenceName)
           
 
Methods inherited from class de.spieleck.app.jacson.report.PrintingReport
begin, end, finish, getPrintWriter, getRegState, registerState, setOutputStream, setPrintWriter, useFilename, useFilename
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REFERENCE_FILE

public static final java.lang.String REFERENCE_FILE
See Also:
Constant Field Values

IGNORE

public static final java.lang.String IGNORE
See Also:
Constant Field Values

lnr

protected java.io.LineNumberReader lnr
Input for the reference file.


diffCount

protected int diffCount
Count different lines


ignores

protected gnu.trove.THashSet ignores
names to be ignored on comparison


ignored

protected int ignored
Number of ignored lines


valueCount

protected int valueCount
Number of values


sb

protected java.lang.StringBuffer sb
Constructor Detail

TestReport

public TestReport()
Method Detail

init

public void init(ConfigNode config)
          throws JacsonConfigException
Description copied from interface: JacsonReport
Initialize the report. The passed ConfigNode can be used to obtain configuration information of the report from the global config xml.

Specified by:
init in interface JacsonReport
Overrides:
init in class PrintingReport
Throws:
JacsonConfigException

clear

public void clear()

setReference

public void setReference(java.lang.String referenceName)
                  throws JacsonConfigException
Throws:
JacsonConfigException

addIgnore

public void addIgnore(java.lang.String ignore)

accept

public boolean accept(ConfigNode cn)
Specified by:
accept in interface ConfigVerify.Acceptor
Overrides:
accept in class PrintingReport

report

public void report(java.lang.String localName,
                   java.lang.String value)
Description copied from interface: JacsonReport
Report a single name value pair within a report

Specified by:
report in interface JacsonReport
Overrides:
report in class PrintingReport

finish

public void finish(boolean close)
Description copied from interface: JacsonReport
Finish and optionally close the underlying resources

Specified by:
finish in interface JacsonReport
Overrides:
finish in class PrintingReport

getDiffCount

public int getDiffCount()

getIgnores

public int getIgnores()

getLineNumber

public int getLineNumber()

getValueCount

public int getValueCount()

Spieleck

Copyleft 2002 spieleck.de.