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?
Sabra
2 months agoBernardine
1 months agoSheldon
1 months agoBettina
2 months agoLauna
2 months agoNancey
2 months agoAlpha
2 months agoTresa
2 months agoLindsey
2 months agoShannon
1 months agoDonte
1 months agoMacy
1 months agoFlorinda
2 months agoThaddeus
2 months agoLayla
2 months agoKarl
2 months agoLauna
3 months agoNancey
3 months agoLoren
3 months agoKatina
2 months agoSherell
2 months agoCassi
2 months agoPage
2 months agoGlory
3 months agoRonnie
2 months agoSheldon
2 months agoLoreta
2 months agoDomonique
3 months ago