Created
February 15, 2022 07:12
-
-
Save larshp/f427c0cb86426735617182e3d317cace to your computer and use it in GitHub Desktop.
unit test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLASS ltcl_test DEFINITION FOR TESTING DURATION SHORT RISK LEVEL HARMLESS FINAL. | |
PRIVATE SECTION. | |
DATA mo_cut TYPE REF TO zcl_unit_test. | |
METHODS setup. | |
METHODS calc FOR TESTING RAISING cx_static_check. | |
ENDCLASS. | |
CLASS ltcl_test IMPLEMENTATION. | |
METHOD setup. | |
mo_cut = NEW #( ). | |
ENDMETHOD. | |
METHOD calc. | |
DATA(result) = mo_cut->calc( | |
val1 = 2 | |
val2 = 2 ). | |
cl_abap_unit_assert=>assert_equals( | |
act = result | |
exp = 4 ). | |
ENDMETHOD. | |
ENDCLASS. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment