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:
Kral
2026-10-03 12:10:52 +02:00
parent d3250acfb8
commit 39769afce8
741 changed files with 40573 additions and 317 deletions

View File

@@ -0,0 +1,127 @@
CLASS {{p}}t02_hidden DEFINITION PUBLIC FINAL CREATE PUBLIC
FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
PRIVATE SECTION.
TYPES ty_amount TYPE {{p}}kennel_pricer=>ty_amount.
CONSTANTS:
c_dog_1n TYPE ty_amount VALUE '25.00',
c_cat_3n_hi TYPE ty_amount VALUE '55.75',
c_dog_1n_hi TYPE ty_amount VALUE '28.12',
c_dog_7n_hi TYPE ty_amount VALUE '177.17',
c_cat_7n_hi TYPE ty_amount VALUE '122.61',
c_cat_7n_gr TYPE ty_amount VALUE '128.40',
c_zero TYPE ty_amount VALUE '0.00',
c_bird_2n TYPE ty_amount VALUE '40.00',
c_other_1n TYPE ty_amount VALUE '20.00',
c_rabb_10n TYPE ty_amount VALUE '72.00'.
DATA mo_cut TYPE REF TO {{p}}kennel_pricer.
METHODS setup.
METHODS dog_one_night FOR TESTING.
METHODS cat_high_season FOR TESTING.
METHODS high_season_rate FOR TESTING.
METHODS long_stay_dog_high FOR TESTING.
METHODS long_stay_cat_high FOR TESTING.
METHODS grooming_after_discount FOR TESTING.
METHODS zero_nights FOR TESTING.
METHODS negative_nights FOR TESTING.
METHODS unknown_type_default FOR TESTING.
METHODS lower_case_type FOR TESTING.
METHODS rabbit_long_stay FOR TESTING.
ENDCLASS.
CLASS {{p}}t02_hidden IMPLEMENTATION.
METHOD setup.
mo_cut = NEW {{p}}kennel_pricer( ).
ENDMETHOD.
METHOD dog_one_night.
cl_abap_unit_assert=>assert_equals( exp = c_dog_1n
act = mo_cut->calculate_fee( iv_pet_type = 'DOG'
iv_nights = 1
iv_high_season = abap_false
iv_grooming = abap_false ) ).
ENDMETHOD.
METHOD cat_high_season.
cl_abap_unit_assert=>assert_equals( exp = c_cat_3n_hi
act = mo_cut->calculate_fee( iv_pet_type = 'CAT'
iv_nights = 3
iv_high_season = abap_true
iv_grooming = abap_false ) ).
ENDMETHOD.
METHOD high_season_rate.
cl_abap_unit_assert=>assert_equals( exp = c_dog_1n_hi
act = mo_cut->calculate_fee( iv_pet_type = 'DOG'
iv_nights = 1
iv_high_season = abap_true
iv_grooming = abap_false ) ).
ENDMETHOD.
METHOD long_stay_dog_high.
cl_abap_unit_assert=>assert_equals( exp = c_dog_7n_hi
act = mo_cut->calculate_fee( iv_pet_type = 'DOG'
iv_nights = 7
iv_high_season = abap_true
iv_grooming = abap_false ) ).
ENDMETHOD.
METHOD long_stay_cat_high.
cl_abap_unit_assert=>assert_equals( exp = c_cat_7n_hi
act = mo_cut->calculate_fee( iv_pet_type = 'CAT'
iv_nights = 7
iv_high_season = abap_true
iv_grooming = abap_false ) ).
ENDMETHOD.
METHOD grooming_after_discount.
cl_abap_unit_assert=>assert_equals( exp = c_cat_7n_gr
act = mo_cut->calculate_fee( iv_pet_type = 'CAT'
iv_nights = 7
iv_high_season = abap_false
iv_grooming = abap_true ) ).
ENDMETHOD.
METHOD zero_nights.
cl_abap_unit_assert=>assert_equals( exp = c_zero
act = mo_cut->calculate_fee( iv_pet_type = 'DOG'
iv_nights = 0
iv_high_season = abap_true
iv_grooming = abap_true ) ).
ENDMETHOD.
METHOD negative_nights.
cl_abap_unit_assert=>assert_equals( exp = c_zero
act = mo_cut->calculate_fee( iv_pet_type = 'DOG'
iv_nights = -2
iv_high_season = abap_false
iv_grooming = abap_false ) ).
ENDMETHOD.
METHOD unknown_type_default.
cl_abap_unit_assert=>assert_equals( exp = c_bird_2n
act = mo_cut->calculate_fee( iv_pet_type = 'BIRD'
iv_nights = 2
iv_high_season = abap_false
iv_grooming = abap_false ) ).
ENDMETHOD.
METHOD lower_case_type.
cl_abap_unit_assert=>assert_equals( exp = c_other_1n
act = mo_cut->calculate_fee( iv_pet_type = 'dog'
iv_nights = 1
iv_high_season = abap_false
iv_grooming = abap_false ) ).
ENDMETHOD.
METHOD rabbit_long_stay.
cl_abap_unit_assert=>assert_equals( exp = c_rabb_10n
act = mo_cut->calculate_fee( iv_pet_type = 'RABB'
iv_nights = 10
iv_high_season = abap_false
iv_grooming = abap_false ) ).
ENDMETHOD.
ENDCLASS.