In a test method you call method cl_abap_unit_assert=>assert_equals( .. ) in the following way:
CLASS Itcl1 DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT.
PRIVATE SECTION.
METHODS m1 FOR TESTING.
ENDCLASS.
CLASS Itcl1 IMPLEMENTATION.
METHOD m1.
DATA: go_test_object TYPE REF TO zcl_to_be_tested.
CONSTANTS: Ico_exp TYPE string VALUE 'test2'.
CREATE OBJECT go_test_object.
cl_abap_unit_assert=>assert_equals(
EXPORTING
act = go_class->mv_attribute
exp = lco_exp
msg = 'assert equals failed ' && go_test_object->mv_attribute && ' ' && lco_exp
ENDMETHOD.
ENDCLASS.
What will happen if method parameters act and exp are not equal?
Georgeanna
6 months agoCordelia
5 months agoNu
5 months agoSanda
6 months agoScot
5 months agoNu
5 months agoAlline
6 months agoMelina
6 months agoVirgilio
6 months agoSharika
6 months agoIsidra
6 months agoBuddy
7 months agoKristeen
6 months agoEladia
6 months agoMelvin
6 months agoJeanice
7 months agoGarry
7 months ago