CLASS ltc_class_based_by_return DEFINITION INHERITING FROM y_unit_test_base FOR TESTING RISK LEVEL HARMLESS DURATION SHORT.
  PROTECTED SECTION.
    METHODS get_cut REDEFINITION.
    METHODS get_code_with_issue REDEFINITION.
    METHODS get_code_without_issue REDEFINITION.
    METHODS get_code_with_exemption REDEFINITION.
ENDCLASS.

CLASS ltc_class_based_by_return IMPLEMENTATION.

  METHOD get_cut.
    result ?= NEW y_check_exiting_catch( ).
  ENDMETHOD.

  METHOD get_code_with_issue.
    result = VALUE #(
      ( ' REPORT ut_test. ' )

      ( ' CLASS classname DEFINITION. ' )
      ( '   PUBLIC SECTION. ' )
      ( '     METHODS class_based. ' )
      ( ' ENDCLASS. ' )

      ( ' CLASS classname IMPLEMENTATION. ' )
      ( '   METHOD class_based. ' )
      ( '     TRY. ' )
      ( '     CATCH cx_sy_no_handler.' )
      ( '*      comment' )
      ( '       RETURN.' )
      ( '*      comment' )
      ( '     ENDTRY. ' )
      ( '   ENDMETHOD. ' )
      ( ' ENDCLASS. ' )
    ).
  ENDMETHOD.

  METHOD get_code_without_issue.
    result = VALUE #(
      ( ' REPORT ut_test. ' )

      ( ' CLASS classname DEFINITION. ' )
      ( '   PUBLIC SECTION. ' )
      ( '     METHODS class_based. ' )
      ( ' ENDCLASS. ' )

      ( ' CLASS classname IMPLEMENTATION. ' )
      ( '   METHOD class_based. ' )
      ( '     TRY. ' )
      ( '     CATCH cx_sy_no_handler.' )
      ( '*      comment' )
      ( '       DATA cx TYPE c. ' )
      ( '*      comment' )
      ( '     ENDTRY. ' )
      ( '   ENDMETHOD. ' )
      ( 'ENDCLASS. ' )
    ).
  ENDMETHOD.

  METHOD get_code_with_exemption.
    result = VALUE #(
      ( ' REPORT ut_test. ' )

      ( ' CLASS classname DEFINITION. ' )
      ( '   PUBLIC SECTION. ' )
      ( '     METHODS class_based. ' )
      ( ' ENDCLASS. ' )

      ( ' CLASS classname IMPLEMENTATION. ' )
      ( '   METHOD class_based. ' )
      ( '     TRY. ' )
      ( '     CATCH cx_sy_no_handler.     "#EC EXITING_CATCH' )
      ( '*      comment' )
      ( '       RETURN.' )
      ( '*      comment' )
      ( '     ENDTRY. ' )
      ( '   ENDMETHOD. ' )
      ( ' ENDCLASS. ' )
    ).
  ENDMETHOD.

ENDCLASS.

CLASS ltc_class_based_by_exit DEFINITION INHERITING FROM y_unit_test_base FOR TESTING RISK LEVEL HARMLESS DURATION SHORT.
  PROTECTED SECTION.
    METHODS get_cut REDEFINITION.
    METHODS get_code_with_issue REDEFINITION.
    METHODS get_code_without_issue REDEFINITION.
    METHODS get_code_with_exemption REDEFINITION.
ENDCLASS.

CLASS ltc_class_based_by_exit IMPLEMENTATION.

  METHOD get_cut.
    result ?= NEW y_check_exiting_catch( ).
  ENDMETHOD.

  METHOD get_code_with_issue.
    result = VALUE #(
      ( ' REPORT ut_test. ' )

      ( ' CLASS classname DEFINITION. ' )
      ( '   PUBLIC SECTION. ' )
      ( '     METHODS class_based. ' )
      ( ' ENDCLASS. ' )

      ( ' CLASS classname IMPLEMENTATION. ' )
      ( '   METHOD class_based. ' )
      ( '     TRY. ' )
      ( '     CATCH cx_sy_no_handler.' )
      ( '*      comment' )
      ( '       EXIT.' )
      ( '*      comment' )
      ( '     ENDTRY. ' )
      ( '   ENDMETHOD. ' )
      ( ' ENDCLASS. ' )
    ).
  ENDMETHOD.

  METHOD get_code_without_issue.
    result = VALUE #(
      ( ' REPORT ut_test. ' )

      ( ' CLASS classname DEFINITION. ' )
      ( '   PUBLIC SECTION. ' )
      ( '     METHODS class_based. ' )
      ( ' ENDCLASS. ' )

      ( ' CLASS classname IMPLEMENTATION. ' )
      ( '   METHOD class_based. ' )
      ( '     TRY. ' )
      ( '     CATCH cx_sy_no_handler.' )
      ( '*      comment' )
      ( '       DATA cx TYPE c. ' )
      ( '*      comment' )
      ( '     ENDTRY. ' )
      ( '   ENDMETHOD. ' )
      ( 'ENDCLASS. ' )
    ).
  ENDMETHOD.

  METHOD get_code_with_exemption.
    result = VALUE #(
      ( ' REPORT ut_test. ' )

      ( ' CLASS classname DEFINITION. ' )
      ( '   PUBLIC SECTION. ' )
      ( '     METHODS class_based. ' )
      ( ' ENDCLASS. ' )

      ( ' CLASS classname IMPLEMENTATION. ' )
      ( '   METHOD class_based. ' )
      ( '     TRY. ' )
      ( '     CATCH cx_sy_no_handler.     "#EC EXITING_CATCH' )
      ( '*      comment' )
      ( '       EXIT.' )
      ( '*      comment' )
      ( '     ENDTRY. ' )
      ( '   ENDMETHOD. ' )
      ( ' ENDCLASS. ' )
    ).
  ENDMETHOD.

ENDCLASS.

CLASS ltc_class_based_by_check DEFINITION INHERITING FROM y_unit_test_base FOR TESTING RISK LEVEL HARMLESS DURATION SHORT.
  PROTECTED SECTION.
    METHODS get_cut REDEFINITION.
    METHODS get_code_with_issue REDEFINITION.
    METHODS get_code_without_issue REDEFINITION.
    METHODS get_code_with_exemption REDEFINITION.
ENDCLASS.

CLASS ltc_class_based_by_check IMPLEMENTATION.

  METHOD get_cut.
    result ?= NEW y_check_exiting_catch( ).
  ENDMETHOD.

  METHOD get_code_with_issue.
    result = VALUE #(
      ( ' REPORT ut_test. ' )

      ( ' CLASS classname DEFINITION. ' )
      ( '   PUBLIC SECTION. ' )
      ( '     METHODS class_based. ' )
      ( ' ENDCLASS. ' )

      ( ' CLASS classname IMPLEMENTATION. ' )
      ( '   METHOD class_based. ' )
      ( '     TRY. ' )
      ( '     CATCH cx_sy_no_handler.' )
      ( '*      comment' )
      ( '       CHECK 1 = 2.' )
      ( '*      comment' )
      ( '     ENDTRY. ' )
      ( '   ENDMETHOD. ' )
      ( ' ENDCLASS. ' )
    ).
  ENDMETHOD.

  METHOD get_code_without_issue.
    result = VALUE #(
      ( ' REPORT ut_test. ' )

      ( ' CLASS classname DEFINITION. ' )
      ( '   PUBLIC SECTION. ' )
      ( '     METHODS class_based. ' )
      ( ' ENDCLASS. ' )

      ( ' CLASS classname IMPLEMENTATION. ' )
      ( '   METHOD class_based. ' )
      ( '     TRY. ' )
      ( '     CATCH cx_sy_no_handler.' )
      ( '*      comment' )
      ( '       DATA cx TYPE c. ' )
      ( '*      comment' )
      ( '     ENDTRY. ' )
      ( '   ENDMETHOD. ' )
      ( 'ENDCLASS. ' )
    ).
  ENDMETHOD.

  METHOD get_code_with_exemption.
    result = VALUE #(
      ( ' REPORT ut_test. ' )

      ( ' CLASS classname DEFINITION. ' )
      ( '   PUBLIC SECTION. ' )
      ( '     METHODS class_based. ' )
      ( ' ENDCLASS. ' )

      ( ' CLASS classname IMPLEMENTATION. ' )
      ( '   METHOD class_based. ' )
      ( '     TRY. ' )
      ( '     CATCH cx_sy_no_handler.     "#EC EXITING_CATCH' )
      ( '*      comment' )
      ( '       CHECK 1 = 2.' )
      ( '*      comment' )
      ( '     ENDTRY. ' )
      ( '   ENDMETHOD. ' )
      ( ' ENDCLASS. ' )
    ).
  ENDMETHOD.

ENDCLASS.

CLASS ltc_class_based_by_leave DEFINITION INHERITING FROM y_unit_test_base FOR TESTING RISK LEVEL HARMLESS DURATION SHORT.
  PROTECTED SECTION.
    METHODS get_cut REDEFINITION.
    METHODS get_code_with_issue REDEFINITION.
    METHODS get_code_without_issue REDEFINITION.
    METHODS get_code_with_exemption REDEFINITION.
ENDCLASS.

CLASS ltc_class_based_by_leave IMPLEMENTATION.

  METHOD get_cut.
    result ?= NEW y_check_exiting_catch( ).
  ENDMETHOD.

  METHOD get_code_with_issue.
    result = VALUE #(
      ( ' REPORT ut_test. ' )

      ( ' CLASS classname DEFINITION. ' )
      ( '   PUBLIC SECTION. ' )
      ( '     METHODS class_based. ' )
      ( ' ENDCLASS. ' )

      ( ' CLASS classname IMPLEMENTATION. ' )
      ( '   METHOD class_based. ' )
      ( '     TRY. ' )
      ( '     CATCH cx_sy_no_handler.' )
      ( '*      comment' )
      ( '       LEAVE.' )
      ( '*      comment' )
      ( '     ENDTRY. ' )
      ( '   ENDMETHOD. ' )
      ( ' ENDCLASS. ' )
    ).
  ENDMETHOD.

  METHOD get_code_without_issue.
    result = VALUE #(
      ( ' REPORT ut_test. ' )

      ( ' CLASS classname DEFINITION. ' )
      ( '   PUBLIC SECTION. ' )
      ( '     METHODS class_based. ' )
      ( ' ENDCLASS. ' )

      ( ' CLASS classname IMPLEMENTATION. ' )
      ( '   METHOD class_based. ' )
      ( '     TRY. ' )
      ( '     CATCH cx_sy_no_handler.' )
      ( '*      comment' )
      ( '       DATA cx TYPE c. ' )
      ( '*      comment' )
      ( '     ENDTRY. ' )
      ( '   ENDMETHOD. ' )
      ( 'ENDCLASS. ' )
    ).
  ENDMETHOD.

  METHOD get_code_with_exemption.
    result = VALUE #(
      ( ' REPORT ut_test. ' )

      ( ' CLASS classname DEFINITION. ' )
      ( '   PUBLIC SECTION. ' )
      ( '     METHODS class_based. ' )
      ( ' ENDCLASS. ' )

      ( ' CLASS classname IMPLEMENTATION. ' )
      ( '   METHOD class_based. ' )
      ( '     TRY. ' )
      ( '     CATCH cx_sy_no_handler.     "#EC EXITING_CATCH' )
      ( '*      comment' )
      ( '       LEAVE.' )
      ( '*      comment' )
      ( '     ENDTRY. ' )
      ( '   ENDMETHOD. ' )
      ( ' ENDCLASS. ' )
    ).
  ENDMETHOD.

ENDCLASS.

CLASS ltc_class_based_with_into DEFINITION INHERITING FROM y_unit_test_base FOR TESTING RISK LEVEL HARMLESS DURATION SHORT.
  PROTECTED SECTION.
    METHODS get_cut REDEFINITION.
    METHODS get_code_with_issue REDEFINITION.
    METHODS get_code_without_issue REDEFINITION.
    METHODS get_code_with_exemption REDEFINITION.
ENDCLASS.

CLASS ltc_class_based_with_into IMPLEMENTATION.

  METHOD get_cut.
    result ?= NEW y_check_exiting_catch( ).
  ENDMETHOD.

  METHOD get_code_with_issue.
    result = VALUE #(
      ( ' REPORT ut_test. ' )

      ( ' CLASS classname DEFINITION. ' )
      ( '   PUBLIC SECTION. ' )
      ( '     METHODS class_based. ' )
      ( ' ENDCLASS. ' )

      ( ' CLASS classname IMPLEMENTATION. ' )
      ( '   METHOD class_based. ' )
      ( '     TRY. ' )
      ( '     CATCH cx_sy_no_handler INTO DATA(lr_exc).' )
      ( '*      comment' )
      ( '       RETURN.' )
      ( '*      comment' )
      ( '     ENDTRY. ' )
      ( '   ENDMETHOD. ' )
      ( ' ENDCLASS. ' )
    ).
  ENDMETHOD.

  METHOD get_code_without_issue.
    result = VALUE #(
      ( ' REPORT ut_test. ' )

      ( ' CLASS classname DEFINITION. ' )
      ( '   PUBLIC SECTION. ' )
      ( '     METHODS class_based. ' )
      ( ' ENDCLASS. ' )

      ( ' CLASS classname IMPLEMENTATION. ' )
      ( '   METHOD class_based. ' )
      ( '     TRY. ' )
      ( '     CATCH cx_sy_no_handler INTO DATA(lr_exc).' )
      ( '*      comment' )
      ( '       DATA cx TYPE c. ' )
      ( '*      comment' )
      ( '     ENDTRY. ' )
      ( '   ENDMETHOD. ' )
      ( 'ENDCLASS. ' )
    ).
  ENDMETHOD.

  METHOD get_code_with_exemption.
    result = VALUE #(
      ( ' REPORT ut_test. ' )

      ( ' CLASS classname DEFINITION. ' )
      ( '   PUBLIC SECTION. ' )
      ( '     METHODS class_based. ' )
      ( ' ENDCLASS. ' )

      ( ' CLASS classname IMPLEMENTATION. ' )
      ( '   METHOD class_based. ' )
      ( '     TRY. ' )
      ( '     CATCH cx_sy_no_handler INTO DATA(lr_exc).     "#EC EXITING_CATCH' )
      ( '*      comment' )
      ( '       RETURN.' )
      ( '*      comment' )
      ( '     ENDTRY. ' )
      ( '   ENDMETHOD. ' )
      ( ' ENDCLASS. ' )
    ).
  ENDMETHOD.

ENDCLASS.

CLASS ltc_system_based DEFINITION INHERITING FROM y_unit_test_base FOR TESTING RISK LEVEL HARMLESS DURATION SHORT.
  PROTECTED SECTION.
    METHODS get_cut REDEFINITION.
    METHODS get_code_with_issue REDEFINITION.
    METHODS get_code_without_issue REDEFINITION.
    METHODS get_code_with_exemption REDEFINITION.
ENDCLASS.

CLASS ltc_system_based IMPLEMENTATION.

  METHOD get_cut.
    result ?= NEW y_check_exiting_catch( ).
  ENDMETHOD.

  METHOD get_code_with_issue.
    result = VALUE #(
      ( ' REPORT ut_test. ' )

      ( ' CLASS classname DEFINITION. ' )
      ( '   PUBLIC SECTION. ' )
      ( '     METHODS system_based. ' )
      ( ' ENDCLASS. ' )

      ( ' CLASS classname IMPLEMENTATION. ' )
      ( '   METHOD system_based. ' )
      ( '     CATCH SYSTEM-EXCEPTIONS OTHERS = 1. ' )
      ( '*      comment' )
      ( '       RETURN.' )
      ( '*      comment' )
      ( '     ENDCATCH. ' )
      ( '   ENDMETHOD. ' )
      ( ' ENDCLASS. ' )
    ).
  ENDMETHOD.

  METHOD get_code_without_issue.
    result = VALUE #(
      ( ' REPORT ut_test. ' )

      ( ' CLASS classname DEFINITION. ' )
      ( '   PUBLIC SECTION. ' )
      ( '     METHODS system_based. ' )
      ( ' ENDCLASS. ' )

      ( ' CLASS classname IMPLEMENTATION. ' )
      ( '   METHOD system_based. ' )
      ( '     CATCH SYSTEM-EXCEPTIONS OTHERS = 1. ' )
      ( '*      comment' )
      ( '       ROLLBACK WORK. ' )
      ( '*      comment' )
      ( '     ENDCATCH. ' )
      ( '   ENDMETHOD. ' )
      ( ' ENDCLASS. ' )
    ).
  ENDMETHOD.

  METHOD get_code_with_exemption.
    result = VALUE #(
      ( ' REPORT ut_test. ' )

      ( ' CLASS classname DEFINITION. ' )
      ( '   PUBLIC SECTION. ' )
      ( '     METHODS system_based. ' )
      ( ' ENDCLASS. ' )

      ( ' CLASS classname IMPLEMENTATION. ' )
      ( '   METHOD system_based. ' )
      ( '     CATCH SYSTEM-EXCEPTIONS OTHERS = 1.     "#EC EXITING_CATCH' )
      ( '*      comment' )
      ( '       RETURN.' )
      ( '*      comment' )
      ( '     ENDCATCH. ' )
      ( '   ENDMETHOD. ' )
      ( ' ENDCLASS. ' )
    ).
  ENDMETHOD.

ENDCLASS.


CLASS lcl_local_atc_check DEFINITION FINAL.
  PRIVATE SECTION.
    METHODS local_test_based_on_return.
    METHODS local_test_based_on_exit.
    METHODS local_test_based_on_leave.
    METHODS local_test_based_on_check.
    METHODS local_test_with_pragma.
ENDCLASS.

CLASS lcl_local_atc_check IMPLEMENTATION.

  METHOD local_test_based_on_return.

    TRY.
      CATCH cx_sy_no_handler INTO DATA(lr_exc).
        "some comment
        RETURN.
    ENDTRY.

  ENDMETHOD.

  METHOD local_test_based_on_exit.

    TRY.
      CATCH cx_sy_no_handler INTO DATA(lr_exc).
        "some comment
        EXIT.
    ENDTRY.

  ENDMETHOD.

  METHOD local_test_based_on_leave.

    TRY.
      CATCH cx_sy_no_handler INTO DATA(lr_exc).
        "some comment
        LEAVE.
    ENDTRY.

  ENDMETHOD.

  METHOD local_test_based_on_check.

    TRY.
      CATCH cx_sy_no_handler INTO DATA(lr_exc).
        "some comment
        CHECK 1 = 2.
    ENDTRY.

  ENDMETHOD.

  METHOD local_test_with_pragma.

    TRY.
      CATCH cx_sy_no_handler INTO DATA(lr_exc).      "#EC EXITING_CATCH
        "some comment
        RETURN.
    ENDTRY.

  ENDMETHOD.

ENDCLASS.
