Stage 2 summary at 50 accepted trajectories
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
131
tasks_gen/train/G1050/hidden/tailor_pricer_hidden.clas.abap
Normal file
131
tasks_gen/train/G1050/hidden/tailor_pricer_hidden.clas.abap
Normal file
@@ -0,0 +1,131 @@
|
||||
CLASS {{p}}tailor_hidden DEFINITION
|
||||
PUBLIC
|
||||
FINAL
|
||||
CREATE PUBLIC
|
||||
FOR TESTING
|
||||
DURATION SHORT
|
||||
RISK LEVEL HARMLESS.
|
||||
|
||||
PRIVATE SECTION.
|
||||
DATA mo_cut TYPE REF TO {{p}}tailor_pricer.
|
||||
METHODS setup.
|
||||
METHODS minimum_price FOR TESTING.
|
||||
METHODS ten_percent_discount FOR TESTING.
|
||||
METHODS twenty_percent_discount FOR TESTING.
|
||||
METHODS express_fee FOR TESTING.
|
||||
METHODS express_hits_minimum FOR TESTING.
|
||||
METHODS coat_lining FOR TESTING.
|
||||
METHODS unknown_service FOR TESTING.
|
||||
METHODS unknown_garment FOR TESTING.
|
||||
METHODS zero_quantity FOR TESTING.
|
||||
METHODS negative_quantity FOR TESTING.
|
||||
METHODS plain_price FOR TESTING.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
CLASS {{p}}tailor_hidden IMPLEMENTATION.
|
||||
|
||||
METHOD setup.
|
||||
mo_cut = NEW {{p}}tailor_pricer( ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD minimum_price.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV {{p}}tailor_pricer=>ty_price( '15.00' )
|
||||
act = mo_cut->calculate_price( iv_garment = 'TROUSERS'
|
||||
iv_service = 'HEM'
|
||||
iv_quantity = 1
|
||||
iv_express = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD ten_percent_discount.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV {{p}}tailor_pricer=>ty_price( '32.40' )
|
||||
act = mo_cut->calculate_price( iv_garment = 'SKIRT'
|
||||
iv_service = 'ZIP'
|
||||
iv_quantity = 3
|
||||
iv_express = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD twenty_percent_discount.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV {{p}}tailor_pricer=>ty_price( '32.00' )
|
||||
act = mo_cut->calculate_price( iv_garment = 'TROUSERS'
|
||||
iv_service = 'HEM'
|
||||
iv_quantity = 5
|
||||
iv_express = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD express_fee.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV {{p}}tailor_pricer=>ty_price( '57.00' )
|
||||
act = mo_cut->calculate_price( iv_garment = 'JACKET'
|
||||
iv_service = 'TAKE_IN'
|
||||
iv_quantity = 2
|
||||
iv_express = abap_true ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD express_hits_minimum.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV {{p}}tailor_pricer=>ty_price( '15.00' )
|
||||
act = mo_cut->calculate_price( iv_garment = 'TROUSERS'
|
||||
iv_service = 'HEM'
|
||||
iv_quantity = 1
|
||||
iv_express = abap_true ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD coat_lining.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV {{p}}tailor_pricer=>ty_price( '135.00' )
|
||||
act = mo_cut->calculate_price( iv_garment = 'COAT'
|
||||
iv_service = 'LINING'
|
||||
iv_quantity = 3
|
||||
iv_express = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD unknown_service.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV {{p}}tailor_pricer=>ty_price( '0.00' )
|
||||
act = mo_cut->calculate_price( iv_garment = 'TROUSERS'
|
||||
iv_service = 'PATCH'
|
||||
iv_quantity = 2
|
||||
iv_express = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD unknown_garment.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV {{p}}tailor_pricer=>ty_price( '0.00' )
|
||||
act = mo_cut->calculate_price( iv_garment = 'SHIRT'
|
||||
iv_service = 'HEM'
|
||||
iv_quantity = 2
|
||||
iv_express = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD zero_quantity.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV {{p}}tailor_pricer=>ty_price( '0.00' )
|
||||
act = mo_cut->calculate_price( iv_garment = 'TROUSERS'
|
||||
iv_service = 'HEM'
|
||||
iv_quantity = 0
|
||||
iv_express = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD negative_quantity.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV {{p}}tailor_pricer=>ty_price( '0.00' )
|
||||
act = mo_cut->calculate_price( iv_garment = 'TROUSERS'
|
||||
iv_service = 'HEM'
|
||||
iv_quantity = -2
|
||||
iv_express = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD plain_price.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV {{p}}tailor_pricer=>ty_price( '18.00' )
|
||||
act = mo_cut->calculate_price( iv_garment = 'JACKET'
|
||||
iv_service = 'ZIP'
|
||||
iv_quantity = 1
|
||||
iv_express = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
ENDCLASS.
|
||||
Reference in New Issue
Block a user