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:
60
tasks_gen/eval/G0169/reference/cowork_fee.testclasses.abap
Normal file
60
tasks_gen/eval/G0169/reference/cowork_fee.testclasses.abap
Normal file
@@ -0,0 +1,60 @@
|
||||
CLASS ltc_cowork_fee DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
|
||||
PRIVATE SECTION.
|
||||
DATA mo_cut TYPE REF TO {{p}}cowork_fee.
|
||||
METHODS setup.
|
||||
METHODS hot_desk_no_discount FOR TESTING.
|
||||
METHODS student_discount FOR TESTING.
|
||||
METHODS under_25_discount FOR TESTING.
|
||||
METHODS student_and_under_25 FOR TESTING.
|
||||
METHODS invalid_desk FOR TESTING.
|
||||
METHODS invalid_months FOR TESTING.
|
||||
ENDCLASS.
|
||||
|
||||
CLASS ltc_cowork_fee IMPLEMENTATION.
|
||||
METHOD setup.
|
||||
mo_cut = NEW {{p}}cowork_fee( ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD hot_desk_no_discount.
|
||||
cl_abap_unit_assert=>assert_equals( exp = 200
|
||||
act = mo_cut->calculate_fee( iv_desk = 'HOT' iv_months = 1
|
||||
iv_student = abap_false
|
||||
iv_under_25 = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD student_discount.
|
||||
cl_abap_unit_assert=>assert_equals( exp = 160
|
||||
act = mo_cut->calculate_fee( iv_desk = 'HOT' iv_months = 1
|
||||
iv_student = abap_true
|
||||
iv_under_25 = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD under_25_discount.
|
||||
cl_abap_unit_assert=>assert_equals( exp = 150
|
||||
act = mo_cut->calculate_fee( iv_desk = 'HOT' iv_months = 1
|
||||
iv_student = abap_false
|
||||
iv_under_25 = abap_true ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD student_and_under_25.
|
||||
" The reference resolves the contradiction in favour of the student rule.
|
||||
cl_abap_unit_assert=>assert_equals( exp = 160
|
||||
act = mo_cut->calculate_fee( iv_desk = 'HOT' iv_months = 1
|
||||
iv_student = abap_true
|
||||
iv_under_25 = abap_true ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD invalid_desk.
|
||||
cl_abap_unit_assert=>assert_equals( exp = 0
|
||||
act = mo_cut->calculate_fee( iv_desk = 'XXX' iv_months = 1
|
||||
iv_student = abap_false
|
||||
iv_under_25 = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD invalid_months.
|
||||
cl_abap_unit_assert=>assert_equals( exp = 0
|
||||
act = mo_cut->calculate_fee( iv_desk = 'HOT' iv_months = 0
|
||||
iv_student = abap_false
|
||||
iv_under_25 = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
Reference in New Issue
Block a user