Snapshot: new training tasks (balanced generation), docs

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Kral
2026-10-05 22:08:59 +02:00
parent eb13453097
commit 6984fc7917
572 changed files with 30024 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
CLASS {{p}}lift_test DEFINITION PUBLIC FINAL CREATE PUBLIC
FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
PRIVATE SECTION.
METHODS message_001 FOR TESTING.
METHODS message_002 FOR TESTING.
METHODS message_003 FOR TESTING.
METHODS message_004 FOR TESTING.
METHODS message_005 FOR TESTING.
METHODS exception_text FOR TESTING.
ENDCLASS.
CLASS {{p}}lift_test IMPLEMENTATION.
METHOD message_001.
DATA lv_text TYPE string.
MESSAGE ID '{{P}}MSG_CRANE' TYPE 'E' NUMBER '001' WITH 'L-100' INTO lv_text.
cl_abap_unit_assert=>assert_equals(
exp = 'Lift plan L-100 has no crane'
act = lv_text ).
ENDMETHOD.
METHOD message_002.
DATA lv_text TYPE string.
MESSAGE ID '{{P}}MSG_CRANE' TYPE 'E' NUMBER '002' WITH 'L-100' 'K-7' INTO lv_text.
cl_abap_unit_assert=>assert_equals(
exp = 'Lift plan L-100 is too heavy for crane K-7'
act = lv_text ).
ENDMETHOD.
METHOD message_003.
DATA lv_text TYPE string.
MESSAGE ID '{{P}}MSG_CRANE' TYPE 'E' NUMBER '003' WITH 'L-100' INTO lv_text.
cl_abap_unit_assert=>assert_equals(
exp = 'Lift plan L-100 is blocked because of wind'
act = lv_text ).
ENDMETHOD.
METHOD message_004.
DATA lv_text TYPE string.
MESSAGE ID '{{P}}MSG_CRANE' TYPE 'W' NUMBER '004' WITH 'L-100' INTO lv_text.
cl_abap_unit_assert=>assert_equals(
exp = 'Lift plan L-100 is near the load limit'
act = lv_text ).
ENDMETHOD.
METHOD message_005.
DATA lv_text TYPE string.
MESSAGE ID '{{P}}MSG_CRANE' TYPE 'I' NUMBER '005' WITH 'L-100' INTO lv_text.
cl_abap_unit_assert=>assert_equals(
exp = 'Lift plan L-100 is approved'
act = lv_text ).
ENDMETHOD.
METHOD exception_text.
DATA(lo_error) = NEW {{p}}cx_crane_error( iv_msgno = '002'
iv_attr1 = 'L-100'
iv_attr2 = 'K-7' ).
cl_abap_unit_assert=>assert_equals(
exp = 'Lift plan L-100 is too heavy for crane K-7'
act = lo_error->get_message_text( ) ).
ENDMETHOD.
ENDCLASS.