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:
@@ -0,0 +1,81 @@
|
||||
CLASS ltc_sweep_pricer DEFINITION
|
||||
FINAL
|
||||
FOR TESTING
|
||||
DURATION SHORT
|
||||
RISK LEVEL HARMLESS.
|
||||
|
||||
PRIVATE SECTION.
|
||||
TYPES ty_fee TYPE p LENGTH 8 DECIMALS 2.
|
||||
|
||||
DATA mo_cut TYPE REF TO {{p}}sweep_pricer.
|
||||
|
||||
METHODS setup.
|
||||
METHODS minimum_fee_applies FOR TESTING.
|
||||
METHODS soot_surcharge FOR TESTING.
|
||||
METHODS volume_discount FOR TESTING.
|
||||
METHODS express_fee FOR TESTING.
|
||||
METHODS unknown_building FOR TESTING.
|
||||
METHODS invalid_flues FOR TESTING.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
|
||||
CLASS ltc_sweep_pricer IMPLEMENTATION.
|
||||
METHOD setup.
|
||||
mo_cut = NEW {{p}}sweep_pricer( ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD minimum_fee_applies.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV ty_fee( '60.00' )
|
||||
act = mo_cut->calculate( iv_flues = 1
|
||||
iv_building = 'A'
|
||||
iv_soot = 1
|
||||
iv_express = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD soot_surcharge.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV ty_fee( '216.00' )
|
||||
act = mo_cut->calculate( iv_flues = 3
|
||||
iv_building = 'R'
|
||||
iv_soot = 5
|
||||
iv_express = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD volume_discount.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV ty_fee( '132.30' )
|
||||
act = mo_cut->calculate( iv_flues = 4
|
||||
iv_building = 'A'
|
||||
iv_soot = 2
|
||||
iv_express = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD express_fee.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV ty_fee( '115.00' )
|
||||
act = mo_cut->calculate( iv_flues = 2
|
||||
iv_building = 'H'
|
||||
iv_soot = 1
|
||||
iv_express = abap_true ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD unknown_building.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV ty_fee( '0.00' )
|
||||
act = mo_cut->calculate( iv_flues = 3
|
||||
iv_building = 'X'
|
||||
iv_soot = 3
|
||||
iv_express = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD invalid_flues.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = CONV ty_fee( '0.00' )
|
||||
act = mo_cut->calculate( iv_flues = 0
|
||||
iv_building = 'H'
|
||||
iv_soot = 3
|
||||
iv_express = abap_false ) ).
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
Reference in New Issue
Block a user