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