Modifier and Type | Class and Description |
---|---|
private static class |
TextReporter.Result |
Modifier and Type | Field and Description |
---|---|
private Candidate |
currentCandidate |
private int |
errorCount |
private java.io.PrintStream |
log |
private Objenesis |
objenesisSerializer |
private Objenesis |
objenesisStandard |
private java.lang.String |
platformDescription |
private java.util.Map<Candidate,java.util.Map<Candidate.CandidateType,TextReporter.Result>> |
results |
private long |
startTime |
private java.io.PrintStream |
summary |
Constructor and Description |
---|
TextReporter(java.io.PrintStream summary,
java.io.PrintStream log) |
Modifier and Type | Method and Description |
---|---|
private void |
addResult(Candidate.CandidateType type,
boolean success,
java.lang.Exception exception) |
void |
endTests()
Report that all tests have finished.
|
void |
exception(Candidate.CandidateType type,
java.lang.Exception exception)
Report that something bad happened during the test.
|
boolean |
hasErrors()
Return true if the reporter has registered some errors
|
private int |
lengthOfLongestStringIn(java.util.Collection<java.lang.String> descriptions) |
private java.lang.String |
pad(java.lang.String text,
int width) |
private void |
printResult(long totalTime)
Print the final summary report
|
void |
result(Candidate.CandidateType type,
boolean success)
Report details about what happened when performing an instantiation test or a serialization feature test.
|
void |
startTest(Candidate candidate)
Report that a test between a candidate and an objenesis instance is about to start.
|
void |
startTests(java.lang.String platformDescription,
Objenesis objenesisStandard,
Objenesis objenesisSerializer)
Report that the tests are starting.
|
private final java.io.PrintStream summary
private final java.io.PrintStream log
private long startTime
private int errorCount
private Objenesis objenesisStandard
private Objenesis objenesisSerializer
private Candidate currentCandidate
private final java.util.Map<Candidate,java.util.Map<Candidate.CandidateType,TextReporter.Result>> results
private java.lang.String platformDescription
public TextReporter(java.io.PrintStream summary, java.io.PrintStream log)
summary
- Output of main report.log
- Any additional information, useful for diagnostics.public void startTests(java.lang.String platformDescription, Objenesis objenesisStandard, Objenesis objenesisSerializer)
Reporter
startTests
in interface Reporter
platformDescription
- Description the platform being run on (i.e. JVM version, vendor, etc)objenesisStandard
- Standard Objenesis instance usedobjenesisSerializer
- Serialization Objenesis instance usedpublic void startTest(Candidate candidate)
Reporter
public void result(Candidate.CandidateType type, boolean success)
Reporter
public void exception(Candidate.CandidateType type, java.lang.Exception exception)
Reporter
private void addResult(Candidate.CandidateType type, boolean success, java.lang.Exception exception)
public void endTests()
Reporter
private void printResult(long totalTime)
totalTime
- Time spent running the TCKpublic boolean hasErrors()
private java.lang.String pad(java.lang.String text, int width)
private int lengthOfLongestStringIn(java.util.Collection<java.lang.String> descriptions)