public class TCK extends Object
Objenesis
s.
This TCK tests Objenesis implementations against a set of candidate classes (class it attempts to instantiate),
reporting the results to a Reporter
.
TextReporter reporter = new TextReporter(System.out, System.err); TCK tck = new TCK(new ObjenesisStd(), new ObjenesisSerializer(), reporter); tck.runTests(reporter); reporter.printResults();
ObjectInstantiator
,
Reporter
,
Main
Constructor and Description |
---|
TCK(Objenesis objenesisStandard,
Objenesis objenesisSerializer,
Reporter reporter) |
Modifier and Type | Method and Description |
---|---|
protected String |
describePlatform()
Describes the platform.
|
protected void |
loadCandidates() |
void |
registerCandidate(Class<?> candidateClass,
String description,
Candidate.CandidateType type)
Register a candidate class to attempt to instantiate.
|
void |
runTests()
Run all TCK tests.
|
public TCK(Objenesis objenesisStandard, Objenesis objenesisSerializer, Reporter reporter)
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 toprotected void loadCandidates() throws IOException
IOException
public void registerCandidate(Class<?> candidateClass, String description, Candidate.CandidateType type)
candidateClass
- Class to attempt to instantiatedescription
- Description of the classpublic void runTests()
protected String describePlatform()
Copyright © 2006–2023 Joe Walnes, Henri Tremblay, Leonardo Mesquita. All rights reserved.