Package org.objenesis.tck
Class TCK
- java.lang.Object
-
- org.objenesis.tck.TCK
-
public class TCK extends java.lang.ObjectTechnology Compatibility Kit (TCK) forObjenesiss.This TCK tests Objenesis implementations against a set of candidate classes (class it attempts to instantiate), reporting the results to a
Reporter.Example usage
TextReporter reporter = new TextReporter(System.out, System.err); TCK tck = new TCK(new ObjenesisStd(), new ObjenesisSerializer(), reporter); tck.runTests(reporter); reporter.printResults();
- See Also:
ObjectInstantiator,Reporter,Main
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringdescribePlatform()Describes the platform.protected voidloadCandidates()voidregisterCandidate(java.lang.Class<?> candidateClass, java.lang.String description, Candidate.CandidateType type)Register a candidate class to attempt to instantiate.voidrunTests()Run all TCK tests.
-
-
-
Constructor Detail
-
TCK
public TCK(Objenesis objenesisStandard, Objenesis objenesisSerializer, Reporter reporter)
- Parameters:
objenesisStandard- Objenesis instance used to instantiate classes the standard way (no constructor called)objenesisSerializer- Objenesis instance used to instantiate classes in a serialization compliant way (first not serializable constructor called)reporter- Where to report the results of the tests to
-
-
Method Detail
-
loadCandidates
protected void loadCandidates() throws java.io.IOException- Throws:
java.io.IOException
-
registerCandidate
public void registerCandidate(java.lang.Class<?> candidateClass, java.lang.String description, Candidate.CandidateType type)Register a candidate class to attempt to instantiate.- Parameters:
candidateClass- Class to attempt to instantiatedescription- Description of the classtype- Type of the candidate
-
runTests
public void runTests()
Run all TCK tests.
-
describePlatform
protected java.lang.String describePlatform()
Describes the platform. Outputs Java version and vendor. To change this behavior, override this method.- Returns:
- Description of the current platform
-
-