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

100% Statements 41/41
100% Branches 4/4
100% Functions 4/4
100% Lines 41/41

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 421x 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  
CLASS ltcl_frontend_services DEFINITION FOR TESTING RISK LEVEL HARMLESS
  DURATION SHORT FINAL.
 
  PRIVATE SECTION.
    DATA mo_cut TYPE REF TO zcl_abapgit_frontend_services.
 
    METHODS:
      setup,
      path_windows FOR TESTING,
      path_unix FOR TESTING,
      no_path FOR TESTING.
 
ENDCLASS.
 
CLASS zcl_abapgit_frontend_services DEFINITION LOCAL FRIENDS ltcl_frontend_services.
 
CLASS ltcl_frontend_services IMPLEMENTATION.
 
  METHOD setup.
    CREATE OBJECT mo_cut.
  ENDMETHOD.
 
  METHOD path_windows.
    cl_abap_unit_assert=>assert_equals(
      act = mo_cut->get_path_from_fullname( 'C:\SAPworkdir\hello\world.abap' )
      exp = 'C:\SAPworkdir\hello\' ).
  ENDMETHOD.
 
  METHOD path_unix.
    cl_abap_unit_assert=>assert_equals(
      act = mo_cut->get_path_from_fullname( '/var/tmp/world.abap' )
      exp = '/var/tmp/' ).
  ENDMETHOD.
 
  METHOD no_path.
    cl_abap_unit_assert=>assert_equals(
      act = mo_cut->get_path_from_fullname( 'toronto.abap' )
      exp = '' ).
  ENDMETHOD.
 
ENDCLASS.