Class JsonFactoryContract<N, M extends JsonModel<N> & JsonFactory<N>>
java.lang.Object
ca.marcusdunn.jsonlens.testkit.JsonModelContract<N>
ca.marcusdunn.jsonlens.testkit.JsonFactoryContract<N,M>
- Type Parameters:
N- the node type of the modelM- the type of the model
- Direct Known Subclasses:
JsonEditorContract
public abstract class JsonFactoryContract<N, M extends JsonModel<N> & JsonFactory<N>>
extends JsonModelContract<N>
Tests that a model that also implements
JsonFactory is well-formed: each built node has
the correct kind, and the read methods give the exact value again.-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class JsonModelContract
keepsDuplicateNames, parse, randomDocuments, readsAnyExponent
-
Constructor Details
-
JsonFactoryContract
protected JsonFactoryContract()Makes the contract test. A subclass gives the model and a parser.
-
-
Method Details
-
factory
-
model
Description copied from class:JsonModelContractReturns the model under test.- Specified by:
modelin classJsonModelContract<N>- Returns:
- the model under test
-