C_ABAPD_2309-JPN 試験問題 36
テスト メソッドでは、メソッド 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 が等しくない場合はどうなりますか?
C_ABAPD_2309-JPN 試験問題 37
SAP では、ソートされたテーブルとハッシュされたテーブルをそれぞれいつ使用することを推奨していますか? 注: この質問には 2 つの正解があります。
