All files / src/ui zcl_abapgit_ui_injector.clas.testclasses.abap

72.02% Statements 103/143
100% Branches 0/0
0% Functions 0/6
72.02% Lines 103/143

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 1441x 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_abapgit_popups_mock DEFINITION FOR TESTING.
 
  PUBLIC SECTION.
    INTERFACES: zif_abapgit_popups.
 
ENDCLASS.
 
CLASS ltcl_no_dependency_injection DEFINITION FOR TESTING
                              RISK LEVEL HARMLESS
                              DURATION SHORT.
 
  PRIVATE SECTION.
    METHODS:
      no_injection FOR TESTING RAISING cx_static_check.
 
ENDCLASS.
 
CLASS ltcl_simple_dependency_inject DEFINITION FOR TESTING
                                  RISK LEVEL HARMLESS
                                  DURATION SHORT.
 
  PRIVATE SECTION.
    METHODS:
      setup,
      simple_injection FOR TESTING RAISING cx_static_check.
 
ENDCLASS.
 
CLASS ltcl_abapgit_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_to_confirm.
 
  ENDMETHOD.
 
  METHOD zif_abapgit_popups~popup_to_create_package.

  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 zif_abapgit_popups~popup_search_help.
 
  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.
 
CLASS ltcl_no_dependency_injection IMPLEMENTATION.
 
  METHOD no_injection.

    DATA: li_popups      TYPE REF TO zif_abapgit_popups,
          lo_class_descr TYPE REF TO cl_abap_classdescr.

    li_popups = zcl_abapgit_ui_factory=>get_popups( ).

    lo_class_descr ?= cl_abap_classdescr=>describe_by_object_ref( li_popups ).

    cl_abap_unit_assert=>assert_equals(
      exp = '\CLASS=ZCL_ABAPGIT_POPUPS'
      act = lo_class_descr->absolute_name ).

  ENDMETHOD.
 
ENDCLASS.
 
CLASS ltcl_simple_dependency_inject IMPLEMENTATION.
 
  METHOD setup.

    DATA: lo_popups_mock TYPE REF TO ltcl_abapgit_popups_mock.

    CREATE OBJECT lo_popups_mock.

    zcl_abapgit_ui_injector=>set_popups( lo_popups_mock ).

  ENDMETHOD.
 
  METHOD simple_injection.

    DATA: li_popups      TYPE REF TO zif_abapgit_popups,
          lo_class_descr TYPE REF TO cl_abap_classdescr.

    li_popups = zcl_abapgit_ui_factory=>get_popups( ).

    lo_class_descr ?= cl_abap_classdescr=>describe_by_object_ref( li_popups ).

    cl_abap_unit_assert=>assert_equals(
      exp = '\CLASS-POOL=ZCL_ABAPGIT_UI_INJECTOR\CLASS=LTCL_ABAPGIT_POPUPS_MOCK'
      act = lo_class_descr->absolute_name ).

  ENDMETHOD.
 
ENDCLASS.