public abstract class IpsTestCaseBase extends IpsTest2
| Constructor and Description |
|---|
IpsTestCaseBase(String qName) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertEquals(Object expectedValue,
Object actualValue,
IpsTestResult result)
Asserts that two objects are equal.
|
protected void |
assertEquals(Object expectedValue,
Object actualValue,
IpsTestResult result,
String testObject,
String attribute)
Asserts that two objects are equal.
|
protected void |
assertEquals(Object expectedValue,
Object actualValue,
IpsTestResult result,
String testObject,
String attribute,
String message)
Asserts that two objects are equal.
|
protected void |
assertEqualsIgnoreScale(org.faktorips.values.Decimal expectedValue,
org.faktorips.values.Decimal actualValue,
IpsTestResult result)
Deprecated.
Decimal class already ignores the scale in it's equals method.
|
protected void |
assertEqualsIgnoreScale(org.faktorips.values.Decimal expectedValue,
org.faktorips.values.Decimal actualValue,
IpsTestResult result,
String object,
String attribute)
Deprecated.
Decimal class already ignores the scale in it's equals method.
|
protected void |
assertEqualsIgnoreScale(org.faktorips.values.Decimal expectedValue,
org.faktorips.values.Decimal actualValue,
IpsTestResult result,
String object,
String attribute,
String message)
Deprecated.
Decimal class already ignores the scale in it's equals method.
|
protected void |
assertFalse(boolean condition,
IpsTestResult result)
Asserts that a condition is false.
|
protected void |
assertFalse(boolean condition,
IpsTestResult result,
String testObject,
String attribute)
Asserts that a condition is false.
|
protected void |
assertFalse(boolean condition,
IpsTestResult result,
String testObject,
String attribute,
String message)
Asserts that a condition is false.
|
protected void |
assertNotNull(Object object,
IpsTestResult result)
Asserts that an object is not null.
|
protected void |
assertNotNull(Object object,
IpsTestResult result,
String testObject,
String attribute)
Asserts that an object is not null.
|
protected void |
assertNotNull(Object object,
IpsTestResult result,
String testObject,
String attribute,
String message)
Asserts that an object is not null.
|
protected void |
assertNull(Object object,
IpsTestResult result)
Asserts that an object is null.
|
protected void |
assertNull(Object object,
IpsTestResult result,
String testObject,
String attribute)
Asserts that an object is null.
|
protected void |
assertNull(Object object,
IpsTestResult result,
String testObject,
String attribute,
String message)
Asserts that an object is null.
|
protected void |
assertTrue(boolean condition,
IpsTestResult result)
Asserts that a condition is true.
|
protected void |
assertTrue(boolean condition,
IpsTestResult result,
String testObject,
String attribute)
Asserts that a condition is true.
|
protected void |
assertTrue(boolean condition,
IpsTestResult result,
String testObject,
String attribute,
String message)
Asserts that a condition is true.
|
abstract void |
executeAsserts(IpsTestResult result)
Method to execute several asserts and store the results in the given result object.
|
abstract void |
executeBusinessLogic()
Method to execute the business logic.
|
protected void |
fail(Object expectedValue,
Object actualValue,
IpsTestResult result,
String testObject,
String attribute,
String message)
Adds a new failure to the given result.
|
void |
run(IpsTestResult result) |
countTestCases, getFullPath, getName, getQualifiedName, getRepository, setFullPath, setRepositorypublic IpsTestCaseBase(String qName)
public void run(IpsTestResult result)
public abstract void executeBusinessLogic()
throws Exception
Exceptionpublic abstract void executeAsserts(IpsTestResult result) throws Exception
Exceptionprotected void assertEquals(Object expectedValue, Object actualValue, IpsTestResult result)
expectedValue - the expected valueactualValue - the value which will be compared with the expected valueresult - result object to which the assert result will be addedprotected void assertEquals(Object expectedValue, Object actualValue, IpsTestResult result, String testObject, String attribute)
expectedValue - the expected valueactualValue - the value which will be compared with the expected valueresult - result object to which the assert result will be addedtestObject - name of the test object in the test case type definition, identifies the
object which will be checked. If the test contains several instances with the same
name then an index (starting with 0) must be added to the testObject string
separated by "#" (e.g. TestObject#0, TestObject#1, ...). If the test object is a
child object then the complete path to the object must be given, the path elements
must be separated by "." (e.g. RootTestObject#0.ParentObject#0.ChildObject#0)attribute - name of the test attribute in the test case type definition, identifies the
attribute which will be checked, if the test object doesn't support attributes
then this parameter could be nullprotected void assertEquals(Object expectedValue, Object actualValue, IpsTestResult result, String testObject, String attribute, String message)
expectedValue - the expected valueactualValue - the value which will be compared with the expected valueresult - result object to which the assert result will be addedtestObject - name of the test object in the test case type definition, identifies the
object which will be checked. If the test contains several instances with the same
name then an index (starting with 0) must be added to the testObject string
separated by "#" (e.g. TestObject#0, TestObject#1, ...). If the test object is a
child object then the complete path to the object must be given, the path elements
must be separated by "." (e.g. RootTestObject#0.ParentObject#0.ChildObject#0)attribute - name of the test attribute in the test case type definition, identifies the
attribute which will be checked, if the test object doesn't support attributes
then this parameter could be nullmessage - an optional message test to describe the assertprotected void assertTrue(boolean condition,
IpsTestResult result)
condition - the condition which will be checkedresult - result object to which the assert result will be addedprotected void assertTrue(boolean condition,
IpsTestResult result,
String testObject,
String attribute)
condition - the condition which will be checkedresult - result object to which the assert result will be addedtestObject - name of the test object in the test case type definition, identifies the
object which will be checked. If the test contains several instances with the same
name then an index (starting with 0) must be added to the testObject string
separated by "#" (e.g. TestObject#0, TestObject#1, ...). If the test object is a
child object then the complete path to the object must be given, the path elements
must be separated by "." (e.g. RootTestObject#0.ParentObject#0.ChildObject#0)attribute - name of the test attribute in the test case type definition, identifies the
attribute which will be checked, if the test object doesn't support attributes
then this parameter could be nullprotected void assertTrue(boolean condition,
IpsTestResult result,
String testObject,
String attribute,
String message)
condition - the condition which will be checkedresult - result object to which the assert result will be addedtestObject - name of the test object in the test case type definition, identifies the
object which will be checked. If the test contains several instances with the same
name then an index (starting with 0) must be added to the testObject string
separated by "#" (e.g. TestObject#0, TestObject#1, ...). If the test object is a
child object then the complete path to the object must be given, the path elements
must be separated by "." (e.g. RootTestObject#0.ParentObject#0.ChildObject#0)attribute - name of the test attribute in the test case type definition, identifies the
attribute which will be checked, if the test object doesn't support attributes
then this parameter could be nullmessage - an optional message test to describe the assertprotected void assertFalse(boolean condition,
IpsTestResult result)
condition - the condition which will be checkedresult - result object to which the assert result will be addedprotected void assertFalse(boolean condition,
IpsTestResult result,
String testObject,
String attribute)
condition - the condition which will be checkedresult - result object to which the assert result will be addedtestObject - name of the test object in the test case type definition, identifies the
object which will be checked. If the test contains several instances with the same
name then an index (starting with 0) must be added to the testObject string
separated by "#" (e.g. TestObject#0, TestObject#1, ...). If the test object is a
child object then the complete path to the object must be given, the path elements
must be separated by "." (e.g. RootTestObject#0.ParentObject#0.ChildObject#0)attribute - name of the test attribute in the test case type definition, identifies the
attribute which will be checked, if the test object doesn't support attributes
then this parameter could be nullprotected void assertFalse(boolean condition,
IpsTestResult result,
String testObject,
String attribute,
String message)
condition - the condition which will be checkedresult - result object to which the assert result will be addedtestObject - name of the test object in the test case type definition, identifies the
object which will be checked. If the test contains several instances with the same
name then an index (starting with 0) must be added to the testObject string
separated by "#" (e.g. TestObject#0, TestObject#1, ...). If the test object is a
child object then the complete path to the object must be given, the path elements
must be separated by "." (e.g. RootTestObject#0.ParentObject#0.ChildObject#0)attribute - name of the test attribute in the test case type definition, identifies the
attribute which will be checked, if the test object doesn't support attributes
then this parameter could be nullmessage - an optional message test to describe the assertprotected void assertNull(Object object, IpsTestResult result)
object - the object which will be checkedresult - result object to which the assert result will be addedprotected void assertNull(Object object, IpsTestResult result, String testObject, String attribute)
object - the object which will be checkedresult - result object to which the assert result will be addedtestObject - name of the test object in the test case type definition, identifies the
object which will be checked. If the test contains several instances with the same
name then an index (starting with 0) must be added to the testObject string
separated by "#" (e.g. TestObject#0, TestObject#1, ...). If the test object is a
child object then the complete path to the object must be given, the path elements
must be separated by "." (e.g. RootTestObject#0.ParentObject#0.ChildObject#0)attribute - name of the test attribute in the test case type definition, identifies the
attribute which will be checked, if the test object doesn't support attributes
then this parameter could be nullprotected void assertNull(Object object, IpsTestResult result, String testObject, String attribute, String message)
object - the object which will be checkedresult - result object to which the assert result will be addedtestObject - name of the test object in the test case type definition, identifies the
object which will be checked. If the test contains several instances with the same
name then an index (starting with 0) must be added to the testObject string
separated by "#" (e.g. TestObject#0, TestObject#1, ...). If the test object is a
child object then the complete path to the object must be given, the path elements
must be separated by "." (e.g. RootTestObject#0.ParentObject#0.ChildObject#0)attribute - name of the test attribute in the test case type definition, identifies the
attribute which will be checked, if the test object doesn't support attributes
then this parameter could be nullmessage - an optional message test to describe the assertprotected void assertNotNull(Object object, IpsTestResult result)
object - the object which will be checkedresult - result object to which the assert result will be addedprotected void assertNotNull(Object object, IpsTestResult result, String testObject, String attribute)
object - the object which will be checkedresult - result object to which the assert result will be addedtestObject - name of the test object in the test case type definition, identifies the
object which will be checked. If the test contains several instances with the same
name then an index (starting with 0) must be added to the testObject string
separated by "#" (e.g. TestObject#0, TestObject#1, ...). If the test object is a
child object then the complete path to the object must be given, the path elements
must be separated by "." (e.g. RootTestObject#0.ParentObject#0.ChildObject#0)attribute - name of the test attribute in the test case type definition, identifies the
attribute which will be checked, if the test object doesn't support attributes
then this parameter could be nullprotected void assertNotNull(Object object, IpsTestResult result, String testObject, String attribute, String message)
object - the object which will be checkedresult - result object to which the assert result will be addedtestObject - name of the test object in the test case type definition, identifies the
object which will be checked. If the test contains several instances with the same
name then an index (starting with 0) must be added to the testObject string
separated by "#" (e.g. TestObject#0, TestObject#1, ...). If the test object is a
child object then the complete path to the object must be given, the path elements
must be separated by "." (e.g. RootTestObject#0.ParentObject#0.ChildObject#0)attribute - name of the test attribute in the test case type definition, identifies the
attribute which will be checked, if the test object doesn't support attributes
then this parameter could be nullmessage - an optional message test to describe the assert@Deprecated protected void assertEqualsIgnoreScale(org.faktorips.values.Decimal expectedValue, org.faktorips.values.Decimal actualValue, IpsTestResult result)
@Deprecated protected void assertEqualsIgnoreScale(org.faktorips.values.Decimal expectedValue, org.faktorips.values.Decimal actualValue, IpsTestResult result, String object, String attribute)
@Deprecated protected void assertEqualsIgnoreScale(org.faktorips.values.Decimal expectedValue, org.faktorips.values.Decimal actualValue, IpsTestResult result, String object, String attribute, String message)
protected void fail(Object expectedValue, Object actualValue, IpsTestResult result, String testObject, String attribute, String message)
expectedValue - the expected valueactualValue - the actuel valueresult - result object to which the assert result will be addedtestObject - name of the test object in the test case type definition, identifies the
object. If the test contains several instances with the same name then an index
(starting with 0) must be added to the testObject string separated by "#" (e.g.
TestObject#0, TestObject#1, ...). If the test object is a child object then the
complete path to the object must be given, the path elements must be separated by
"." (e.g. RootTestObject#0.ParentObject#0.ChildObject#0)attribute - name of the test attribute in the test case type definition, identifies the
attribute, if the test object doesn't support attributes then this parameter could
be nullmessage - an optional message test to describe the failureCopyright © 2020. All rights reserved.