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 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 | 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 1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 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 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 | CLASS ltcl_sap_package_mock DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS. PUBLIC SECTION. INTERFACES: zif_abapgit_sap_package. CONSTANTS: BEGIN OF c_package, existing TYPE devclass VALUE '$EXISTING', non_existing TYPE devclass VALUE '$NON_EXISTING', user TYPE devclass VALUE '$USER', END OF c_package. METHODS: constructor IMPORTING iv_package TYPE devclass, was_create_called RETURNING VALUE(rv_create_called) TYPE abap_bool. PRIVATE SECTION. DATA: mv_package TYPE devclass, BEGIN OF ms_called, create TYPE abap_bool, END OF ms_called. ENDCLASS. CLASS ltcl_popups_mock DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS. PUBLIC SECTION. TYPES: ty_user_decision TYPE string. CONSTANTS: BEGIN OF c_user_decision, cancel TYPE ty_user_decision VALUE 'cancel', confirm TYPE ty_user_decision VALUE 'confirm', END OF c_user_decision. INTERFACES: zif_abapgit_popups. METHODS: was_create_package_popup_shown RETURNING VALUE(rv_popup_shown) TYPE abap_bool, set_user_decision IMPORTING iv_user_decision TYPE ty_user_decision, set_package IMPORTING iv_package TYPE devclass. PRIVATE SECTION. DATA: BEGIN OF ms_called, popup_to_create_package TYPE abap_bool, END OF ms_called, mv_user_decision TYPE ty_user_decision, mv_package TYPE devclass. ENDCLASS. CLASS ltcl_create_package DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS. PUBLIC SECTION. PRIVATE SECTION. DATA: mv_package TYPE devclass, mx_error TYPE REF TO zcx_abapgit_exception, mo_popups_mock TYPE REF TO ltcl_popups_mock, mo_sap_package_mock TYPE REF TO ltcl_sap_package_mock, mv_created_package TYPE devclass. METHODS: setup, raise_error_if_package_exists FOR TESTING RAISING cx_static_check, package_given_in_popup FOR TESTING RAISING cx_static_check, package_not_created_when_canc FOR TESTING RAISING cx_static_check, package_created_when_confirm FOR TESTING RAISING cx_static_check, given_existing_package, given_non_existing_package, given_user_cancels_popup, given_user_confirms_popup, given_no_package, given_package_by_user, when_create_package, then_error_is_raised, then_popup_is_shown, then_no_package_is_created, then_package_is_created, then_no_error_is_raised. ENDCLASS. CLASS ltcl_create_package IMPLEMENTATION. METHOD setup. CREATE OBJECT mo_popups_mock TYPE ltcl_popups_mock. zcl_abapgit_ui_injector=>set_popups( mo_popups_mock ). ENDMETHOD. METHOD raise_error_if_package_exists. given_existing_package( ). when_create_package( ). then_error_is_raised( ). ENDMETHOD. METHOD package_given_in_popup. given_no_package( ). given_package_by_user( ). given_user_confirms_popup( ). when_create_package( ). then_no_error_is_raised( ). then_popup_is_shown( ). then_package_is_created( ). ENDMETHOD. METHOD package_not_created_when_canc. given_non_existing_package( ). given_user_cancels_popup( ). when_create_package( ). then_popup_is_shown( ). then_no_package_is_created( ). ENDMETHOD. METHOD package_created_when_confirm. given_non_existing_package( ). given_user_confirms_popup( ). when_create_package( ). then_popup_is_shown( ). then_package_is_created( ). ENDMETHOD. METHOD when_create_package. CREATE OBJECT mo_sap_package_mock EXPORTING iv_package = mv_package. zcl_abapgit_injector=>set_sap_package( iv_package = mv_package ii_sap_package = mo_sap_package_mock ). TRY. mv_created_package = zcl_abapgit_services_repo=>create_package( mv_package ). CATCH zcx_abapgit_exception INTO mx_error. ENDTRY. ENDMETHOD. METHOD given_existing_package. mv_package = ltcl_sap_package_mock=>c_package-existing. ENDMETHOD. METHOD given_non_existing_package. mv_package = ltcl_sap_package_mock=>c_package-non_existing. ENDMETHOD. METHOD then_error_is_raised. cl_abap_unit_assert=>assert_bound( mx_error ). ENDMETHOD. METHOD then_no_error_is_raised. cl_abap_unit_assert=>assert_not_bound( mx_error ). ENDMETHOD. METHOD then_popup_is_shown. cl_abap_unit_assert=>assert_equals( act = mo_popups_mock->was_create_package_popup_shown( ) exp = abap_true ). ENDMETHOD. METHOD given_user_cancels_popup. mo_popups_mock->set_user_decision( ltcl_popups_mock=>c_user_decision-cancel ). ENDMETHOD. METHOD then_no_package_is_created. cl_abap_unit_assert=>assert_equals( act = mo_sap_package_mock->was_create_called( ) exp = abap_false ). ENDMETHOD. METHOD given_user_confirms_popup. mo_popups_mock->set_user_decision( ltcl_popups_mock=>c_user_decision-confirm ). ENDMETHOD. METHOD then_package_is_created. cl_abap_unit_assert=>assert_equals( act = mo_sap_package_mock->was_create_called( ) exp = abap_true ). cl_abap_unit_assert=>assert_equals( exp = mv_package act = mv_created_package ). ENDMETHOD. METHOD given_no_package. CLEAR: mv_package. ENDMETHOD. METHOD given_package_by_user. mo_popups_mock->set_package( ltcl_sap_package_mock=>c_package-user ). ENDMETHOD. ENDCLASS. CLASS ltcl_sap_package_mock IMPLEMENTATION. METHOD constructor. mv_package = iv_package. ENDMETHOD. METHOD zif_abapgit_sap_package~read_responsible. RETURN. ENDMETHOD. METHOD zif_abapgit_sap_package~validate_name. RETURN. ENDMETHOD. METHOD zif_abapgit_sap_package~read_description. ENDMETHOD. METHOD zif_abapgit_sap_package~are_changes_recorded_in_tr_req. ENDMETHOD. METHOD zif_abapgit_sap_package~create. ms_called-create = abap_true. ENDMETHOD. METHOD zif_abapgit_sap_package~create_child. ENDMETHOD. METHOD zif_abapgit_sap_package~create_local. ENDMETHOD. METHOD zif_abapgit_sap_package~exists. rv_bool = boolc( c_package-existing = mv_package ). ENDMETHOD. METHOD zif_abapgit_sap_package~get_transport_type. ENDMETHOD. METHOD zif_abapgit_sap_package~list_subpackages. ENDMETHOD. METHOD zif_abapgit_sap_package~list_superpackages. ENDMETHOD. METHOD zif_abapgit_sap_package~read_parent. ENDMETHOD. METHOD was_create_called. rv_create_called = ms_called-create. ENDMETHOD. ENDCLASS. CLASS ltcl_popups_mock IMPLEMENTATION. METHOD zif_abapgit_popups~branch_list_popup. ENDMETHOD. METHOD zif_abapgit_popups~commit_list_popup. ENDMETHOD. METHOD zif_abapgit_popups~create_branch_popup. ENDMETHOD. METHOD zif_abapgit_popups~popup_folder_logic. ENDMETHOD. METHOD zif_abapgit_popups~popup_search_help. ENDMETHOD. METHOD zif_abapgit_popups~popup_to_confirm. ENDMETHOD. METHOD zif_abapgit_popups~popup_to_create_package. ms_called-popup_to_create_package = abap_true. CASE mv_user_decision. WHEN c_user_decision-cancel. ev_create = abap_false. WHEN c_user_decision-confirm. ev_create = abap_true. WHEN OTHERS. cl_abap_unit_assert=>fail( ). ENDCASE. ENDMETHOD. METHOD zif_abapgit_popups~popup_to_create_transp_branch. ENDMETHOD. METHOD zif_abapgit_popups~popup_to_select_from_list. ENDMETHOD. METHOD zif_abapgit_popups~popup_to_select_transport. ENDMETHOD. METHOD zif_abapgit_popups~popup_transport_request. ENDMETHOD. METHOD was_create_package_popup_shown. rv_popup_shown = ms_called-popup_to_create_package. ENDMETHOD. METHOD set_user_decision. mv_user_decision = iv_user_decision. ENDMETHOD. METHOD set_package. mv_package = iv_package. ENDMETHOD. METHOD zif_abapgit_popups~popup_select_tr_requests. ENDMETHOD. METHOD zif_abapgit_popups~popup_select_wb_tc_tr_and_tsk. ENDMETHOD. METHOD zif_abapgit_popups~tag_list_popup. ENDMETHOD. METHOD zif_abapgit_popups~popup_to_select_labels. ENDMETHOD. METHOD zif_abapgit_popups~choose_code_insp_check_variant. ENDMETHOD. ENDCLASS. |