Package org.openl.rules.testmethod
Class TestUnit
- java.lang.Object
-
- org.openl.rules.testmethod.BaseTestUnit
-
- org.openl.rules.testmethod.TestUnit
-
- All Implemented Interfaces:
ITestUnit
public class TestUnit extends BaseTestUnit
Representation of the single test unit in the test.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTestUnit.Builder
-
Field Summary
-
Fields inherited from interface org.openl.rules.testmethod.ITestUnit
DEFAULT_DESCRIPTION
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ParameterWithValueDeclarationgetActualParam()ObjectgetActualResult()Return the result of running current test case.ParameterWithValueDeclaration[]getContextParams(TestUnitsResults objTestResult)List<OpenLMessage>getErrors()ObjectgetExpectedResult()Gets the expected result.List<ComparedResult>getResultParams()protected booleanwriteFailuresOnly()-
Methods inherited from class org.openl.rules.testmethod.BaseTestUnit
getComparisonResults, getDescription, getExecutionTime, getNumberOfFailedTests, getResultStatus, getTest
-
-
-
-
Method Detail
-
getExpectedResult
public Object getExpectedResult()
Gets the expected result.- Specified by:
getExpectedResultin interfaceITestUnit- Overrides:
getExpectedResultin classBaseTestUnit- Returns:
- the value of expected result.
-
getActualResult
public Object getActualResult()
Return the result of running current test case.- Specified by:
getActualResultin interfaceITestUnit- Overrides:
getActualResultin classBaseTestUnit- Returns:
- exception that occurred during running, if it was. If no, returns the calculated result.
-
getActualParam
public ParameterWithValueDeclaration getActualParam()
- Specified by:
getActualParamin interfaceITestUnit- Overrides:
getActualParamin classBaseTestUnit
-
getContextParams
public ParameterWithValueDeclaration[] getContextParams(TestUnitsResults objTestResult)
- Specified by:
getContextParamsin interfaceITestUnit- Overrides:
getContextParamsin classBaseTestUnit
-
getResultParams
public List<ComparedResult> getResultParams()
- Specified by:
getResultParamsin interfaceITestUnit- Overrides:
getResultParamsin classBaseTestUnit
-
getErrors
public List<OpenLMessage> getErrors()
- Specified by:
getErrorsin interfaceITestUnit- Overrides:
getErrorsin classBaseTestUnit
-
writeFailuresOnly
protected boolean writeFailuresOnly()
- Overrides:
writeFailuresOnlyin classBaseTestUnit
-
-