Package org.openl.rules.testmethod
Class TestDescription
- java.lang.Object
-
- org.openl.rules.testmethod.TestDescription
-
public class TestDescription extends Object
-
-
Constructor Summary
Constructors Constructor Description TestDescription(IOpenMethod testedMethod, IRulesRuntimeContext context, Object[] arguments, IDataBase db)TestDescription(IOpenMethod testedMethod, DynamicObject testObject, List<IOpenField> fields, List<IOpenField> errorFields, ITableModel dataModel, IDataBase db)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object[]getArguments(OpenLCloner cloner)StringgetDescription()List<IOpenField>getErrorFields()ParameterWithValueDeclaration[]getExecutionParams()ObjectgetExpectedError()ObjectgetExpectedResult()List<IOpenField>getFields()StringgetId()Returns an ID of the test case.intgetIndex()protected static IOpenFieldgetKeyField(String paramName, IOpenClass type, Object value, IDataBase db, ITableModel dataModel)String[]getParametersNames()IRulesRuntimeContextgetRuntimeContext(OpenLCloner cloner)IOpenMethodgetTestedMethod()DynamicObjectgetTestObject()booleanhasDescription()booleanhasId()booleanisEmptyOrNewStyleErrorDescription()Checks if test description has only one error column with _error_ header.booleanisExpectedErrorDefined()booleanisExpectedResultDefined()booleanisRuntimeContextDefined()voidsetIndex(int index)
-
-
-
Constructor Detail
-
TestDescription
public TestDescription(IOpenMethod testedMethod, DynamicObject testObject, List<IOpenField> fields, List<IOpenField> errorFields, ITableModel dataModel, IDataBase db)
-
TestDescription
public TestDescription(IOpenMethod testedMethod, IRulesRuntimeContext context, Object[] arguments, IDataBase db)
-
-
Method Detail
-
getTestedMethod
public IOpenMethod getTestedMethod()
-
getTestObject
public DynamicObject getTestObject()
-
getExecutionParams
public ParameterWithValueDeclaration[] getExecutionParams()
-
getParametersNames
public String[] getParametersNames()
-
getArguments
public Object[] getArguments(OpenLCloner cloner)
-
hasDescription
public boolean hasDescription()
-
getDescription
public String getDescription()
-
isExpectedResultDefined
public boolean isExpectedResultDefined()
-
getExpectedResult
public Object getExpectedResult()
-
isExpectedErrorDefined
public boolean isExpectedErrorDefined()
-
getExpectedError
public Object getExpectedError()
-
isRuntimeContextDefined
public boolean isRuntimeContextDefined()
-
getRuntimeContext
public IRulesRuntimeContext getRuntimeContext(OpenLCloner cloner)
-
getId
public String getId()
Returns an ID of the test case. The ID is get from _id_ column or generated on index base.
-
hasId
public boolean hasId()
-
setIndex
public void setIndex(int index)
-
getIndex
public int getIndex()
-
getFields
public List<IOpenField> getFields()
-
getErrorFields
public List<IOpenField> getErrorFields()
-
getKeyField
protected static IOpenField getKeyField(String paramName, IOpenClass type, Object value, IDataBase db, ITableModel dataModel)
-
isEmptyOrNewStyleErrorDescription
public boolean isEmptyOrNewStyleErrorDescription()
Checks if test description has only one error column with _error_ header.- Returns:
- true or false
-
-