Generator: pilot analysis and fixes; G0002-G0021 tasks; handover notes merged
- Static bundle checks (name length, seed type, reserved words, contract test classes, testclasses_file), local abaplint parser check before SAP, max_tokens, robust JSON parse - Runner: G2 for CDS views with parameters, contract_check detail in report - G0020 and G0013 fixed by review and revalidated (oracle 100, null 0) - Pilot results in docs/faz1-tasarim.md 11e; handover notes merged into CLAUDE.md and docs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
9
tasks_gen/eval/G0018/reference/i_customer.ddls.asddls
Normal file
9
tasks_gen/eval/G0018/reference/i_customer.ddls.asddls
Normal file
@@ -0,0 +1,9 @@
|
||||
@AccessControl.authorizationCheck: #NOT_REQUIRED
|
||||
@EndUserText.label: 'Customer master'
|
||||
define view entity {{P}}I_CUSTOMER
|
||||
as select from {{p}}cust
|
||||
{
|
||||
key cust_id,
|
||||
cust_name,
|
||||
country
|
||||
}
|
||||
15
tasks_gen/eval/G0018/reference/i_order.ddls.asddls
Normal file
15
tasks_gen/eval/G0018/reference/i_order.ddls.asddls
Normal file
@@ -0,0 +1,15 @@
|
||||
@AccessControl.authorizationCheck: #NOT_REQUIRED
|
||||
@EndUserText.label: 'Open orders with customer data'
|
||||
define view entity {{P}}I_ORDER
|
||||
as select from {{p}}ord as ord
|
||||
association [0..1] to {{p}}cust as _Customer
|
||||
on $projection.cust_id = _Customer.cust_id
|
||||
{
|
||||
key ord.order_id,
|
||||
ord.cust_id,
|
||||
ord.order_date,
|
||||
_Customer.cust_name as customer_name,
|
||||
_Customer.country as country,
|
||||
_Customer
|
||||
}
|
||||
where ord.status = 'O'
|
||||
48
tasks_gen/eval/G0018/reference/t20_test.clas.abap
Normal file
48
tasks_gen/eval/G0018/reference/t20_test.clas.abap
Normal file
@@ -0,0 +1,48 @@
|
||||
CLASS {{p}}t20_test DEFINITION PUBLIC FINAL CREATE PUBLIC
|
||||
FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
|
||||
PRIVATE SECTION.
|
||||
CLASS-DATA go_env TYPE REF TO if_cds_test_environment.
|
||||
CLASS-METHODS class_setup.
|
||||
CLASS-METHODS class_teardown.
|
||||
METHODS setup.
|
||||
METHODS order_with_customer FOR TESTING.
|
||||
METHODS order_without_customer FOR TESTING.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
CLASS {{p}}t20_test IMPLEMENTATION.
|
||||
METHOD class_setup.
|
||||
go_env = cl_cds_test_environment=>create( i_for_entity = '{{P}}I_ORDER' ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD class_teardown.
|
||||
go_env->destroy( ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD setup.
|
||||
DATA lt_cust TYPE STANDARD TABLE OF {{p}}cust WITH EMPTY KEY.
|
||||
DATA lt_ord TYPE STANDARD TABLE OF {{p}}ord WITH EMPTY KEY.
|
||||
go_env->clear_doubles( ).
|
||||
lt_cust = VALUE #(
|
||||
( cust_id = 'C001' cust_name = 'Alpha' country = 'DE' ) ).
|
||||
lt_ord = VALUE #(
|
||||
( order_id = 'O1' cust_id = 'C001' order_date = '20250101' status = 'O' )
|
||||
( order_id = 'O2' cust_id = 'C999' order_date = '20250102' status = 'O' )
|
||||
( order_id = 'O3' cust_id = 'C001' order_date = '20250103' status = 'C' ) ).
|
||||
go_env->insert_test_data( lt_cust ).
|
||||
go_env->insert_test_data( lt_ord ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD order_with_customer.
|
||||
SELECT SINGLE customer_name, country FROM {{p}}i_order
|
||||
WHERE order_id = 'O1' INTO @DATA(ls_ord).
|
||||
cl_abap_unit_assert=>assert_equals( exp = 'Alpha' act = ls_ord-customer_name ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = 'DE' act = ls_ord-country ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD order_without_customer.
|
||||
SELECT SINGLE customer_name FROM {{p}}i_order
|
||||
WHERE order_id = 'O2' INTO @DATA(lv_name).
|
||||
cl_abap_unit_assert=>assert_initial( act = lv_name ).
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
Reference in New Issue
Block a user