Step F first pass: 81/92 accepted; budget floor 60 calls; rejected slots moved for regeneration
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
This commit is contained in:
71
tasks_gen/eval/G0159/reference/t63_test.clas.abap
Normal file
71
tasks_gen/eval/G0159/reference/t63_test.clas.abap
Normal file
@@ -0,0 +1,71 @@
|
||||
CLASS {{p}}t63_test DEFINITION PUBLIC FINAL CREATE PUBLIC
|
||||
FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
|
||||
PRIVATE SECTION.
|
||||
METHODS fee_for
|
||||
IMPORTING iv_type TYPE string
|
||||
iv_nights TYPE i
|
||||
iv_adults TYPE i DEFAULT 1
|
||||
iv_elec TYPE abap_bool DEFAULT abap_false
|
||||
RETURNING VALUE(rv_fee) TYPE decfloat34.
|
||||
METHODS std_fee FOR TESTING.
|
||||
METHODS long_stay_discount FOR TESTING.
|
||||
METHODS unknown_type FOR TESTING.
|
||||
METHODS invalid_nights FOR TESTING.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
CLASS {{p}}t63_test IMPLEMENTATION.
|
||||
METHOD fee_for.
|
||||
DATA lv_fee TYPE decfloat34.
|
||||
DATA lv_discount TYPE abap_bool.
|
||||
CALL FUNCTION '{{P}}CAMP_FEE'
|
||||
EXPORTING
|
||||
iv_pitch_type = iv_type
|
||||
iv_nights = iv_nights
|
||||
iv_adults = iv_adults
|
||||
iv_electricity = iv_elec
|
||||
IMPORTING
|
||||
ev_discount = lv_discount
|
||||
CHANGING
|
||||
cv_fee = lv_fee
|
||||
EXCEPTIONS
|
||||
invalid_nights = 1
|
||||
OTHERS = 2.
|
||||
cl_abap_unit_assert=>assert_subrc( exp = 0 ).
|
||||
rv_fee = lv_fee.
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD std_fee.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV decfloat34( 60 )
|
||||
act = fee_for( iv_type = 'STD' iv_nights = 3 iv_adults = 2 ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD long_stay_discount.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV decfloat34( '175.53' )
|
||||
act = fee_for( iv_type = 'CMF' iv_nights = 7 iv_adults = 2 iv_elec = abap_true ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD unknown_type.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV decfloat34( 0 )
|
||||
act = fee_for( iv_type = 'XYZ' iv_nights = 10 ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD invalid_nights.
|
||||
DATA lv_fee TYPE decfloat34.
|
||||
CALL FUNCTION '{{P}}CAMP_FEE'
|
||||
EXPORTING
|
||||
iv_pitch_type = 'STD'
|
||||
iv_nights = 0
|
||||
iv_adults = 1
|
||||
iv_electricity = abap_false
|
||||
CHANGING
|
||||
cv_fee = lv_fee
|
||||
EXCEPTIONS
|
||||
invalid_nights = 1
|
||||
OTHERS = 2.
|
||||
cl_abap_unit_assert=>assert_equals( exp = 1 act = sy-subrc ).
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
Reference in New Issue
Block a user