Package org.objenesis.tck
Class TextReporter
java.lang.Object
org.objenesis.tck.TextReporter
- All Implemented Interfaces:
Reporter
Reports results from TCK as tabulated text, suitable for dumping to the console or a file and
being read by a human.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Candidate
private int
private final PrintStream
private Objenesis
private Objenesis
private String
private final Map<Candidate,
Map<Candidate.CandidateType, TextReporter.Result>> private long
private final PrintStream
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addResult
(Candidate.CandidateType type, boolean success, Exception exception) void
endTests()
Report that all tests have finished.void
exception
(Candidate.CandidateType type, Exception exception) Report that something bad happened during the test.boolean
Return true if the reporter has registered some errorsprivate int
lengthOfLongestStringIn
(Collection<String> descriptions) private String
private void
printResult
(long totalTime) Print the final summary reportvoid
result
(Candidate.CandidateType type, boolean success) Report details about what happened when performing an instantiation test or a serialization feature test.void
Report that a test between a candidate and an objenesis instance is about to start.void
startTests
(String platformDescription, Objenesis objenesisStandard, Objenesis objenesisSerializer) Report that the tests are starting.
-
Field Details
-
summary
-
log
-
startTime
private long startTime -
errorCount
private int errorCount -
objenesisStandard
-
objenesisSerializer
-
currentCandidate
-
results
-
platformDescription
-
-
Constructor Details
-
TextReporter
- Parameters:
summary
- Output of main report.log
- Any additional information, useful for diagnostics.
-
-
Method Details
-
startTests
public void startTests(String platformDescription, Objenesis objenesisStandard, Objenesis objenesisSerializer) Description copied from interface:Reporter
Report that the tests are starting. Provides information that is useful to be reported.- Specified by:
startTests
in interfaceReporter
- Parameters:
platformDescription
- Description the platform being run on (i.e. JVM version, vendor, etc)objenesisStandard
- Standard Objenesis instance usedobjenesisSerializer
- Serialization Objenesis instance used
-
startTest
Description copied from interface:Reporter
Report that a test between a candidate and an objenesis instance is about to start. -
result
Description copied from interface:Reporter
Report details about what happened when performing an instantiation test or a serialization feature test. -
exception
Description copied from interface:Reporter
Report that something bad happened during the test. -
addResult
-
endTests
public void endTests()Description copied from interface:Reporter
Report that all tests have finished. Nothing will be called after this method. -
printResult
private void printResult(long totalTime) Print the final summary report- Parameters:
totalTime
- Time spent running the TCK
-
hasErrors
public boolean hasErrors()Return true if the reporter has registered some errors- Returns:
- if there was errors during execution
-
pad
-
lengthOfLongestStringIn
-