SAP CL_ABAP_UNIT_ASSERT OO Class - ABAP Unit: Assertions (see Longtext)









CL_ABAP_UNIT_ASSERT is a standard SAP object class available within R/3 SAP systems depending on your version and release level. You can view/maintain the class details by entering its name into the relevant SAP transactions such as SE24, SE80 or even SE84. Below is the documentation available for class CL_ABAP_UNIT_ASSERT including details of:

  • Interface class implementations
  • Inheritance details
  • Methods defined within class ( including link to full details )
  • Attributes ( including initial values )
  • Class Events



Method list of CL_ABAP_UNIT_ASSERT SAP class


A method is a coding block that performs a certain procedure (i.e. ABAP functionality) on an object within the overall SAP class. In simple terms if the object is an SAP database table a method could be the procedure to add a record or to delete a record. If you are new to OO in many respects, the implementation of a method is similar to a function module and can be called in a very similar way using CALL METHOD. Instead of "CALL FUNCTION", Methods are referenced using the following syntax: CALL METHOD =>methodname EXPORTING/IMPORTING...


Method NameDescriptionVisability
ABORTAbort test execution due to missing contextPublic
CALL METHOD cl_abap_unit_assert=>ABORT...more details

ASSERT_BOUNDEnsure the validity of the referencePublic
CALL METHOD cl_abap_unit_assert=>ASSERT_BOUND...more details

ASSERT_CHAR_CPEnsure that character string fits to simple patternPublic
CALL METHOD cl_abap_unit_assert=>ASSERT_CHAR_CP...more details

ASSERT_CHAR_NPEnsure that character string does not fit to simple patternPublic
CALL METHOD cl_abap_unit_assert=>ASSERT_CHAR_NP...more details

ASSERT_DIFFERSEnsure that data objects have distinct valuesPublic
CALL METHOD cl_abap_unit_assert=>ASSERT_DIFFERS...more details

ASSERT_EQUALSEnsure equality of two data objectsPublic
CALL METHOD cl_abap_unit_assert=>ASSERT_EQUALS...more details

ASSERT_EQUALS_FLOATEnsure approximate consistency of 2 floating point numbersPublic
CALL METHOD cl_abap_unit_assert=>ASSERT_EQUALS_FLOAT...more details

ASSERT_FALSEEnsure that boolean equals ABAP_FALSEPublic
CALL METHOD cl_abap_unit_assert=>ASSERT_FALSE...more details

ASSERT_INITIALEnsure that data object value is initialPublic
CALL METHOD cl_abap_unit_assert=>ASSERT_INITIAL...more details

ASSERT_NOT_BOUNDEnsure invalidity of the reference of a reference variablePublic
CALL METHOD cl_abap_unit_assert=>ASSERT_NOT_BOUND...more details

ASSERT_NOT_INITIALEnsure that value of data object is not initialPublic
CALL METHOD cl_abap_unit_assert=>ASSERT_NOT_INITIAL...more details

ASSERT_NUMBER_BETWEENEnsure that number is in given rangePublic
CALL METHOD cl_abap_unit_assert=>ASSERT_NUMBER_BETWEEN...more details

ASSERT_SUBRCEnsure specific value of return codePublic
CALL METHOD cl_abap_unit_assert=>ASSERT_SUBRC...more details

ASSERT_TABLE_CONTAINSEnsure that data is contained as line within internal tablePublic
CALL METHOD cl_abap_unit_assert=>ASSERT_TABLE_CONTAINS...more details

ASSERT_TABLE_NOT_CONTAINSEnsure that data is not contained as line in internal tablePublic
CALL METHOD cl_abap_unit_assert=>ASSERT_TABLE_NOT_CONTAINS...more details

ASSERT_TEXT_MATCHESEnsure that text matches regular expressionPublic
CALL METHOD cl_abap_unit_assert=>ASSERT_TEXT_MATCHES...more details

ASSERT_THATEnsure that a constraint is met by data objectPublic
CALL METHOD cl_abap_unit_assert=>ASSERT_THAT...more details

ASSERT_TRUEEnsure that boolean equals ABAP_TRUEPublic
CALL METHOD cl_abap_unit_assert=>ASSERT_TRUE...more details

FAILReport unconditional assertionPublic
CALL METHOD cl_abap_unit_assert=>FAIL...more details



CL_ABAP_UNIT_ASSERT attributes

List of attributes within class CL_ABAP_CHAR_UTILITIES. These can be referenced using the following syntax CL_ABAP_CHAR_UTILITIES=>. Although depending on where you are inserting the ABAP code you do need to check if the attribute is public or private.

NameLevelDescriptionInitial ValueTypeVisability
FG_NUM_CALLEDStatic AttributeNumber of Invocations0LIKE
I
Private
RTOL_DEFAULTConstantDefault Tolerance for comparion type F'1.E-14'LIKE
F
Public
RTOL_MINConstantMinimum Tolerance for comparsion type F'1.E-15'LIKE
F
Private




CL_ABAP_UNIT_ASSERT types

N1 -

Links to Related Class(s)

CL_ABAP_...
Full list of available SAP object classes

Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!