CL_AUNIT_ASSERT - ABAP Unit: Assertions (see Longtext)
SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up TXBHW - Original Tax Base Amount in Local CurrencyThis documentation is copyright by SAP AG.
Important Note
This class has been superseded by
Functionality
The class CL_AUNIT_ASSERT contains the following static methods for the verification of test expectations within
- ASSERT_EQUALS
Ensure the equality of two data objects. Please note that the arguments are passed by reference. Regarding the comparison of references to instances please refer to interfaceIF_AUNIT_OBJECT>
- ASSERT_EQUALS_F
Ensure the equality of two floats of type F with a relative tolerance.
- ASSERT_EQUALS_FLOAT
Ensure the equality of two decimal floats with a relative tolerance.
- ASSERT_DIFFERS
Ensure the value of two elementary data objects not to be equal.
- ASSERT_BOUND
Ensure whether the reference of a reference variable is valid.
- ASSERT_NOT_BOUND
Ensure whether the reference of a reference variable is invalid.
- ASSERT_INITIAL
Ensure that a data object has its initial value.
- ASSERT_NOT_INITIAL
Ensure that a data object does not have its initial value.
- ASSERT_SUBRC
Requests specific value of SY-SUBRC
- ASSERT_THAT
Ensure that the actual value adheres to a givenConstraint>
- FAIL
Terminates the test with an error
- ABORT
Cancels the test due to a missing context (ideally in setup method)
All the methods have the optional importing parameters MSG, LEVEL, and QUIT, which always have the same meaning:
- MSG (Type: CSEQUENCE)
Contains a more detailed description of the error (if applicable)
- LEVEL (Type: AUNIT_LEVEL)
Indicates the severity of the error; the following values are possible:
- TOLERABLE - Minor error (may be tolerable)
- CRITICAL - Critical error (default value)
- FATAL - Fatal error
- QUIT (Type: AUNIT_FLOWCTRL)
Determines the flow control in the case of an error. The following values can be passed:
- NO - No termination in the case of an error; processing of the current method continues after the relevant method is called
- METHOD - The currently processed test method is terminated (default value)
- CLASS - The currently processed test class is terminated
- PROGRAM - The test of the currently processed main program is terminated: The current test class is terminated and all other test classes in the program are ignored.
All the assert methods have the following mandatory importing parameter:
- ACT (Type: Any)
The object to be verified
The comparing method ASSERT_EQUALS additionally requires a parameter for the expectation:
- EXP (Type: Any)
The identically expected object
- TOL (Type: f)
Allows you to compare floating point numbers for the passed tolerance
Further information
CL_GUI_FRONTEND_SERVICES - Frontend Services PERFORM Short Reference
This documentation is copyright by SAP AG.
Length: 4576 Date: 20120526 Time: 084835 triton ( 91 ms )






