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:
129
tasks_gen/train/G1005/hidden/t02_hidden.clas.abap
Normal file
129
tasks_gen/train/G1005/hidden/t02_hidden.clas.abap
Normal file
@@ -0,0 +1,129 @@
|
||||
CLASS {{p}}t02_hidden DEFINITION PUBLIC FINAL CREATE PUBLIC
|
||||
FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
|
||||
PRIVATE SECTION.
|
||||
DATA mo_cut TYPE REF TO {{p}}if_credit_check.
|
||||
METHODS setup.
|
||||
METHODS too_young FOR TESTING.
|
||||
METHODS age_eighteen_is_ok FOR TESTING.
|
||||
METHODS zero_income FOR TESTING.
|
||||
METHODS two_open_plans FOR TESTING.
|
||||
METHODS order_above_limit FOR TESTING.
|
||||
METHODS order_at_limit_is_ok FOR TESTING.
|
||||
METHODS young_limit_halved FOR TESTING.
|
||||
METHODS adult_keeps_limit FOR TESTING.
|
||||
METHODS young_limit_is_floor FOR TESTING.
|
||||
METHODS plan_reduces_limit FOR TESTING.
|
||||
METHODS valid_adult FOR TESTING.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
CLASS {{p}}t02_hidden IMPLEMENTATION.
|
||||
METHOD setup.
|
||||
mo_cut = NEW {{p}}credit_checker( ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD too_young.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = {{p}}if_credit_check=>c_reason-age
|
||||
act = mo_cut->check( iv_age = 17
|
||||
iv_income = '3000.00'
|
||||
iv_open_plans = 0
|
||||
iv_order_amount = '100.00' ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD age_eighteen_is_ok.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = {{p}}if_credit_check=>c_reason-ok
|
||||
act = mo_cut->check( iv_age = 18
|
||||
iv_income = '3000.00'
|
||||
iv_open_plans = 0
|
||||
iv_order_amount = '100.00' ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD zero_income.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = {{p}}if_credit_check=>c_reason-income
|
||||
act = mo_cut->check( iv_age = 30
|
||||
iv_income = '0.00'
|
||||
iv_open_plans = 0
|
||||
iv_order_amount = '100.00' ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD two_open_plans.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = {{p}}if_credit_check=>c_reason-open_plan
|
||||
act = mo_cut->check( iv_age = 30
|
||||
iv_income = '3000.00'
|
||||
iv_open_plans = 2
|
||||
iv_order_amount = '100.00' ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD order_above_limit.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = {{p}}if_credit_check=>c_reason-limit
|
||||
act = mo_cut->check( iv_age = 30
|
||||
iv_income = '1000.00'
|
||||
iv_open_plans = 0
|
||||
iv_order_amount = '3000.01' ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD order_at_limit_is_ok.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = {{p}}if_credit_check=>c_reason-ok
|
||||
act = mo_cut->check( iv_age = 30
|
||||
iv_income = '1000.00'
|
||||
iv_open_plans = 0
|
||||
iv_order_amount = '3000.00' ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD young_limit_halved.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = {{p}}if_credit_check=>c_reason-limit
|
||||
act = mo_cut->check( iv_age = 20
|
||||
iv_income = '1000.00'
|
||||
iv_open_plans = 0
|
||||
iv_order_amount = '1500.01' ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD adult_keeps_limit.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = {{p}}if_credit_check=>c_reason-ok
|
||||
act = mo_cut->check( iv_age = 21
|
||||
iv_income = '1000.00'
|
||||
iv_open_plans = 0
|
||||
iv_order_amount = '1500.01' ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD young_limit_is_floor.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = {{p}}if_credit_check=>c_reason-limit
|
||||
act = mo_cut->check( iv_age = 20
|
||||
iv_income = '2500.50'
|
||||
iv_open_plans = 0
|
||||
iv_order_amount = '3750.50' ) ).
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = {{p}}if_credit_check=>c_reason-ok
|
||||
act = mo_cut->check( iv_age = 20
|
||||
iv_income = '2500.50'
|
||||
iv_open_plans = 0
|
||||
iv_order_amount = '3750.00' ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD plan_reduces_limit.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = {{p}}if_credit_check=>c_reason-limit
|
||||
act = mo_cut->check( iv_age = 30
|
||||
iv_income = '1000.00'
|
||||
iv_open_plans = 1
|
||||
iv_order_amount = '2500.01' ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD valid_adult.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = {{p}}if_credit_check=>c_reason-ok
|
||||
act = mo_cut->check( iv_age = 35
|
||||
iv_income = '2000.00'
|
||||
iv_open_plans = 1
|
||||
iv_order_amount = '5500.00' ) ).
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
Reference in New Issue
Block a user