Show TOC Start of Content Area

Background documentation Methods of the CL_AUNIT_ASSERT Class  Locate the document in its SAP Library structure

The CL_AUNIT_ASSERT class contains the following methods for checking test expectations:

      ASSERT_EQUALS
Asserts the equality of two data objects

      ASSERT_DIFFERS
Asserts the dissimilarity of two data objects

      ASSERT_BOUND
Asserts the validity of the reference of a reference variable

      ASSERT_NOT_BOUND
Asserts whether the reference of a reference variable is invalid

      ASSERT_INITIAL
Asserts whether the data object has its initial value

      ASSERT_NOT_INITIAL
Asserts whether the data object does NOT have its initial value

      ASSERT_CHAR_CP
Asserts whether the character string matches the pattern

      ASSERT_CHAR_NP
Asserts the dissimilarity of the character strings

      Requests a specific value of the return value sy-subrc

      ASSERT_EQUALS_F
Asserts the approximate equality of two floating point numbers of type
f

      ASSERT_EQUALS_FLOAT

Asserts the approximate equality of two floating point numbers

      ASSERT_THAT

Asserts that a given data object adheres to a given constraint.

      FAIL
Terminates the test with an error

      ABORT
Terminates the test because test conditions are not met

If a test does not meet the test expectations, the error is logged and displayed in the Results Display. Optional input parameters for the methods control the individual behavior.

 

End of Content Area