All files / src zcl_abapgit_injector.clas.abap

100% Statements 114/114
100% Branches 1/1
100% Functions 0/0
100% Lines 114/114

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 1151x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 14x 14x 14x 14x 14x 14x 14x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x  
CLASS zcl_abapgit_injector DEFINITION
  PUBLIC
  FOR TESTING
  CREATE PRIVATE.
 
  PUBLIC SECTION.
 
    CLASS-METHODS set_tadir
      IMPORTING
        !ii_tadir TYPE REF TO zif_abapgit_tadir .
    CLASS-METHODS set_sap_package
      IMPORTING
        !iv_package     TYPE devclass
        !ii_sap_package TYPE REF TO zif_abapgit_sap_package .
    CLASS-METHODS set_cts_api
      IMPORTING
        !ii_cts_api TYPE REF TO zif_abapgit_cts_api .
    CLASS-METHODS set_environment
      IMPORTING
        !ii_environment TYPE REF TO zif_abapgit_environment .
    CLASS-METHODS set_longtexts
      IMPORTING
        !ii_longtexts TYPE REF TO zif_abapgit_longtexts .
    CLASS-METHODS set_lxe_texts
      IMPORTING
        !ii_lxe_texts TYPE REF TO zif_abapgit_lxe_texts .
    CLASS-METHODS set_sap_namespace
      IMPORTING
        !ii_namespace TYPE REF TO zif_abapgit_sap_namespace .
    CLASS-METHODS set_sap_report
      IMPORTING
        !ii_report TYPE REF TO zif_abapgit_sap_report.
    CLASS-METHODS set_function_module
      IMPORTING
        ii_function_module TYPE REF TO zif_abapgit_function_module.
    CLASS-METHODS set_exit
      IMPORTING
        ii_exit TYPE REF TO zif_abapgit_exit.
  PROTECTED SECTION.
  PRIVATE SECTION.
ENDCLASS.
 
 
 
CLASS zcl_abapgit_injector IMPLEMENTATION.
 
 
  METHOD set_cts_api.
    zcl_abapgit_factory=>gi_cts_api = ii_cts_api.
  ENDMETHOD.
 
 
  METHOD set_environment.
    zcl_abapgit_factory=>gi_environment = ii_environment.
  ENDMETHOD.
 
 
  METHOD set_exit.
    zcl_abapgit_exit=>gi_global_exit = ii_exit.
  ENDMETHOD.
 
 
  METHOD set_function_module.
    zcl_abapgit_factory=>gi_function_module = ii_function_module.
  ENDMETHOD.
 
 
  METHOD set_longtexts.
    zcl_abapgit_factory=>gi_longtext = ii_longtexts.
  ENDMETHOD.
 
 
  METHOD set_lxe_texts.
    zcl_abapgit_factory=>gi_lxe_texts = ii_lxe_texts.
  ENDMETHOD.
 
 
  METHOD set_sap_namespace.
    zcl_abapgit_factory=>gi_sap_namespace = ii_namespace.
  ENDMETHOD.
 
 
  METHOD set_sap_package.
 
    DATA: ls_sap_package TYPE zcl_abapgit_factory=>ty_sap_package.
    FIELD-SYMBOLS: <ls_sap_package> TYPE zcl_abapgit_factory=>ty_sap_package.
 
    READ TABLE zcl_abapgit_factory=>gt_sap_package
         ASSIGNING <ls_sap_package>
         WITH TABLE KEY package = iv_package.
 
    IF sy-subrc <> 0.
 
      ls_sap_package-package = iv_package.
      INSERT ls_sap_package
             INTO TABLE zcl_abapgit_factory=>gt_sap_package
             ASSIGNING <ls_sap_package>.
 
    ENDIF.
 
    <ls_sap_package>-instance = ii_sap_package.
 
  ENDMETHOD.
 
 
  METHOD set_sap_report.
    zcl_abapgit_factory=>gi_sap_report = ii_report.
  ENDMETHOD.
 
 
  METHOD set_tadir.
    zcl_abapgit_factory=>gi_tadir = ii_tadir.
  ENDMETHOD.
ENDCLASS.