@@ -17,29 +17,33 @@ create or replace type body ut_run as
1717 */
1818
1919 constructor function ut_run(
20- self in out nocopy ut_run, a_items ut_suite_items, a_run_paths ut_varchar2_list := null,
21- a_coverage_options ut_coverage_options := null, a_test_file_mappings ut_file_mappings := null
20+ self in out nocopy ut_run,
21+ a_items ut_suite_items,
22+ a_run_paths ut_varchar2_list := null,
23+ a_schema_names ut_varchar2_rows := null,
24+ a_exclude_objects ut_object_names := null,
25+ a_include_objects ut_object_names := null,
26+ a_project_file_mappings ut_file_mappings := null,
27+ a_test_file_mappings ut_file_mappings := null
2228 ) return self as result is
23- l_coverage_schema_names ut_varchar2_list;
29+ l_coverage_schema_names ut_varchar2_rows;
30+ l_coverage_options ut_coverage_options;
31+ l_exclude_objects ut_object_names;
2432 begin
33+ l_coverage_schema_names := coalesce(a_schema_names, get_run_schemes());
34+ l_exclude_objects := coalesce(a_exclude_objects,ut_object_names());
35+
2536 self.run_paths := a_run_paths;
2637 self.self_type := $$plsql_unit;
2738 self.items := a_items;
2839 self.results_count := ut_results_counter();
29- self.coverage_options := a_coverage_options;
3040 self.test_file_mappings := coalesce(a_test_file_mappings, ut_file_mappings());
31- if self.coverage_options is not null then
32- l_coverage_schema_names := coalesce(coverage_options.schema_names, get_run_schemes());
33- coverage_options.schema_names := l_coverage_schema_names;
34- if coverage_options.exclude_objects is not null then
35- coverage_options.exclude_objects :=
36- coverage_options.exclude_objects
37- multiset union all
38- ut_suite_manager.get_schema_ut_packages(l_coverage_schema_names);
39- else
40- coverage_options.exclude_objects := ut_suite_manager.get_schema_ut_packages(l_coverage_schema_names);
41- end if;
42- end if;
41+ self.coverage_options := ut_coverage_options(
42+ l_coverage_schema_names,
43+ l_exclude_objects multiset union all ut_suite_manager.get_schema_ut_packages(l_coverage_schema_names),
44+ a_include_objects,
45+ a_project_file_mappings
46+ );
4347 return;
4448 end;
4549
@@ -101,14 +105,14 @@ create or replace type body ut_run as
101105 a_listener.fire_after_event(ut_utils.gc_run, self);
102106 end;
103107
104- member function get_run_schemes return ut_varchar2_list is
108+ member function get_run_schemes return ut_varchar2_rows is
105109 l_schema varchar2(128);
106110 c_current_schema constant varchar2(128) := sys_context('USERENV','CURRENT_SCHEMA');
107111 l_path varchar2(32767);
108- l_schemes ut_varchar2_list ;
112+ l_schemes ut_varchar2_rows ;
109113 begin
110114 if run_paths is not null then
111- l_schemes := ut_varchar2_list ();
115+ l_schemes := ut_varchar2_rows ();
112116 for i in 1 .. self.run_paths.count loop
113117 l_path := self.run_paths(i);
114118 if regexp_like(l_path, '^([A-Za-z0-9$#_]+)?:') then
@@ -131,7 +135,7 @@ create or replace type body ut_run as
131135 l_schemes(l_schemes.last) := l_schema;
132136 end loop;
133137 else
134- l_schemes := ut_varchar2_list (c_current_schema);
138+ l_schemes := ut_varchar2_rows (c_current_schema);
135139 end if;
136140 return l_schemes;
137141
0 commit comments