|
1 | 1 | create or replace package body test_expect_not_to_be_null |
2 | 2 | is |
3 | | - gc_object_name CONSTANT VARCHAR2(30) := 't_not_to_be_null_test'; |
4 | | - gc_nested_table_name CONSTANT VARCHAR2(30) := 'tt_not_to_be_null_test'; |
5 | | - gc_varray_name CONSTANT VARCHAR2(30) := 'tv_not_to_be_null_test'; |
| 3 | + gc_object_name constant varchar2(30) := 't_not_to_be_null_test'; |
| 4 | + gc_nested_table_name constant varchar2(30) := 'tt_not_to_be_null_test'; |
| 5 | + gc_varray_name constant varchar2(30) := 'tv_not_to_be_null_test'; |
6 | 6 |
|
7 | 7 | procedure cleanup_expectations |
8 | 8 | is |
|
28 | 28 | execute immediate 'drop type '||gc_varray_name; |
29 | 29 | end; |
30 | 30 |
|
31 | | - function anydata_expectation_block(a_object_name IN VARCHAR2, a_object_value IN VARCHAR, |
32 | | - a_convert_type IN VARCHAR) |
| 31 | + function anydata_expectation_block(a_object_name in varchar2, a_object_value in varchar2, |
| 32 | + a_object_type in varchar2) |
33 | 33 | return varchar2 |
34 | 34 | is |
35 | 35 | begin |
36 | 36 | return 'DECLARE |
37 | 37 | l_object '||a_object_name||' := '||a_object_value||'; |
38 | 38 | BEGIN |
39 | | - ut3.ut.expect(anydata.'||a_convert_type||'(l_object)).not_to_be_null(); |
| 39 | + ut3.ut.expect(anydata.convert'||a_object_type||'(l_object)).not_to_be_null(); |
40 | 40 | END;'; |
41 | 41 | end; |
42 | 42 |
|
|
153 | 153 | is |
154 | 154 | begin |
155 | 155 | --Act |
156 | | - execute immediate anydata_expectation_block(gc_object_name, gc_object_name||'(1)', 'convertObject'); |
| 156 | + execute immediate anydata_expectation_block(gc_object_name, gc_object_name||'(1)', 'object'); |
157 | 157 | --Assert |
158 | 158 | ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).to_be_empty(); |
159 | 159 | end; |
|
162 | 162 | is |
163 | 163 | begin |
164 | 164 | --Act |
165 | | - execute immediate anydata_expectation_block(gc_nested_table_name, gc_nested_table_name||'()', 'convertCollection'); |
| 165 | + execute immediate anydata_expectation_block(gc_nested_table_name, gc_nested_table_name||'()', 'collection'); |
166 | 166 | --Assert |
167 | 167 | ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).to_be_empty(); |
168 | 168 | end; |
|
171 | 171 | is |
172 | 172 | begin |
173 | 173 | --Act |
174 | | - execute immediate anydata_expectation_block(gc_varray_name, gc_varray_name||'()', 'convertCollection'); |
| 174 | + execute immediate anydata_expectation_block(gc_varray_name, gc_varray_name||'()', 'collection'); |
175 | 175 | --Assert |
176 | 176 | ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).to_be_empty(); |
177 | 177 | end; |
|
268 | 268 | is |
269 | 269 | begin |
270 | 270 | --Act |
271 | | - execute immediate anydata_expectation_block(gc_object_name, 'null', 'convertObject'); |
| 271 | + execute immediate anydata_expectation_block(gc_object_name, 'null', 'object'); |
272 | 272 | --Assert |
273 | 273 | ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).not_to_be_empty(); |
274 | 274 | end; |
|
277 | 277 | is |
278 | 278 | begin |
279 | 279 | --Act |
280 | | - execute immediate anydata_expectation_block(gc_nested_table_name, 'null', 'convertCollection'); |
| 280 | + execute immediate anydata_expectation_block(gc_nested_table_name, 'null', 'collection'); |
281 | 281 | --Assert |
282 | 282 | ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).not_to_be_empty(); |
283 | 283 | end; |
|
286 | 286 | is |
287 | 287 | begin |
288 | 288 | --Act |
289 | | - execute immediate anydata_expectation_block(gc_varray_name, 'null', 'convertCollection'); |
| 289 | + execute immediate anydata_expectation_block(gc_varray_name, 'null', 'collection'); |
290 | 290 | --Assert |
291 | 291 | ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).not_to_be_empty(); |
292 | 292 | end; |
|
0 commit comments