ADT fallback: Accept headers for FUNC; G0189 accepted; regen2 results

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
This commit is contained in:
Kral
2026-10-03 16:31:03 +02:00
parent 428b3565b2
commit 7510131a7d
335 changed files with 12047 additions and 5545 deletions

View File

@@ -1,135 +0,0 @@
CLASS {{p}}cine_hidden DEFINITION PUBLIC FINAL CREATE PUBLIC
FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
PRIVATE SECTION.
CONSTANTS: c_evening TYPE t VALUE '200000',
c_matinee TYPE t VALUE '160000',
c_boundary TYPE t VALUE '170000',
c_morning TYPE t VALUE '100000'.
METHODS call_fee
IMPORTING iv_show TYPE string
iv_seats TYPE i
iv_time TYPE t
iv_cust TYPE string
EXPORTING ev_total TYPE decfloat34
ev_disc TYPE decfloat34
ev_subrc TYPE sysubrc.
METHODS base_price_2d FOR TESTING.
METHODS base_prices_3d_imax FOR TESTING.
METHODS invalid_seats FOR TESTING.
METHODS invalid_show_type FOR TESTING.
METHODS invalid_cust_type FOR TESTING.
METHODS matinee_discount FOR TESTING.
METHODS matinee_boundary FOR TESTING.
METHODS child_skips_matinee FOR TESTING.
METHODS group_threshold FOR TESTING.
METHODS discount_cap FOR TESTING.
METHODS rounding_half_up FOR TESTING.
ENDCLASS.
CLASS {{p}}cine_hidden IMPLEMENTATION.
METHOD call_fee.
ev_total = 0.
ev_disc = 0.
CALL FUNCTION '{{P}}CINE_FEE_OLD'
EXPORTING
iv_show_type = iv_show
iv_seats = iv_seats
iv_show_time = iv_time
iv_cust_type = iv_cust
IMPORTING
ev_total = ev_total
ev_discount = ev_disc
EXCEPTIONS
invalid_input = 1
OTHERS = 2.
ev_subrc = sy-subrc.
ENDMETHOD.
METHOD base_price_2d.
call_fee( EXPORTING iv_show = `2D` iv_seats = 1 iv_time = c_evening iv_cust = `ADULT`
IMPORTING ev_total = DATA(lv_total) ev_disc = DATA(lv_disc) ev_subrc = DATA(lv_rc) ).
cl_abap_unit_assert=>assert_equals( exp = 0 act = lv_rc ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '9.50' ) act = lv_total ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( 0 ) act = lv_disc ).
ENDMETHOD.
METHOD base_prices_3d_imax.
call_fee( EXPORTING iv_show = `3D` iv_seats = 1 iv_time = c_evening iv_cust = `ADULT`
IMPORTING ev_total = DATA(lv_total) ev_subrc = DATA(lv_rc) ).
cl_abap_unit_assert=>assert_equals( exp = 0 act = lv_rc ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '13.00' ) act = lv_total ).
call_fee( EXPORTING iv_show = `IMAX` iv_seats = 1 iv_time = c_evening iv_cust = `ADULT`
IMPORTING ev_total = DATA(lv_total2) ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '16.50' ) act = lv_total2 ).
ENDMETHOD.
METHOD invalid_seats.
call_fee( EXPORTING iv_show = `2D` iv_seats = 0 iv_time = c_evening iv_cust = `ADULT`
IMPORTING ev_subrc = DATA(lv_rc) ).
cl_abap_unit_assert=>assert_equals( exp = 1 act = lv_rc ).
ENDMETHOD.
METHOD invalid_show_type.
call_fee( EXPORTING iv_show = `XX` iv_seats = 1 iv_time = c_evening iv_cust = `ADULT`
IMPORTING ev_subrc = DATA(lv_rc) ).
cl_abap_unit_assert=>assert_equals( exp = 1 act = lv_rc ).
ENDMETHOD.
METHOD invalid_cust_type.
call_fee( EXPORTING iv_show = `2D` iv_seats = 1 iv_time = c_evening iv_cust = `VIP`
IMPORTING ev_subrc = DATA(lv_rc) ).
cl_abap_unit_assert=>assert_equals( exp = 1 act = lv_rc ).
ENDMETHOD.
METHOD matinee_discount.
call_fee( EXPORTING iv_show = `2D` iv_seats = 1 iv_time = c_matinee iv_cust = `ADULT`
IMPORTING ev_total = DATA(lv_total) ev_disc = DATA(lv_disc) ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '7.25' ) act = lv_total ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( 25 ) act = lv_disc ).
ENDMETHOD.
METHOD matinee_boundary.
call_fee( EXPORTING iv_show = `2D` iv_seats = 1 iv_time = c_boundary iv_cust = `ADULT`
IMPORTING ev_total = DATA(lv_total) ev_disc = DATA(lv_disc) ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '9.50' ) act = lv_total ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( 0 ) act = lv_disc ).
ENDMETHOD.
METHOD child_skips_matinee.
call_fee( EXPORTING iv_show = `2D` iv_seats = 1 iv_time = c_morning iv_cust = `CHILD`
IMPORTING ev_total = DATA(lv_total) ev_disc = DATA(lv_disc) ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '5.90' ) act = lv_total ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( 40 ) act = lv_disc ).
ENDMETHOD.
METHOD group_threshold.
call_fee( EXPORTING iv_show = `2D` iv_seats = 7 iv_time = c_evening iv_cust = `ADULT`
IMPORTING ev_total = DATA(lv_total) ev_disc = DATA(lv_disc) ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '66.50' ) act = lv_total ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( 0 ) act = lv_disc ).
call_fee( EXPORTING iv_show = `2D` iv_seats = 8 iv_time = c_evening iv_cust = `ADULT`
IMPORTING ev_total = DATA(lv_total2) ev_disc = DATA(lv_disc2) ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '68.80' ) act = lv_total2 ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( 10 ) act = lv_disc2 ).
ENDMETHOD.
METHOD discount_cap.
call_fee( EXPORTING iv_show = `2D` iv_seats = 8 iv_time = c_morning iv_cust = `SENIOR`
IMPORTING ev_total = DATA(lv_total) ev_disc = DATA(lv_disc) ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '32.80' ) act = lv_total ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( 60 ) act = lv_disc ).
ENDMETHOD.
METHOD rounding_half_up.
call_fee( EXPORTING iv_show = `3D` iv_seats = 3 iv_time = c_matinee iv_cust = `ADULT`
IMPORTING ev_total = DATA(lv_total) ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '29.63' ) act = lv_total ).
ENDMETHOD.
ENDCLASS.

View File

@@ -0,0 +1,102 @@
CLASS {{p}}t_ski_hidden DEFINITION PUBLIC FINAL CREATE PUBLIC
FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
PRIVATE SECTION.
METHODS call
IMPORTING iv_equipment TYPE string
iv_days TYPE i
iv_customer TYPE string
iv_insurance TYPE abap_bool
EXPORTING ev_price TYPE decfloat34
ev_deposit TYPE decfloat34
ev_subrc TYPE sysubrc.
METHODS invalid_days FOR TESTING.
METHODS invalid_equipment FOR TESTING.
METHODS invalid_customer FOR TESTING.
METHODS adult_ski_one_day FOR TESTING.
METHODS child_boots_two_days FOR TESTING.
METHODS senior_snowboard_3d FOR TESTING.
METHODS adult_ski_7d_insurance FOR TESTING.
METHODS child_helmet_10d_ins FOR TESTING.
METHODS rounding_case FOR TESTING.
ENDCLASS.
CLASS {{p}}t_ski_hidden IMPLEMENTATION.
METHOD call.
CALL FUNCTION '{{P}}SKI_RENTAL_OLD'
EXPORTING
iv_equipment = iv_equipment
iv_days = iv_days
iv_customer = iv_customer
iv_insurance = iv_insurance
IMPORTING
ev_price = ev_price
ev_deposit = ev_deposit
EXCEPTIONS
invalid_equipment = 1
invalid_days = 2
invalid_customer = 3
OTHERS = 4.
ev_subrc = sy-subrc.
ENDMETHOD.
METHOD invalid_days.
call( EXPORTING iv_equipment = 'SKI' iv_days = 0 iv_customer = 'ADULT' iv_insurance = abap_false
IMPORTING ev_subrc = DATA(lv_subrc) ).
cl_abap_unit_assert=>assert_equals( exp = 2 act = lv_subrc ).
ENDMETHOD.
METHOD invalid_equipment.
call( EXPORTING iv_equipment = 'X' iv_days = 1 iv_customer = 'ADULT' iv_insurance = abap_false
IMPORTING ev_subrc = DATA(lv_subrc) ).
cl_abap_unit_assert=>assert_equals( exp = 1 act = lv_subrc ).
ENDMETHOD.
METHOD invalid_customer.
call( EXPORTING iv_equipment = 'SKI' iv_days = 1 iv_customer = 'X' iv_insurance = abap_false
IMPORTING ev_subrc = DATA(lv_subrc) ).
cl_abap_unit_assert=>assert_equals( exp = 3 act = lv_subrc ).
ENDMETHOD.
METHOD adult_ski_one_day.
call( EXPORTING iv_equipment = 'SKI' iv_days = 1 iv_customer = 'ADULT' iv_insurance = abap_false
IMPORTING ev_price = DATA(lv_price) ev_deposit = DATA(lv_deposit) ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( 25 ) act = lv_price ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( 100 ) act = lv_deposit ).
ENDMETHOD.
METHOD child_boots_two_days.
call( EXPORTING iv_equipment = 'BOOTS' iv_days = 2 iv_customer = 'CHILD' iv_insurance = abap_false
IMPORTING ev_price = DATA(lv_price) ev_deposit = DATA(lv_deposit) ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( 10 ) act = lv_price ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( 20 ) act = lv_deposit ).
ENDMETHOD.
METHOD senior_snowboard_3d.
call( EXPORTING iv_equipment = 'SNOWBOARD' iv_days = 3 iv_customer = 'SENIOR' iv_insurance = abap_false
IMPORTING ev_price = DATA(lv_price) ev_deposit = DATA(lv_deposit) ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '68.40' ) act = lv_price ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( 120 ) act = lv_deposit ).
ENDMETHOD.
METHOD adult_ski_7d_insurance.
call( EXPORTING iv_equipment = 'SKI' iv_days = 7 iv_customer = 'ADULT' iv_insurance = abap_true
IMPORTING ev_price = DATA(lv_price) ev_deposit = DATA(lv_deposit) ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '192.50' ) act = lv_price ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( 150 ) act = lv_deposit ).
ENDMETHOD.
METHOD child_helmet_10d_ins.
call( EXPORTING iv_equipment = 'HELMET' iv_days = 10 iv_customer = 'CHILD' iv_insurance = abap_true
IMPORTING ev_price = DATA(lv_price) ev_deposit = DATA(lv_deposit) ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '72.50' ) act = lv_price ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( 60 ) act = lv_deposit ).
ENDMETHOD.
METHOD rounding_case.
call( EXPORTING iv_equipment = 'SKI' iv_days = 3 iv_customer = 'CHILD' iv_insurance = abap_false
IMPORTING ev_price = DATA(lv_price) ev_deposit = DATA(lv_deposit) ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '35.63' ) act = lv_price ).
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( 100 ) act = lv_deposit ).
ENDMETHOD.
ENDCLASS.