From cd87c97be7cb57dd672ddfe24aac119256592270 Mon Sep 17 00:00:00 2001 From: Lars Hvam Date: Fri, 2 Aug 2019 01:21:03 -0700 Subject: [PATCH] environment, add tests and fix dump (#2827) --- src/zcl_abapgit_environment.clas.abap | 2 +- ..._abapgit_environment.clas.testclasses.abap | 37 ++++++++++++++++++- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/src/zcl_abapgit_environment.clas.abap b/src/zcl_abapgit_environment.clas.abap index b053482a4..414612049 100644 --- a/src/zcl_abapgit_environment.clas.abap +++ b/src/zcl_abapgit_environment.clas.abap @@ -68,7 +68,7 @@ CLASS ZCL_ABAPGIT_ENVIRONMENT IMPLEMENTATION. CALL METHOD ('CL_APJ_SCP_TOOLS')=>('IS_RESTART_REQUIRED') RECEIVING restart_required = rv_result. - CATCH cx_sy_dyn_call_illegal_method. + CATCH cx_sy_dyn_call_illegal_method cx_sy_dyn_call_illegal_class. rv_result = abap_false. ENDTRY. ENDMETHOD. diff --git a/src/zcl_abapgit_environment.clas.testclasses.abap b/src/zcl_abapgit_environment.clas.testclasses.abap index 0c12a3b37..b544e1195 100644 --- a/src/zcl_abapgit_environment.clas.testclasses.abap +++ b/src/zcl_abapgit_environment.clas.testclasses.abap @@ -11,7 +11,12 @@ CLASS ltcl_test DEFINITION FOR TESTING METHODS: setup, - is_cloud FOR TESTING. + is_sap_cloud_platform FOR TESTING, + is_merged FOR TESTING, + is_repo_object_changes_allowed FOR TESTING, + compare_with_inactive FOR TESTING, + is_restart_required FOR TESTING. + ENDCLASS. @@ -23,11 +28,39 @@ CLASS ltcl_test IMPLEMENTATION. ENDMETHOD. - METHOD is_cloud. + METHOD is_sap_cloud_platform. mi_cut->is_sap_cloud_platform( ). * no assertions, just make sure the dynamic code runs ENDMETHOD. + METHOD is_merged. + + mi_cut->is_merged( ). +* no assertions, just make sure the dynamic code runs + + ENDMETHOD. + + METHOD is_repo_object_changes_allowed. + + mi_cut->is_repo_object_changes_allowed( ). +* no assertions, just make sure the dynamic code runs + + ENDMETHOD. + + METHOD compare_with_inactive. + + mi_cut->compare_with_inactive( ). +* no assertions, just make sure the dynamic code runs + + ENDMETHOD. + + METHOD is_restart_required. + + mi_cut->is_restart_required( ). +* no assertions, just make sure the dynamic code runs + + ENDMETHOD. + ENDCLASS.