T
- type of modelpublic class ModelVerifierDriver<T> extends Object implements VerifyRule
ModelVerifier
to VerifyRule
.NULL
Constructor and Description |
---|
ModelVerifierDriver(ModelVerifier<? super T> verifier,
DataModelDefinition<? extends T> definition)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
Object |
getKey(DataModelReflection target)
Returns the key of the target data model.
|
Object |
verify(DataModelReflection expected,
DataModelReflection actual)
Verifies each model object.
|
public ModelVerifierDriver(ModelVerifier<? super T> verifier, DataModelDefinition<? extends T> definition)
verifier
- ModelVerifier
to adaptdefinition
- target model definitionIllegalArgumentException
- if some parameters were null
public Object getKey(DataModelReflection target)
VerifyRule
This method must return objects which have
both Object.equals(Object)
and Object.hashCode()
.
getKey
in interface VerifyRule
target
- the targetpublic Object verify(DataModelReflection expected, DataModelReflection actual)
TestRule
verify
in interface TestRule
expected
- the expected model object,
or null
if there are no corresponded to the actual model objectactual
- the actual model object in test results,
or null
if there are no corresponded to the expected model objectnull
if successfully verifiedCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.