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:
119
tasks_gen/train/G1017/hidden/t_f01_hidden.clas.abap
Normal file
119
tasks_gen/train/G1017/hidden/t_f01_hidden.clas.abap
Normal file
@@ -0,0 +1,119 @@
|
||||
CLASS {{p}}t_f01_hidden DEFINITION PUBLIC FINAL CREATE PUBLIC
|
||||
FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
|
||||
PRIVATE SECTION.
|
||||
DATA mo_cut TYPE REF TO {{p}}if_inspection_check.
|
||||
|
||||
METHODS setup.
|
||||
METHODS reason_of
|
||||
IMPORTING iv_plate TYPE string DEFAULT `B-AB 1234`
|
||||
iv_make TYPE string DEFAULT `VW`
|
||||
iv_first_reg TYPE d DEFAULT '20150101'
|
||||
iv_check_date TYPE d DEFAULT '20250615'
|
||||
iv_mileage_km TYPE i DEFAULT 100000
|
||||
iv_brake_pct TYPE i DEFAULT 60
|
||||
iv_exhaust_ppm TYPE i DEFAULT 1000
|
||||
RETURNING VALUE(rv_reason) TYPE {{p}}if_inspection_check=>ty_reason.
|
||||
|
||||
METHODS ok_vehicle FOR TESTING.
|
||||
METHODS plate_with_spaces FOR TESTING.
|
||||
METHODS empty_plate FOR TESTING.
|
||||
METHODS empty_make FOR TESTING.
|
||||
METHODS future_reg_date FOR TESTING.
|
||||
METHODS initial_reg_date FOR TESTING.
|
||||
METHODS age_29_years FOR TESTING.
|
||||
METHODS age_30_years FOR TESTING.
|
||||
METHODS negative_mileage FOR TESTING.
|
||||
METHODS weak_brakes FOR TESTING.
|
||||
METHODS brake_boundary FOR TESTING.
|
||||
METHODS high_exhaust FOR TESTING.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
CLASS {{p}}t_f01_hidden IMPLEMENTATION.
|
||||
METHOD setup.
|
||||
mo_cut = NEW {{p}}inspection_checker( ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD reason_of.
|
||||
rv_reason = mo_cut->check_vehicle(
|
||||
iv_plate = iv_plate
|
||||
iv_make = iv_make
|
||||
iv_first_reg = iv_first_reg
|
||||
iv_check_date = iv_check_date
|
||||
iv_mileage_km = iv_mileage_km
|
||||
iv_brake_pct = iv_brake_pct
|
||||
iv_exhaust_ppm = iv_exhaust_ppm ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD ok_vehicle.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = {{p}}if_inspection_check=>c_reason-ok
|
||||
act = reason_of( ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD plate_with_spaces.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = {{p}}if_inspection_check=>c_reason-ok
|
||||
act = reason_of( iv_plate = ` b-ab 1234 ` ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD empty_plate.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = {{p}}if_inspection_check=>c_reason-no_plate
|
||||
act = reason_of( iv_plate = ` ` ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD empty_make.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = {{p}}if_inspection_check=>c_reason-no_make
|
||||
act = reason_of( iv_make = `` ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD future_reg_date.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = {{p}}if_inspection_check=>c_reason-reg_date
|
||||
act = reason_of( iv_first_reg = '20260101' ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD initial_reg_date.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = {{p}}if_inspection_check=>c_reason-reg_date
|
||||
act = reason_of( iv_first_reg = '00000000' ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD age_29_years.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = {{p}}if_inspection_check=>c_reason-ok
|
||||
act = reason_of( iv_first_reg = '19950615' iv_check_date = '20250614' ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD age_30_years.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = {{p}}if_inspection_check=>c_reason-too_old
|
||||
act = reason_of( iv_first_reg = '19950615' iv_check_date = '20250615' ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD negative_mileage.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = {{p}}if_inspection_check=>c_reason-mileage
|
||||
act = reason_of( iv_mileage_km = -1 ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD weak_brakes.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = {{p}}if_inspection_check=>c_reason-brakes
|
||||
act = reason_of( iv_brake_pct = 49 ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD brake_boundary.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = {{p}}if_inspection_check=>c_reason-ok
|
||||
act = reason_of( iv_brake_pct = 50 ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD high_exhaust.
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
exp = {{p}}if_inspection_check=>c_reason-exhaust
|
||||
act = reason_of( iv_exhaust_ppm = 1001 ) ).
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
Reference in New Issue
Block a user