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
30 days agoBernardine
9 days agoSheldon
15 days agoBettina
18 days agoLauna
1 months agoNancey
1 months agoAlpha
1 months agoTresa
1 months agoLindsey
1 months agoShannon
7 days agoDonte
8 days agoMacy
12 days agoFlorinda
1 months agoThaddeus
1 months agoLayla
1 months agoKarl
1 months agoLauna
2 months agoNancey
2 months agoLoren
2 months agoKatina
1 months agoSherell
1 months agoCassi
1 months agoPage
1 months agoGlory
2 months agoRonnie
1 months agoSheldon
1 months agoLoreta
2 months agoDomonique
2 months ago