Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 2x 2x 2x 2x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 3x 3x 3x 3x 3x 3x 3x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 3x 3x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x | CLASS ltcl_normalize_program_name DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS. PRIVATE SECTION. DATA: mo_chunk_lib TYPE REF TO zcl_abapgit_gui_chunk_lib. METHODS: setup, class FOR TESTING RAISING cx_static_check, program FOR TESTING RAISING cx_static_check. ENDCLASS. CLASS ltd_repo DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS. PUBLIC SECTION. INTERFACES zif_abapgit_repo. DATA ms_data TYPE zif_abapgit_persistence=>ty_repo READ-ONLY. METHODS set_display_name IMPORTING !iv_display_name TYPE csequence. ENDCLASS. CLASS ltd_repo_srv DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS. PUBLIC SECTION. INTERFACES zif_abapgit_repo_srv. METHODS add_repository IMPORTING !iv_display_name TYPE csequence. PRIVATE SECTION. DATA mt_repositories TYPE STANDARD TABLE OF REF TO ltd_repo. ENDCLASS. CLASS ltcl_render_repo DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS. PRIVATE SECTION. DATA: mo_chunk_lib TYPE REF TO zcl_abapgit_gui_chunk_lib. DATA mo_repo_srv TYPE REF TO ltd_repo_srv. METHODS: setup, render_repo_palette_display_nm FOR TESTING RAISING cx_static_check. ENDCLASS. CLASS zcl_abapgit_gui_chunk_lib DEFINITION LOCAL FRIENDS ltcl_normalize_program_name ltcl_render_repo. CLASS ltcl_normalize_program_name IMPLEMENTATION. METHOD setup. CREATE OBJECT mo_chunk_lib. ENDMETHOD. METHOD class. cl_abap_unit_assert=>assert_equals( act = mo_chunk_lib->normalize_program_name( 'ZCL_ABAPGIT_FRONTEND_SERVICES=CP' ) exp = `ZCL_ABAPGIT_FRONTEND_SERVICES` ). ENDMETHOD. METHOD program. cl_abap_unit_assert=>assert_equals( act = mo_chunk_lib->normalize_program_name( 'ZABAPGIT_FULL' ) exp = `ZABAPGIT_FULL` ). cl_abap_unit_assert=>assert_equals( act = mo_chunk_lib->normalize_program_name( 'ZSOME_PROG_ENDING_WITH_CP' ) exp = `ZSOME_PROG_ENDING_WITH_CP` ). ENDMETHOD. ENDCLASS. CLASS ltd_repo_srv IMPLEMENTATION. METHOD add_repository. DATA lo_new_repo TYPE REF TO ltd_repo. CREATE OBJECT lo_new_repo. lo_new_repo->set_display_name( iv_display_name ). APPEND lo_new_repo TO mt_repositories. ENDMETHOD. METHOD zif_abapgit_repo_srv~list. DATA lo_test_double_repo TYPE REF TO ltd_repo. DATA lo_abapgit_repo TYPE REF TO zif_abapgit_repo. LOOP AT mt_repositories INTO lo_test_double_repo. lo_abapgit_repo ?= lo_test_double_repo. APPEND lo_test_double_repo TO rt_list. ENDLOOP. ENDMETHOD. METHOD zif_abapgit_repo_srv~delete. ENDMETHOD. METHOD zif_abapgit_repo_srv~get. ENDMETHOD. METHOD zif_abapgit_repo_srv~get_label_list. ENDMETHOD. METHOD zif_abapgit_repo_srv~get_repo_from_package. ENDMETHOD. METHOD zif_abapgit_repo_srv~get_repo_from_url. ENDMETHOD. METHOD zif_abapgit_repo_srv~init. ENDMETHOD. METHOD zif_abapgit_repo_srv~is_repo_installed. ENDMETHOD. METHOD zif_abapgit_repo_srv~list_favorites. ENDMETHOD. METHOD zif_abapgit_repo_srv~new_offline. ENDMETHOD. METHOD zif_abapgit_repo_srv~new_online. ENDMETHOD. METHOD zif_abapgit_repo_srv~purge. ENDMETHOD. METHOD zif_abapgit_repo_srv~validate_package. ENDMETHOD. METHOD zif_abapgit_repo_srv~validate_url. ENDMETHOD. ENDCLASS. CLASS ltd_repo IMPLEMENTATION. METHOD set_display_name. ms_data-local_settings-display_name = iv_display_name. ENDMETHOD. METHOD zif_abapgit_repo~get_name. rv_name = ms_data-local_settings-display_name. ENDMETHOD. METHOD zif_abapgit_repo~get_files_local_filtered. ENDMETHOD. METHOD zif_abapgit_repo~checksums. ENDMETHOD. METHOD zif_abapgit_repo~deserialize. ENDMETHOD. METHOD zif_abapgit_repo~deserialize_checks. ENDMETHOD. METHOD zif_abapgit_repo~get_dot_abapgit. ENDMETHOD. METHOD zif_abapgit_repo~get_files_local. ENDMETHOD. METHOD zif_abapgit_repo~get_files_remote. ENDMETHOD. METHOD zif_abapgit_repo~get_key. ENDMETHOD. METHOD zif_abapgit_repo~get_local_settings. ENDMETHOD. METHOD zif_abapgit_repo~get_tadir_objects. ENDMETHOD. METHOD zif_abapgit_repo~get_package. ENDMETHOD. METHOD zif_abapgit_repo~has_remote_source. ENDMETHOD. METHOD zif_abapgit_repo~is_offline. ENDMETHOD. METHOD zif_abapgit_repo~refresh. ENDMETHOD. METHOD zif_abapgit_repo~set_dot_abapgit. ENDMETHOD. METHOD zif_abapgit_repo~find_remote_dot_abapgit. ENDMETHOD. ENDCLASS. CLASS ltcl_render_repo IMPLEMENTATION. METHOD setup. CREATE OBJECT mo_repo_srv. zcl_abapgit_repo_srv=>inject_instance( mo_repo_srv ). CREATE OBJECT mo_chunk_lib. ENDMETHOD. METHOD render_repo_palette_display_nm. DATA lx_abapgit TYPE REF TO zcx_abapgit_exception. DATA lo_html TYPE REF TO zif_abapgit_html. DATA lv_html_as_string TYPE string. mo_repo_srv->add_repository( |Simple test| ). mo_repo_srv->add_repository( |'Single' quotation marks| ). mo_repo_srv->add_repository( |"Double quotation marks"| ). TRY. lo_html = mo_chunk_lib->render_repo_palette( zif_abapgit_definitions=>c_action-go_repo ). lv_html_as_string = lo_html->render( ). cl_abap_unit_assert=>assert_char_cp( act = lv_html_as_string exp = |*displayName: "Simple test"*| ). cl_abap_unit_assert=>assert_char_cp( act = lv_html_as_string exp = |*displayName: "\\'Single\\' quotation marks"*| ). cl_abap_unit_assert=>assert_char_cp( act = lv_html_as_string exp = |*displayName: "\\"Double quotation marks\\""*| ). CATCH zcx_abapgit_exception INTO lx_abapgit. cl_abap_unit_assert=>fail( msg = 'abapGit exception' detail = lx_abapgit->get_text( ) ). ENDTRY. ENDMETHOD. ENDCLASS. |