@@ -1466,5 +1466,99 @@ end;]';
14661466 ut.expect(SQLCODE).to_equal(ut3_develop.ut_utils.gc_value_too_large);
14671467 end;
14681468
1469+ procedure setup_remove_annot_test is
1470+ pragma autonomous_transaction;
1471+ begin
1472+ execute immediate q'[create or replace package test_removing_annotation as
1473+ --%suite
1474+
1475+ --%test
1476+ procedure test1;
1477+
1478+ --%test
1479+ procedure test2;
1480+
1481+ end;]';
1482+ end;
1483+
1484+ procedure remove_annot_from_test is
1485+ pragma autonomous_transaction;
1486+ begin
1487+ execute immediate q'[create or replace package test_removing_annotation as
1488+
1489+ procedure test1;
1490+
1491+ procedure test2;
1492+
1493+ end;]';
1494+ end;
1495+
1496+ procedure rem_one_annot_test is
1497+ pragma autonomous_transaction;
1498+ begin
1499+ execute immediate q'[create or replace package test_removing_annotation as
1500+ --%suite
1501+
1502+ procedure test1;
1503+
1504+ --%test
1505+ procedure test2;
1506+
1507+ end;]';
1508+ execute immediate q'[create or replace package body test_removing_annotation as
1509+
1510+ procedure test1 is
1511+ begin
1512+ ut.expect(1).to_equal(1);
1513+ end;
1514+
1515+ procedure test2 is
1516+ begin
1517+ ut.expect(1).to_equal(1);
1518+ end;
1519+
1520+ end;]';
1521+ end;
1522+
1523+ procedure clean_remove_annot_test is
1524+ pragma autonomous_transaction;
1525+ begin
1526+ execute immediate 'drop package test_removing_annotation';
1527+ end;
1528+
1529+ procedure test_rem_cache_on_create is
1530+ l_test_report ut3_develop.ut_varchar2_list;
1531+ begin
1532+
1533+ select * bulk collect into l_test_report from table(ut3_develop.ut.run(sys_context('USERENV', 'CURRENT_USER')||'.test_removing_annotation'));
1534+
1535+ -- drop all tests
1536+ remove_annot_from_test;
1537+
1538+ begin
1539+ select * bulk collect into l_test_report from table(ut3_develop.ut.run(sys_context('USERENV', 'CURRENT_USER') || '.test_removing_annotation'));
1540+ exception
1541+ when others then
1542+ ut.expect(sqlerrm).to_be_like('%ORA-20204: Suite package ut3_tester.test_removing_annotation does not exist%');
1543+ end;
1544+
1545+ end;
1546+
1547+ procedure test_rem_cache_on_crt_anno is
1548+ l_test_report ut3_develop.ut_varchar2_list;
1549+ l_results clob;
1550+ begin
1551+
1552+ select * bulk collect into l_test_report from table(ut3_develop.ut.run(sys_context('USERENV', 'CURRENT_USER')||'.test_removing_annotation'));
1553+
1554+ -- drop single test
1555+ rem_one_annot_test;
1556+ ut3_develop.ut.run(sys_context('USERENV', 'CURRENT_USER')|| '.test_removing_annotation',a_reporter => ut3_develop.ut_documentation_reporter() );
1557+ l_results := ut3_tester_helper.main_helper.get_dbms_output_as_clob();
1558+ --Assert
1559+ ut.expect( l_results ).to_be_like( '%1 tests, 0 failed, 0 errored, 0 disabled, 0 warning(s)%' );
1560+
1561+ end;
1562+
14691563end test_suite_manager;
14701564/
0 commit comments