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 Candidateprivate intprivate final PrintStreamprivate Objenesisprivate Objenesisprivate Stringprivate final Map<Candidate,Map<Candidate.CandidateType, TextReporter.Result>> private longprivate final PrintStream -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddResult(Candidate.CandidateType type, boolean success, Exception exception) voidendTests()Report that all tests have finished.voidexception(Candidate.CandidateType type, Exception exception) Report that something bad happened during the test.booleanReturn true if the reporter has registered some errorsprivate intlengthOfLongestStringIn(Collection<String> descriptions) private Stringprivate voidprintResult(long totalTime) Print the final summary reportvoidresult(Candidate.CandidateType type, boolean success) Report details about what happened when performing an instantiation test or a serialization feature test.voidReport that a test between a candidate and an objenesis instance is about to start.voidstartTests(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:ReporterReport that the tests are starting. Provides information that is useful to be reported.- Specified by:
startTestsin 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:ReporterReport that a test between a candidate and an objenesis instance is about to start. -
result
Description copied from interface:ReporterReport details about what happened when performing an instantiation test or a serialization feature test. -
exception
Description copied from interface:ReporterReport that something bad happened during the test. -
addResult
-
endTests
public void endTests()Description copied from interface:ReporterReport 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
-