C_ABAPD_2309日本語 無料問題集「SAP Certified Associate - Back-End Developer - ABAP Cloud (C_ABAPD_2309日本語版)」
テスト メソッドでは、メソッド cl_abap_unit_assert=>assert_equals( .. ) を次のように呼び出します。
クラス Itcl1 テストの定義 リスクレベル 無害 期間 短い。
プライベートセクション。
テスト方法 m1。
エンドクラス。
クラス Itcl1 実装。
方法m1.
データ: go_test_object 型は zcl_to_be_tested を参照します。
定数: Ico_exp 型 文字列 値 'test2'。
オブジェクト go_test_object を作成します。
cl_abap_unit_assert=>assert_equals(
輸出
行為 = go_class->mv_attribute
exp = lco_exp
msg = 'assert equals failed ' && go_test_object->mv_attribute && ' ' && lco_exp ENDMETHOD。
エンドクラス。
メソッドパラメータ act と exp が等しくない場合はどうなりますか?
クラス Itcl1 テストの定義 リスクレベル 無害 期間 短い。
プライベートセクション。
テスト方法 m1。
エンドクラス。
クラス Itcl1 実装。
方法m1.
データ: go_test_object 型は zcl_to_be_tested を参照します。
定数: Ico_exp 型 文字列 値 'test2'。
オブジェクト go_test_object を作成します。
cl_abap_unit_assert=>assert_equals(
輸出
行為 = go_class->mv_attribute
exp = lco_exp
msg = 'assert equals failed ' && go_test_object->mv_attribute && ' ' && lco_exp ENDMETHOD。
エンドクラス。
メソッドパラメータ act と exp が等しくない場合はどうなりますか?
正解:A
解答を投票する