@@ -7,6 +7,8 @@ create or replace package body test_suite_builder is
77 l_suites ut3.ut_suite_items;
88 l_suite ut3.ut_logical_suite;
99 l_cursor sys_refcursor;
10+ l_type_cursor sys_refcursor;
11+ l_ctx dbms_xmlgen.ctxhandle;
1012 l_xml xmltype;
1113 begin
1214 open l_cursor for select value(x) from table(
@@ -22,9 +24,14 @@ create or replace package body test_suite_builder is
2224 a_skip_all_objects => true
2325 );
2426 l_suite := treat( l_suites(l_suites.first) as ut3.ut_logical_suite);
25-
27+
28+ open l_type_cursor for select l_suite as "UT_LOGICAL_SUITE" from dual;
29+ l_ctx := dbms_xmlgen.newcontext(l_type_cursor);
30+ dbms_xmlgen.setNullHandling(l_ctx, dbms_xmlgen.empty_tag);
31+ l_xml := dbms_xmlgen.getxmltype(l_ctx);
32+
2633 select deletexml(
27- xmltype(l_suite) ,
34+ l_xml ,
2835 '//RESULTS_COUNT|//START_TIME|//END_TIME|//RESULT|//ASSOCIATED_EVENT_NAME' ||
2936 '|//TRANSACTION_INVALIDATORS|//ERROR_BACKTRACE|//ERROR_STACK|//SERVEROUTPUT'
3037 )
@@ -638,7 +645,8 @@ create or replace package body test_suite_builder is
638645 l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE');
639646 --Assert
640647 ut.expect(l_actual).to_be_like(
641- '%<UT_LOGICAL_SUITE>' ||
648+ '<ROWSET><ROW>'||
649+ '<UT_LOGICAL_SUITE>' ||
642650 '%<WARNINGS/>' ||
643651 '%<ITEMS>' ||
644652 '<UT_SUITE_ITEM>' ||
@@ -663,7 +671,8 @@ create or replace package body test_suite_builder is
663671 '%</BEFORE_ALL_LIST>' ||
664672 '<AFTER_ALL_LIST/>' ||
665673 '<TAGS/>' ||
666- '</UT_LOGICAL_SUITE>'
674+ '</UT_LOGICAL_SUITE>'||
675+ '</ROW></ROWSET>'
667676 );
668677 end;
669678
@@ -687,6 +696,7 @@ create or replace package body test_suite_builder is
687696 l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE');
688697 --Assert
689698 ut.expect(l_actual).to_be_like(
699+ '<ROWSET><ROW>'||
690700 '<UT_LOGICAL_SUITE>' ||
691701 '%<ITEMS>' ||
692702 '%<UT_SUITE_ITEM>' ||
@@ -707,7 +717,8 @@ create or replace package body test_suite_builder is
707717 '%<ITEM>%<PROCEDURE_NAME>suite_level_test</PROCEDURE_NAME>%</ITEM>' ||
708718 '%</UT_SUITE_ITEM>' ||
709719 '%</ITEMS>' ||
710- '%</UT_LOGICAL_SUITE>'
720+ '%</UT_LOGICAL_SUITE>'||
721+ '</ROW></ROWSET>'
711722 );
712723 ut.expect(l_actual).not_to_be_like('%<ITEMS>%<ITEMS>%</ITEMS>%<BEFORE_EACH_LIST>%</ITEMS>%');
713724 ut.expect(l_actual).not_to_be_like('%<ITEMS>%<ITEMS>%</ITEMS>%<AFTER_EACH_LIST>%</ITEMS>%');
@@ -735,6 +746,7 @@ create or replace package body test_suite_builder is
735746 l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE');
736747 --Assert
737748 ut.expect(l_actual).to_be_like(
749+ '<ROWSET><ROW>'||
738750 '<UT_LOGICAL_SUITE>' ||
739751 '%<ITEMS>' ||
740752 '%<UT_SUITE_ITEM>' ||
@@ -757,7 +769,8 @@ create or replace package body test_suite_builder is
757769 '%</ITEMS>' ||
758770 '%<BEFORE_ALL_LIST>%<PROCEDURE_NAME>suite_level_beforeall</PROCEDURE_NAME>%</BEFORE_ALL_LIST>' ||
759771 '%<AFTER_ALL_LIST>%<PROCEDURE_NAME>suite_level_afterall</PROCEDURE_NAME>%</AFTER_ALL_LIST>' ||
760- '%</UT_LOGICAL_SUITE>'
772+ '%</UT_LOGICAL_SUITE>'||
773+ '</ROW></ROWSET>'
761774 );
762775 ut.expect(l_actual).not_to_be_like('%<ITEMS>%<ITEMS>%</ITEMS>%<BEFORE_ALL_LIST>%</ITEMS>%');
763776 ut.expect(l_actual).not_to_be_like('%<ITEMS>%<ITEMS>%</ITEMS>%<AFTER_ALL_LIST>%</ITEMS>%');
@@ -784,6 +797,7 @@ create or replace package body test_suite_builder is
784797 ,'\'
785798 );
786799 ut.expect(l_actual).to_be_like(
800+ '<ROWSET><ROW>'||
787801 '<UT_LOGICAL_SUITE>' ||
788802 '%<ITEMS>' ||
789803 '<UT_SUITE_ITEM>' ||
@@ -799,7 +813,8 @@ create or replace package body test_suite_builder is
799813 '%</BEFORE_ALL_LIST>' ||
800814 '<AFTER_ALL_LIST/>' ||
801815 '<TAGS/>'||
802- '</UT_LOGICAL_SUITE>'
816+ '</UT_LOGICAL_SUITE>'||
817+ '</ROW></ROWSET>'
803818 );
804819 end;
805820
@@ -827,6 +842,7 @@ create or replace package body test_suite_builder is
827842 ,'\'
828843 );
829844 ut.expect(l_actual).to_be_like(
845+ '<ROWSET><ROW>'||
830846 '<UT_LOGICAL_SUITE>' ||
831847 '%<ITEMS>' ||
832848 '<UT_SUITE_ITEM>' ||
@@ -851,7 +867,8 @@ create or replace package body test_suite_builder is
851867 '%</BEFORE_ALL_LIST>' ||
852868 '<AFTER_ALL_LIST/>' ||
853869 '<TAGS/>' ||
854- '</UT_LOGICAL_SUITE>'
870+ '</UT_LOGICAL_SUITE>'||
871+ '</ROW></ROWSET>'
855872 );
856873 end;
857874
@@ -884,6 +901,7 @@ create or replace package body test_suite_builder is
884901 ,'\'
885902 );
886903 ut.expect(l_actual).to_be_like(
904+ '<ROWSET><ROW>'||
887905 '<UT_LOGICAL_SUITE>' ||
888906 '%<ITEMS>' ||
889907 '<UT_SUITE_ITEM>' ||
@@ -908,7 +926,8 @@ create or replace package body test_suite_builder is
908926 '%</BEFORE_ALL_LIST>' ||
909927 '<AFTER_ALL_LIST/>' ||
910928 '<TAGS/>' ||
911- '</UT_LOGICAL_SUITE>'
929+ '</UT_LOGICAL_SUITE>'||
930+ '</ROW></ROWSET>'
912931 );
913932 end;
914933
0 commit comments