Package org.openl.rules.testmethod
Class BaseTestUnit
- java.lang.Object
-
- org.openl.rules.testmethod.BaseTestUnit
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBaseTestUnit.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.List<ComparedResult>getComparisonResults()ParameterWithValueDeclaration[]getContextParams(TestUnitsResults objTestResult)StringgetDescription()Gets the description field value.List<OpenLMessage>getErrors()longgetExecutionTime()ObjectgetExpectedResult()intgetNumberOfFailedTests()List<ComparedResult>getResultParams()TestStatusgetResultStatus()TestDescriptiongetTest()protected booleanwriteFailuresOnly()
-
-
-
Method Detail
-
getActualResult
public Object getActualResult()
Return the result of running current test case.- Specified by:
getActualResultin interfaceITestUnit- Returns:
- exception that occurred during running, if it was. If no, returns the calculated result.
-
getExecutionTime
public long getExecutionTime()
- Specified by:
getExecutionTimein interfaceITestUnit
-
getDescription
public String getDescription()
Gets the description field value.- Specified by:
getDescriptionin interfaceITestUnit- Returns:
- if the description field value presents, return it`s value. In other case return
ITestUnit.DEFAULT_DESCRIPTION
-
getResultStatus
public TestStatus getResultStatus()
- Specified by:
getResultStatusin interfaceITestUnit
-
getTest
public TestDescription getTest()
-
getComparisonResults
public List<ComparedResult> getComparisonResults()
- Specified by:
getComparisonResultsin interfaceITestUnit
-
writeFailuresOnly
protected boolean writeFailuresOnly()
-
getExpectedResult
public Object getExpectedResult()
- Specified by:
getExpectedResultin interfaceITestUnit
-
getContextParams
public ParameterWithValueDeclaration[] getContextParams(TestUnitsResults objTestResult)
- Specified by:
getContextParamsin interfaceITestUnit
-
getResultParams
public List<ComparedResult> getResultParams()
- Specified by:
getResultParamsin interfaceITestUnit
-
getErrors
public List<OpenLMessage> getErrors()
-
getNumberOfFailedTests
public int getNumberOfFailedTests()
- Specified by:
getNumberOfFailedTestsin interfaceITestUnit
-
getActualParam
public ParameterWithValueDeclaration getActualParam()
- Specified by:
getActualParamin interfaceITestUnit
-
-