T
- type of model@FunctionalInterface public interface ModelTester<T>
Modifier and Type | Method and Description |
---|---|
Object |
verify(T expected,
T actual)
Tests each model object and returns error report.
|
Object verify(T expected, T actual)
example:
@Override Object verify(T expected, T actual) {
if (expected == null) {
return "unexpected"; // unexpected results
} else if (actual == null) {
return null; // ignores unnecessary results
} else if (expected.getValue() != actual.getValue()) {
return "value"; // invalid
}
return null; // successfully verified
}
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 testedCopyright © 2011–2018 Asakusa Framework Team. All rights reserved.