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:
142
tasks_gen/eval/G0167/hidden/move_pricer_hidden.clas.abap
Normal file
142
tasks_gen/eval/G0167/hidden/move_pricer_hidden.clas.abap
Normal file
@@ -0,0 +1,142 @@
|
||||
CLASS {{p}}move_pricer_hidden DEFINITION PUBLIC FINAL CREATE PUBLIC
|
||||
FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
|
||||
PRIVATE SECTION.
|
||||
TYPES ty_price TYPE p LENGTH 8 DECIMALS 2.
|
||||
|
||||
DATA mo_cut TYPE REF TO {{p}}move_pricer.
|
||||
|
||||
METHODS setup.
|
||||
METHODS base_fee_only FOR TESTING.
|
||||
METHODS volume_fee FOR TESTING.
|
||||
METHODS distance_15_km FOR TESTING.
|
||||
METHODS first_floor_surcharge FOR TESTING.
|
||||
METHODS third_floor_surcharge FOR TESTING.
|
||||
METHODS packing_fee FOR TESTING.
|
||||
METHODS weekend_on_subtotal FOR TESTING.
|
||||
METHODS weekend_with_packing FOR TESTING.
|
||||
METHODS no_weekend_no_surcharge FOR TESTING.
|
||||
METHODS combined_move FOR TESTING.
|
||||
METHODS constants_unchanged FOR TESTING.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
CLASS {{p}}move_pricer_hidden IMPLEMENTATION.
|
||||
METHOD setup.
|
||||
mo_cut = NEW {{p}}move_pricer( ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD base_fee_only.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV ty_price( '250.00' )
|
||||
act = mo_cut->calculate( iv_distance_km = 0
|
||||
iv_volume_m3 = 0
|
||||
iv_floor = 0
|
||||
iv_packing = abap_false
|
||||
iv_weekend = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD volume_fee.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV ty_price( '410.00' )
|
||||
act = mo_cut->calculate( iv_distance_km = 0
|
||||
iv_volume_m3 = 4
|
||||
iv_floor = 0
|
||||
iv_packing = abap_false
|
||||
iv_weekend = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD distance_15_km.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV ty_price( '268.00' )
|
||||
act = mo_cut->calculate( iv_distance_km = 15
|
||||
iv_volume_m3 = 0
|
||||
iv_floor = 0
|
||||
iv_packing = abap_false
|
||||
iv_weekend = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD first_floor_surcharge.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV ty_price( '265.00' )
|
||||
act = mo_cut->calculate( iv_distance_km = 0
|
||||
iv_volume_m3 = 0
|
||||
iv_floor = 1
|
||||
iv_packing = abap_false
|
||||
iv_weekend = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD third_floor_surcharge.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV ty_price( '295.00' )
|
||||
act = mo_cut->calculate( iv_distance_km = 0
|
||||
iv_volume_m3 = 0
|
||||
iv_floor = 3
|
||||
iv_packing = abap_false
|
||||
iv_weekend = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD packing_fee.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV ty_price( '430.00' )
|
||||
act = mo_cut->calculate( iv_distance_km = 0
|
||||
iv_volume_m3 = 0
|
||||
iv_floor = 0
|
||||
iv_packing = abap_true
|
||||
iv_weekend = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD weekend_on_subtotal.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV ty_price( '441.28' )
|
||||
act = mo_cut->calculate( iv_distance_km = 20
|
||||
iv_volume_m3 = 3
|
||||
iv_floor = 0
|
||||
iv_packing = abap_false
|
||||
iv_weekend = abap_true ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD weekend_with_packing.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV ty_price( '481.60' )
|
||||
act = mo_cut->calculate( iv_distance_km = 0
|
||||
iv_volume_m3 = 0
|
||||
iv_floor = 0
|
||||
iv_packing = abap_true
|
||||
iv_weekend = abap_true ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD no_weekend_no_surcharge.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV ty_price( '482.00' )
|
||||
act = mo_cut->calculate( iv_distance_km = 10
|
||||
iv_volume_m3 = 1
|
||||
iv_floor = 0
|
||||
iv_packing = abap_true
|
||||
iv_weekend = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD combined_move.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV ty_price( '669.76' )
|
||||
act = mo_cut->calculate( iv_distance_km = 15
|
||||
iv_volume_m3 = 3
|
||||
iv_floor = 2
|
||||
iv_packing = abap_true
|
||||
iv_weekend = abap_true ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD constants_unchanged.
|
||||
cl_abap_unit_assert=>assert_equals( exp = CONV ty_price( '250.00' )
|
||||
act = {{p}}move_pricer=>c_base_fee ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = CONV ty_price( '40.00' )
|
||||
act = {{p}}move_pricer=>c_volume_fee ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = CONV ty_price( '1.20' )
|
||||
act = {{p}}move_pricer=>c_distance_fee ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = CONV ty_price( '15.00' )
|
||||
act = {{p}}move_pricer=>c_floor_fee ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = CONV ty_price( '180.00' )
|
||||
act = {{p}}move_pricer=>c_packing_fee ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = CONV ty_price( '0.12' )
|
||||
act = {{p}}move_pricer=>c_weekend_rate ).
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
Reference in New Issue
Block a user