anchor.diff:  
     METHOD run.
   
  -    DATA: lo_dot TYPE REF TO zcl_abapgit_dot_abapgit.
  +    DATA: lt_results TYPE zif_abapgit_definitions=>ty_results_tt,
  +          lo_dot     TYPE REF TO zcl_abapgit_dot_abapgit.
  +
   
       lo_dot = zcl_abapgit_dot_abapgit=>build_default( ).
   
  -    rt_results = zcl_abapgit_file_status=>calculate_status(
  -      iv_devclass  = '$Z$'
  +    lt_results = zcl_abapgit_file_status=>calculate_status(
  +      iv_devclass  = iv_devclass
         io_dot       = lo_dot
         it_local     = mt_local
         it_remote    = mt_remote
         it_cur_state = mt_state ).
   
  +    CREATE OBJECT ro_result
  +      EXPORTING
  +        it_results = lt_results.
  +
     ENDMETHOD.
   
   ENDCLASS.
  
positive.code: 
      FIELD-SYMBOLS: <ls_local> LIKE LINE OF mt_local.
  
  * todo
    ENDMETHOD.
  
    METHOD add_state.
  
negative.code: 
    ENDMETHOD.
  
    METHOD only_remote.
  
      mo_helper->add_remote(
        iv_filename = '$$zdoma1.doma.xml'
        iv_sha1     = 'D1' ).
  
      mo_result = mo_helper->run( ).
  
      mo_result->assert_lines( 1 ).
  
      cl_abap_unit_assert=>assert_equals(
        act = mo_result->get_line( 1 )-rstate
        exp = zif_abapgit_definitions=>gc_state-added ).
  
    ENDMETHOD.
  
    METHOD only_local.
  
      mo_helper->add_local(
        iv_obj_type = 'DOMA'
        iv_obj_name = '$$ZDOMA1'
        iv_filename = '$$zdoma1.doma.xml'
        iv_sha1     = 'D1' ).
  
      mo_result = mo_helper->run( ).
  
      mo_result->assert_lines( 1 ).
  
      cl_abap_unit_assert=>assert_equals(
        act = mo_result->get_line( 1 )-lstate
        exp = zif_abapgit_definitions=>gc_state-added ).
  
    ENDMETHOD.
  
    METHOD match.
  
      mo_helper->add_local(
        iv_obj_type = 'DOMA'
        iv_obj_name = '$$ZDOMA1'
        iv_filename = '$$zdoma1.doma.xml'
        iv_sha1     = 'D1' ).
  
      mo_helper->add_remote(
        iv_filename = '$$zdoma1.doma.xml'
        iv_sha1     = 'D1' ).
  
      mo_result = mo_helper->run( ).
  
      mo_result->assert_lines( 1 ).
  
      cl_abap_unit_assert=>assert_equals(
        act = mo_result->get_line( 1 )-match
        exp = abap_true ).
  
    ENDMETHOD.
  
    METHOD diff.
  
      mo_helper->add_local(
        iv_obj_type = 'DOMA'
        iv_obj_name = '$$ZDOMA1'
        iv_filename = '$$zdoma1.doma.xml'
        iv_sha1     = '12345' ).
  
      mo_helper->add_remote(
        iv_filename = '$$zdoma1.doma.xml'
        iv_sha1     = '54321' ).
  
      mo_result = mo_helper->run( ).
  
      mo_result->assert_lines( 1 ).
  
      cl_abap_unit_assert=>assert_equals(
        act = mo_result->get_line( 1 )-lstate
        exp = zif_abapgit_definitions=>gc_state-modified ).
  
      cl_abap_unit_assert=>assert_equals(
        act = mo_result->get_line( 1 )-rstate
        exp = zif_abapgit_definitions=>gc_state-modified ).
  
    ENDMETHOD.
  
    METHOD local_outside_main.
  
      mo_helper->add_tadir(
        iv_obj_type = 'DOMA'
        iv_obj_name = '$$ZDOMA1'
        iv_devclass = '$OUTSIDE$' ).
  
      mo_helper->add_remote(
        iv_filename = '$$zdoma1.doma.xml'
        iv_sha1     = '54321' ).
  
      mo_result = mo_helper->run( ).
  
      mo_result->assert_lines( 1 ).
  
  * it should appear as not existing locally
      cl_abap_unit_assert=>assert_equals(
        act = mo_result->get_line( 1 )-rstate
        exp = zif_abapgit_definitions=>gc_state-added ).
  
    ENDMETHOD.
  
  ENDCLASS.
  