Class TestComparisonResult
- java.lang.Object
-
- de.gebit.integrity.runner.results.test.TestComparisonResult
-
- Direct Known Subclasses:
TestComparisonFailureResult
,TestComparisonSuccessResult
,TestComparisonUndeterminedResult
public abstract class TestComparisonResult extends java.lang.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, java.lang.String aParameter, java.lang.Object anActualValue, ValueOrEnumValueOrOperationCollection anExpectedValue)
Creates an instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getActualValue()
ValueOrEnumValueOrOperationCollection
getExpectedValue()
java.lang.String
getParameter()
ComparisonResult
getResult()
java.lang.String
toString()
static TestComparisonResult
wrap(ComparisonResult aResult, java.lang.String aParameter, java.lang.Object anActualValue, ValueOrEnumValueOrOperationCollection anExpectedValue)
Convenience method to wrap aComparisonResult
.
-
-
-
Constructor Detail
-
TestComparisonResult
public TestComparisonResult(ComparisonResult aResult, java.lang.String aParameter, java.lang.Object anActualValue, ValueOrEnumValueOrOperationCollection anExpectedValue)
Creates an instance.- Parameters:
aResult
- TheComparisonResult
as determined by theResultComparator
aParameter
- 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 java.lang.String getParameter()
-
getActualValue
public java.lang.Object getActualValue()
-
getExpectedValue
public ValueOrEnumValueOrOperationCollection getExpectedValue()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
wrap
public static TestComparisonResult wrap(ComparisonResult aResult, java.lang.String aParameter, java.lang.Object anActualValue, ValueOrEnumValueOrOperationCollection anExpectedValue)
Convenience method to wrap aComparisonResult
.- Parameters:
aResult
- TheComparisonResult
as determined by theResultComparator
aParameter
- 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
TestComparisonSuccessResult
orTestComparisonFailureResult
-
-