Pipeline controller: plan 2 (hard +, error +50 %), backlog throttle, 2 trajectory workers, stop rules, summaries every 50; budget reserve
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
100
tasks_gen/train/G1002/hidden/glasses_hidden.clas.abap
Normal file
100
tasks_gen/train/G1002/hidden/glasses_hidden.clas.abap
Normal file
@@ -0,0 +1,100 @@
|
||||
CLASS {{p}}glasses_hidden DEFINITION PUBLIC FINAL CREATE PUBLIC
|
||||
FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
|
||||
|
||||
PRIVATE SECTION.
|
||||
CONSTANTS c_frame TYPE {{p}}glasses_pricer=>ty_amount VALUE '100.00'.
|
||||
DATA mo_cut TYPE REF TO {{p}}glasses_pricer.
|
||||
|
||||
METHODS setup.
|
||||
METHODS zero_qty_is_free FOR TESTING.
|
||||
METHODS negative_qty_is_free FOR TESTING.
|
||||
METHODS single_vision_price FOR TESTING.
|
||||
METHODS bifocal_with_coating FOR TESTING.
|
||||
METHODS progressive_blue_filter FOR TESTING.
|
||||
METHODS unknown_lens_defaults FOR TESTING.
|
||||
METHODS unknown_coat_is_free FOR TESTING.
|
||||
METHODS discount_from_three FOR TESTING.
|
||||
METHODS no_discount_for_two FOR TESTING.
|
||||
METHODS qty_capped_at_hundred FOR TESTING.
|
||||
METHODS discount_on_total FOR TESTING.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
CLASS {{p}}glasses_hidden IMPLEMENTATION.
|
||||
|
||||
METHOD setup.
|
||||
mo_cut = NEW {{p}}glasses_pricer( ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD zero_qty_is_free.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV {{p}}glasses_pricer=>ty_amount( '0.00' )
|
||||
act = mo_cut->price( iv_frame = c_frame iv_lens = 'S' iv_coat = 'A' iv_qty = 0 ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD negative_qty_is_free.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV {{p}}glasses_pricer=>ty_amount( '0.00' )
|
||||
act = mo_cut->price( iv_frame = c_frame iv_lens = 'P' iv_coat = 'B' iv_qty = -2 ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD single_vision_price.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV {{p}}glasses_pricer=>ty_amount( '140.00' )
|
||||
act = mo_cut->price( iv_frame = c_frame iv_lens = 'S' iv_coat = 'N' iv_qty = 1 ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD bifocal_with_coating.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV {{p}}glasses_pricer=>ty_amount( '430.00' )
|
||||
act = mo_cut->price( iv_frame = c_frame iv_lens = 'B' iv_coat = 'A' iv_qty = 2 ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD progressive_blue_filter.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV {{p}}glasses_pricer=>ty_amount( '235.00' )
|
||||
act = mo_cut->price( iv_frame = CONV {{p}}glasses_pricer=>ty_amount( '50.00' )
|
||||
iv_lens = 'P' iv_coat = 'B' iv_qty = 1 ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD unknown_lens_defaults.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV {{p}}glasses_pricer=>ty_amount( '140.00' )
|
||||
act = mo_cut->price( iv_frame = c_frame iv_lens = 'Z' iv_coat = 'N' iv_qty = 1 ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD unknown_coat_is_free.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV {{p}}glasses_pricer=>ty_amount( '140.00' )
|
||||
act = mo_cut->price( iv_frame = c_frame iv_lens = 'S' iv_coat = 'X' iv_qty = 1 ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD discount_from_three.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV {{p}}glasses_pricer=>ty_amount( '378.00' )
|
||||
act = mo_cut->price( iv_frame = c_frame iv_lens = 'S' iv_coat = 'N' iv_qty = 3 ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD no_discount_for_two.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV {{p}}glasses_pricer=>ty_amount( '280.00' )
|
||||
act = mo_cut->price( iv_frame = c_frame iv_lens = 'S' iv_coat = 'N' iv_qty = 2 ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD qty_capped_at_hundred.
|
||||
DATA(lv_capped) = mo_cut->price( iv_frame = c_frame iv_lens = 'S' iv_coat = 'N' iv_qty = 100 ).
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV {{p}}glasses_pricer=>ty_amount( '12600.00' )
|
||||
act = lv_capped ).
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = lv_capped
|
||||
act = mo_cut->price( iv_frame = c_frame iv_lens = 'S' iv_coat = 'N' iv_qty = 150 ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD discount_on_total.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV {{p}}glasses_pricer=>ty_amount( '499.50' )
|
||||
act = mo_cut->price( iv_frame = CONV {{p}}glasses_pricer=>ty_amount( '0.00' )
|
||||
iv_lens = 'P' iv_coat = 'B' iv_qty = 3 ) ).
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
Reference in New Issue
Block a user