Class TestComparisonResult
- java.lang.Object
-
- de.gebit.integrity.runner.results.test.TestComparisonResult
-
- Direct Known Subclasses:
TestComparisonFailureResult,TestComparisonSuccessResult,TestComparisonUndeterminedResult
public abstract class TestComparisonResult extends Object
Basic class for test comparisons. A single test consists of one or more comparisons, each with an expected and actual result.- Author:
- Rene Schneider - initial API and implementation
-
-
Constructor Summary
Constructors Constructor Description TestComparisonResult(ComparisonResult aResult, String aParameter, Object anActualValue, ValueOrEnumValueOrOperationCollection anExpectedValue)Creates an instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetActualValue()ValueOrEnumValueOrOperationCollectiongetExpectedValue()StringgetParameter()ComparisonResultgetResult()StringtoString()static TestComparisonResultwrap(ComparisonResult aResult, String aParameter, Object anActualValue, ValueOrEnumValueOrOperationCollection anExpectedValue)Convenience method to wrap aComparisonResult.
-
-
-
Constructor Detail
-
TestComparisonResult
public TestComparisonResult(ComparisonResult aResult, String aParameter, Object anActualValue, ValueOrEnumValueOrOperationCollection anExpectedValue)
Creates an instance.- Parameters:
aResult- TheComparisonResultas determined by theResultComparatoraParameter- The name of the parameter in which the comparison expected result was given. May be null if this was the default test result.anActualValue- The actual result as returned by the fixtureanExpectedValue- the expected result value
-
-
Method Detail
-
getResult
public ComparisonResult getResult()
-
getParameter
public String getParameter()
-
getActualValue
public Object getActualValue()
-
getExpectedValue
public ValueOrEnumValueOrOperationCollection getExpectedValue()
-
wrap
public static TestComparisonResult wrap(ComparisonResult aResult, String aParameter, Object anActualValue, ValueOrEnumValueOrOperationCollection anExpectedValue)
Convenience method to wrap aComparisonResult.- Parameters:
aResult- TheComparisonResultas determined by theResultComparatoraParameter- The name of the parameter in which the comparison expected result was given. May be null if this was the default test result.anActualValue- The actual result as returned by the fixtureanExpectedValue- the expected result value- Returns:
- a matching instance either of
TestComparisonSuccessResultorTestComparisonFailureResult
-
-