diff --git a/src/git/zcl_abapgit_git_add_patch.clas.testclasses.abap b/src/git/zcl_abapgit_git_add_patch.clas.testclasses.abap index f236c6858..d5e3da551 100644 --- a/src/git/zcl_abapgit_git_add_patch.clas.testclasses.abap +++ b/src/git/zcl_abapgit_git_add_patch.clas.testclasses.abap @@ -26,8 +26,6 @@ CLASS ltcl_calculate_patch DEFINITION FINAL FOR TESTING unknown_result_type FOR TESTING RAISING cx_static_check. METHODS: - setup, - given_diff IMPORTING iv_patch_flag TYPE zif_abapgit_definitions=>ty_diff-patch_flag @@ -49,7 +47,6 @@ CLASS ltcl_calculate_patch DEFINITION FINAL FOR TESTING DATA: mt_diff TYPE zif_abapgit_definitions=>ty_diffs_tt, mt_patch TYPE stringtab, - mv_index TYPE sytabix, mx_error TYPE REF TO zcx_abapgit_exception. ENDCLASS. @@ -57,12 +54,6 @@ ENDCLASS. CLASS ltcl_calculate_patch IMPLEMENTATION. - METHOD setup. - - mv_index = 0. - - ENDMETHOD. - DEFINE given_diff. given_diff( iv_patch_flag = &1 @@ -84,10 +75,10 @@ CLASS ltcl_calculate_patch IMPLEMENTATION. when_patch_is_calculated( ). - then_patch_should_be(: - ' ' ), - 'write: `Test`.' ), - ' ' ). + then_patch_should_be( + |\n| && + |write: `Test`.\n| && + |\n| ). ENDMETHOD. @@ -102,11 +93,11 @@ CLASS ltcl_calculate_patch IMPLEMENTATION. when_patch_is_calculated( ). - then_patch_should_be(: - ' ' ), - 'write: `Test`.' ), - 'write: `Hello world`.' ), - ' ' ). + then_patch_should_be( + |\n| && + |write: `Test`.\n| && + |write: `Hello world`.\n| && + |\n| ). ENDMETHOD. @@ -122,12 +113,12 @@ CLASS ltcl_calculate_patch IMPLEMENTATION. when_patch_is_calculated( ). - then_patch_should_be(: - ' ' ), - 'write: `Test`.' ), - ' ' ), - 'write: `Hello world`.' ), - ' ' ). + then_patch_should_be( + |\n| && + |write: `Test`.\n| && + |\n| && + |write: `Hello world`.\n| && + |\n| ). ENDMETHOD. @@ -143,11 +134,11 @@ CLASS ltcl_calculate_patch IMPLEMENTATION. when_patch_is_calculated( ). - then_patch_should_be(: - ' ' ), - 'write: `Test`.' ), - ' ' ), - ' ' ). + then_patch_should_be( + |\n| && + |write: `Test`.\n| && + |\n| && + |\n| ). ENDMETHOD. @@ -161,9 +152,7 @@ CLASS ltcl_calculate_patch IMPLEMENTATION. when_patch_is_calculated( ). - then_patch_should_be(: - ' ' ), - ' ' ). + then_patch_should_be( |\n\n| ). ENDMETHOD. @@ -178,9 +167,7 @@ CLASS ltcl_calculate_patch IMPLEMENTATION. when_patch_is_calculated( ). - then_patch_should_be(: - ' ' ), - ' ' ). + then_patch_should_be( |\n\n| ). ENDMETHOD. @@ -196,10 +183,10 @@ CLASS ltcl_calculate_patch IMPLEMENTATION. when_patch_is_calculated( ). - then_patch_should_be(: - ' ' ), - 'write: `Hello world`.' ), - ' ' ). + then_patch_should_be( + |\n| && + |write: `Hello world`.| && + |\n| ). ENDMETHOD. @@ -216,10 +203,11 @@ CLASS ltcl_calculate_patch IMPLEMENTATION. when_patch_is_calculated( ). - then_patch_should_be( ' ' ). - then_patch_should_be( 'write: `Hello world`.' ). - then_patch_should_be( 'write: `Hello 123`.' ). - then_patch_should_be( ' ' ). + then_patch_should_be( + |\n| && + |write: `Hello world`.\n| && + |write: `Hello 123`.\n| && + |\n| ). ENDMETHOD. @@ -233,10 +221,10 @@ CLASS ltcl_calculate_patch IMPLEMENTATION. when_patch_is_calculated( ). - then_patch_should_be(: - ' ' ), - 'write: `Hello world`.' ), - ' ' ). + then_patch_should_be( + |\n| && + |write: `Hello world`.\n| && + |\n| ). ENDMETHOD. @@ -251,11 +239,11 @@ CLASS ltcl_calculate_patch IMPLEMENTATION. when_patch_is_calculated( ). - then_patch_should_be(: - ' ' ), - 'write: `Hello world`.' ), - 'write: `Test`.' ), - ' ' ). + then_patch_should_be( + |\n| && + |write: `Hello world`.\n| && + |write: `Test`.\n| && + |\n| ). ENDMETHOD. @@ -271,12 +259,12 @@ CLASS ltcl_calculate_patch IMPLEMENTATION. when_patch_is_calculated( ). - then_patch_should_be(: - ' ' ), - 'write: `Hello world`.' ), - ' ' ), - 'write: `Test`.' ), - ' ' ). + then_patch_should_be( + |\n| && + |write: `Hello world`.\n| && + |\n| && + |write: `Test`.\n| && + |\n| ). ENDMETHOD. @@ -292,12 +280,12 @@ CLASS ltcl_calculate_patch IMPLEMENTATION. when_patch_is_calculated( ). - then_patch_should_be(: - ' ' ), - 'write: `Hello world`.' ), - ' ' ), - 'write: `Hello world`.' ), - ' ' ). + then_patch_should_be( + |\n| && + |write: `Hello world`.\n| && + |\n| && + |write: `Hello world`.\n| && + |\n| ). ENDMETHOD. @@ -314,13 +302,13 @@ CLASS ltcl_calculate_patch IMPLEMENTATION. when_patch_is_calculated( ). - then_patch_should_be(: - ' ' ), - 'write: `Hello world`.' ), - ' ' ), - 'write: `Hello world`.' ), - ' ' ), - 'write: `newline`.' ). + then_patch_should_be( + |\n| && + |write: `Hello world`.\n| && + |\n| && + |write: `Hello world`.\n| && + |\n| && + |write: `newline`.\n| ). ENDMETHOD. @@ -372,16 +360,22 @@ CLASS ltcl_calculate_patch IMPLEMENTATION. METHOD then_patch_should_be. - FIELD-SYMBOLS: LIKE LINE OF mt_patch. + DATA: lv_index TYPE i, + lt_patch TYPE STANDARD TABLE OF string WITH DEFAULT KEY, + lv_patch LIKE LINE OF lt_patch. - mv_index = mv_index + 1. + FIELD-SYMBOLS: LIKE LINE OF mt_patch. - READ TABLE mt_patch INDEX mv_index - ASSIGNING . + SPLIT iv_exp_patch AT |\n| INTO TABLE lt_patch IN CHARACTER MODE. - cl_abap_unit_assert=>assert_equals( - exp = iv_exp_patch - act = ). + LOOP AT lt_patch INTO lv_patch. + READ TABLE mt_patch INDEX sy-tabix ASSIGNING . + cl_abap_unit_assert=>assert_subrc( ). + + cl_abap_unit_assert=>assert_equals( + exp = lv_patch + act = ). + ENDLOOP. ENDMETHOD. diff --git a/src/ui/zcl_abapgit_gui_page_commit.clas.abap b/src/ui/zcl_abapgit_gui_page_commit.clas.abap index aad25c0d3..e635c1b96 100644 --- a/src/ui/zcl_abapgit_gui_page_commit.clas.abap +++ b/src/ui/zcl_abapgit_gui_page_commit.clas.abap @@ -273,8 +273,8 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_COMMIT IMPLEMENTATION. ro_html->add( '' ). ro_html->add( '' ). - ro_html->add( ''). - ro_html->add( ''). + ro_html->add( '' ). + ro_html->add( '' ). ro_html->add( '' ). ro_html->add( '' ). diff --git a/src/ui/zcl_abapgit_gui_page_stage.clas.abap b/src/ui/zcl_abapgit_gui_page_stage.clas.abap index 74535516e..7eff1c411 100644 --- a/src/ui/zcl_abapgit_gui_page_stage.clas.abap +++ b/src/ui/zcl_abapgit_gui_page_stage.clas.abap @@ -363,7 +363,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_STAGE IMPLEMENTATION. iv_changed_by = ls_changed_by-name ) ). AT LAST. - ro_html->add(''). + ro_html->add( '' ). ENDAT. ENDLOOP. @@ -386,7 +386,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_STAGE IMPLEMENTATION. is_file = ) ). AT LAST. - ro_html->add(''). + ro_html->add( '' ). ENDAT. ENDLOOP. diff --git a/src/zcl_abapgit_repo.clas.abap b/src/zcl_abapgit_repo.clas.abap index 7588cbc9c..37ceb2277 100644 --- a/src/zcl_abapgit_repo.clas.abap +++ b/src/zcl_abapgit_repo.clas.abap @@ -177,7 +177,7 @@ CLASS ZCL_ABAPGIT_REPO IMPLEMENTATION. deserialize_checks( ). IF is_checks-requirements-met = 'N' AND is_checks-requirements-decision IS INITIAL. - zcx_abapgit_exception=>raise( 'Requirements not met and undecided '). + zcx_abapgit_exception=>raise( 'Requirements not met and undecided' ). ENDIF. IF is_checks-transport-required = abap_true AND is_checks-transport-transport IS INITIAL. diff --git a/src/zcl_abapgit_transport_objects.clas.testclasses.abap b/src/zcl_abapgit_transport_objects.clas.testclasses.abap index ff9d8be3f..b32990ec1 100644 --- a/src/zcl_abapgit_transport_objects.clas.testclasses.abap +++ b/src/zcl_abapgit_transport_objects.clas.testclasses.abap @@ -337,7 +337,7 @@ CLASS ltcl_transport_objects IMPLEMENTATION. TRY. when_staging( ). - cl_abap_unit_assert=>fail( 'Should have raised exception'). + cl_abap_unit_assert=>fail( 'Should have raised exception' ). CATCH zcx_abapgit_exception INTO lx_exception. cl_abap_unit_assert=>assert_equals( act = lx_exception->get_text( )
Staged files
Staged files