-
Notifications
You must be signed in to change notification settings - Fork 189
Expand file tree
/
Copy pathtest_ut_runner.pkb
More file actions
658 lines (573 loc) · 22.4 KB
/
test_ut_runner.pkb
File metadata and controls
658 lines (573 loc) · 22.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
create or replace package body test_ut_runner is
procedure setup_cache_objects is
begin
ut3_tester_helper.run_helper.setup_cache_objects();
end;
procedure setup_cache_objectstag is
begin
ut3_tester_helper.run_helper.setup_cache_objectstag();
end;
procedure setup_cache_twotags is
begin
ut3_tester_helper.run_helper.setup_cache_twotags();
end;
procedure setup_cache is
begin
ut3_tester_helper.run_helper.setup_cache();
end;
procedure cleanup_cache is
begin
ut3_tester_helper.run_helper.cleanup_cache();
end;
procedure create_test_spec
as
pragma autonomous_transaction;
begin
execute immediate q'[create or replace package test_cache as
--%suite
--%test
procedure failing_test;
end;
]';
end;
procedure create_test_body(a_number integer)
as
pragma autonomous_transaction;
begin
execute immediate 'create or replace package body test_cache as
procedure failing_test is
begin
ut3_develop.ut.expect('||a_number||').to_be_null;
end;
end;';
end;
procedure drop_test_package
as
pragma autonomous_transaction;
begin
execute immediate 'drop package test_cache';
end;
procedure keep_an_open_transaction is
l_expected varchar2(300);
l_output_data dbms_output.chararr;
l_num_lines integer := 100000;
begin
--Arrange
create_test_spec();
create_test_body(0);
l_expected := dbms_transaction.local_transaction_id(true);
--Act
ut3_develop.ut.run('test_cache');
dbms_output.get_lines( l_output_data, l_num_lines);
--Assert
ut.expect(dbms_transaction.local_transaction_id()).to_equal(l_expected);
drop_test_package();
end;
procedure close_newly_opened_transaction is
l_output_data dbms_output.chararr;
l_num_lines integer := 100000;
pragma autonomous_transaction;
begin
--Arrange
create_test_spec();
create_test_body(0);
rollback;
--Act
ut3_develop.ut.run('test_cache');
dbms_output.get_lines( l_output_data, l_num_lines);
--Assert
ut.expect(dbms_transaction.local_transaction_id()).to_be_null();
drop_test_package();
end;
procedure version_comp_check_compare is
begin
ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.0.0.0','v3.0.0.0') ).to_equal(1);
ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.0.0.0','v3.0.123.0') ).to_equal(1);
ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.0.0.0','v3.123.0.0') ).to_equal(1);
ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.0.0.0','v3.13.31.0') ).to_equal(1);
ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.0.1.0','v3.0.0.0') ).to_equal(0);
ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.1.0.0','v3.0.0.0') ).to_equal(0);
ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.0.0.0','v2.0.0.0') ).to_equal(0);
ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.0.0.0','v4.0.0.0') ).to_equal(0);
end;
procedure version_comp_check_ignore is
begin
ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.0.0.123','v3.0.0.0') ).to_equal(1);
ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.0.0.0','v3.0.0.123') ).to_equal(1);
ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.0.0','v3.0.0.0') ).to_equal(1);
end;
procedure version_comp_check_short is
begin
ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.0.0','v3.0.0.0') ).to_equal(1);
ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.0','v3.0.123.0') ).to_equal(1);
ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3','v3.123.0.0') ).to_equal(1);
end;
procedure version_comp_check_exception is
procedure throws(a_requested varchar2, a_current varchar2) is
l_compatible integer;
begin
l_compatible := ut3_develop.ut_runner.version_compatibility_check(a_requested,a_current);
ut.fail('Expected exception but nothing was raised');
exception
when others then
ut.expect(sqlcode).to_equal(-20214);
end;
begin
throws('bad_ver','v3.0.0.0');
throws('v3.0.0.0','bad_ver');
end;
procedure run_reset_package_body_cache is
l_results ut3_develop.ut_varchar2_list;
l_expected clob;
l_actual clob;
begin
--Arrange
create_test_spec();
create_test_body(0);
select *
bulk collect into l_results
from table(ut3_develop.ut.run('test_cache'));
--Act
create_test_body(1);
select *
bulk collect into l_results
from table(ut3_develop.ut.run('test_cache'));
--Assert
l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results);
l_expected := '%ut3_develop.ut.expect(1).to_be_null;%';
ut.expect(l_actual).to_be_like(l_expected);
drop_test_package();
end;
procedure run_keep_dbms_output_buffer is
l_expected dbmsoutput_linesarray;
l_actual dbmsoutput_linesarray;
l_results ut3_develop.ut_varchar2_list;
l_lines number := 10000;
begin
--Arrange
create_test_spec();
create_test_body(0);
l_expected := dbmsoutput_linesarray(
'A text placed into DBMS_OUTPUT',
'Another line',
lpad('A very long line',10000,'a')
);
for i in 1 .. 300 loop
l_expected.extend;
l_expected(l_expected.last) := 'line '||i;
end loop;
for i in 1 .. l_expected.count loop
dbms_output.put_line(l_expected(i));
end loop;
--Act
select *
bulk collect into l_results
from table(ut3_develop.ut.run('test_cache'));
--Assert
dbms_output.get_lines(lines => l_actual, numlines => l_lines);
for i in 1 .. l_lines loop
ut.expect(l_actual(i)).to_equal(l_expected(i));
end loop;
drop_test_package();
end;
procedure test_purge_cache_schema_type is
l_actual sys_refcursor;
begin
--Arrange
l_actual := ut3_tester_helper.run_helper.get_annotation_cache_info_cur(
a_owner => sys_context('USERENV', 'CURRENT_USER'),
a_type => 'PROCEDURE'
);
ut.expect(l_actual).not_to_be_empty();
--Act
ut3_develop.ut_runner.purge_cache(sys_context('USERENV', 'CURRENT_USER'),'PROCEDURE');
--Assert
l_actual := ut3_tester_helper.run_helper.get_annotation_cache_info_cur(
a_owner => sys_context('USERENV', 'CURRENT_USER'),
a_type => 'PROCEDURE'
);
--Cache purged for object owner/type
ut.expect(l_actual).to_be_empty();
l_actual := ut3_tester_helper.run_helper.get_annotation_cache_info_cur(
a_owner => sys_context('USERENV', 'CURRENT_USER'),
a_type => 'PACKAGE'
);
--Cache not purged for other types
ut.expect(l_actual).not_to_be_empty();
l_actual := ut3_tester_helper.run_helper.get_annotation_cache_info_cur(
a_owner => 'UT3_TESTER_HELPER',
a_type => 'PROCEDURE'
);
--Cache not purged for other owners
ut.expect(l_actual).not_to_be_empty();
end;
procedure test_rebuild_cache_schema_type is
l_actual sys_refcursor;
begin
--Act
ut3_develop.ut_runner.rebuild_annotation_cache( sys_context('USERENV', 'CURRENT_USER'), 'PACKAGE' );
--Assert
l_actual := ut3_tester_helper.run_helper.get_annotation_cache_cursor(
a_owner => sys_context('USERENV', 'CURRENT_USER'),
a_type => 'PACKAGE',
a_name => 'DUMMY_TEST_PACKAGE'
);
--Rebuild cache for sys_context('USERENV', 'CURRENT_USER')/packages
ut.expect(l_actual).to_have_count(4);
l_actual := ut3_tester_helper.run_helper.get_annotation_cache_cursor(
a_owner => sys_context('USERENV', 'CURRENT_USER'),
a_type => 'PACKAGE'
);
--Did not rebuild cache for ut3_develop/procedures
ut.expect(l_actual).to_have_count(0);
end;
procedure test_get_suites_info_notag is
l_expected sys_refcursor;
l_actual sys_refcursor;
begin
--Arrange
open l_expected for
select
'UT3_USER' object_owner, 'DUMMY_TEST_PACKAGE' object_name, 'DUMMY_TEST_PACKAGE' item_name,
'dummy_test_suite' item_description, 'UT_SUITE' item_type, 2 item_line_no,
'some.path.dummy_test_package' path, 0 disabled_flag, null disabled_reason,null tags
from dual union all
select
'UT3_USER' object_owner, 'DUMMY_TEST_PACKAGE' object_name, 'SOME_DUMMY_TEST_PROCEDURE' item_name,
'dummy_test' item_description, 'UT_TEST' item_type, 6 item_line_no,
'some.path.dummy_test_package.some_dummy_test_procedure' path, 0 disabled_flag, null disabled_reason,null tags
from dual union all
select
'UT3_USER' object_owner, 'PATH' object_name, 'PATH' item_name,
null item_description, 'UT_LOGICAL_SUITE' item_type, null item_line_no,
'some.path' path, 0 disabled_flag, null disabled_reason, null tags
from dual union all
select
'UT3_USER' object_owner, 'SOME' object_name, 'SOME' item_name,
null item_description, 'UT_LOGICAL_SUITE' item_type, null item_line_no,
'some' path, 0 disabled_flag, null disabled_reason, null tags
from dual;
--Act
open l_actual for select * from table(ut3_develop.ut_runner.get_suites_info('UT3_USER','DUMMY_TEST_PACKAGE'));
--Assert
ut.expect(l_actual).to_equal(l_expected);
end;
procedure test_get_suites_info_tag is
l_expected sys_refcursor;
l_actual sys_refcursor;
begin
--Arrange
open l_expected for
select
'UT3_USER' object_owner, 'DUMMY_TEST_PACKAGE' object_name, 'DUMMY_TEST_PACKAGE' item_name,
'dummy_test_suite' item_description, 'UT_SUITE' item_type, 2 item_line_no,
'some.path.dummy_test_package' path, 0 disabled_flag, null disabled_reason,'dummy' tags
from dual union all
select
'UT3_USER' object_owner, 'DUMMY_TEST_PACKAGE' object_name, 'SOME_DUMMY_TEST_PROCEDURE' item_name,
'dummy_test' item_description, 'UT_TEST' item_type, 7 item_line_no,
'some.path.dummy_test_package.some_dummy_test_procedure' path, 0 disabled_flag, null disabled_reason,'testtag' tags
from dual union all
select
'UT3_USER' object_owner, 'PATH' object_name, 'PATH' item_name,
null item_description, 'UT_LOGICAL_SUITE' item_type, null item_line_no,
'some.path' path, 0 disabled_flag, null disabled_reason, null tags
from dual union all
select
'UT3_USER' object_owner, 'SOME' object_name, 'SOME' item_name,
null item_description, 'UT_LOGICAL_SUITE' item_type, null item_line_no,
'some' path, 0 disabled_flag, null disabled_reason, null tags
from dual;
--Act
open l_actual for select * from table(ut3_develop.ut_runner.get_suites_info('UT3_USER','DUMMY_TEST_PACKAGE'));
--Assert
ut.expect(l_actual).to_equal(l_expected);
end;
procedure test_get_suites_info_twotag is
l_expected sys_refcursor;
l_actual sys_refcursor;
begin
--Arrange
open l_expected for
select
'UT3_USER' object_owner, 'DUMMY_TEST_PACKAGE' object_name, 'DUMMY_TEST_PACKAGE' item_name,
'dummy_test_suite' item_description, 'UT_SUITE' item_type, 2 item_line_no,
'dummy_test_package' path, 0 disabled_flag, null disabled_reason,'suitetag1,suitetag2' tags
from dual union all
select
'UT3_USER' object_owner, 'DUMMY_TEST_PACKAGE' object_name, 'SOME_DUMMY_TEST_PROCEDURE' item_name,
'dummy_test' item_description, 'UT_TEST' item_type, 6 item_line_no,
'dummy_test_package.some_dummy_test_procedure' path, 0 disabled_flag, null disabled_reason,'testtag1,testtag2' tags
from dual;
--Act
open l_actual for select * from table(ut3_develop.ut_runner.get_suites_info('UT3_USER','DUMMY_TEST_PACKAGE'));
--Assert
ut.expect(l_actual).to_equal(l_expected);
end;
procedure test_get_suites_info_by_path is
l_expected sys_refcursor;
l_actual sys_refcursor;
begin
--Arrange
open l_expected for
select
'UT3_USER' object_owner, 'DUMMY_TEST_PACKAGE' object_name, 'DUMMY_TEST_PACKAGE' item_name,
'dummy_test_suite' item_description, 'UT_SUITE' item_type, 2 item_line_no,
'some.path.dummy_test_package' path, 0 disabled_flag, null disabled_reason,null tags
from dual union all
select
'UT3_USER' object_owner, 'DUMMY_TEST_PACKAGE' object_name, 'SOME_DUMMY_TEST_PROCEDURE' item_name,
'dummy_test' item_description, 'UT_TEST' item_type, 6 item_line_no,
'some.path.dummy_test_package.some_dummy_test_procedure' path, 0 disabled_flag, null disabled_reason,null tags
from dual union all
select
'UT3_USER' object_owner, 'PATH' object_name, 'PATH' item_name,
null item_description, 'UT_LOGICAL_SUITE' item_type, null item_line_no,
'some.path' path, 0 disabled_flag, null disabled_reason, null tags
from dual union all
select
'UT3_USER' object_owner, 'SOME' object_name, 'SOME' item_name,
null item_description, 'UT_LOGICAL_SUITE' item_type, null item_line_no,
'some' path, 0 disabled_flag, null disabled_reason, null tags
from dual;
--Act
open l_actual for select * from table(ut3_develop.ut_runner.get_suites_info('ut3_user:some.path.dummy_test_package'));
--Assert
ut.expect(l_actual).to_equal(l_expected);
end;
procedure test_get_reporters_list is
l_expected sys_refcursor;
l_actual sys_refcursor;
begin
--Arrange
open l_expected for
select 'UT3_DEVELOP.UT_COVERAGE_COBERTURA_REPORTER' reporter_object_name, 'Y' is_output_reporter from dual union all
select 'UT3_DEVELOP.UT_DEBUG_REPORTER', 'Y' from dual union all
select 'UT3_DEVELOP.UT_COVERAGE_HTML_REPORTER', 'Y' from dual union all
select 'UT3_DEVELOP.UT_COVERAGE_SONAR_REPORTER', 'Y' from dual union all
select 'UT3_DEVELOP.UT_COVERALLS_REPORTER', 'Y' from dual union all
select 'UT3_DEVELOP.UT_DOCUMENTATION_REPORTER', 'Y' from dual union all
select 'UT3_DEVELOP.UT_JUNIT_REPORTER', 'Y' from dual union all
select 'UT3_DEVELOP.UT_REALTIME_REPORTER', 'Y' from dual union all
select 'UT3_DEVELOP.UT_SONAR_TEST_REPORTER', 'Y' from dual union all
select 'UT3_DEVELOP.UT_TEAMCITY_REPORTER', 'Y' from dual union all
select 'UT3_DEVELOP.UT_TFS_JUNIT_REPORTER', 'Y' from dual union all
select 'UT3_DEVELOP.UT_XUNIT_REPORTER', 'Y' from dual union all
select 'UT3_DEVELOP.UT_TAP_REPORTER', 'Y' from dual
order by 1;
--Act
open l_actual for select * from table(ut3_develop.ut_runner.GET_REPORTERS_LIST()) order by 1;
--Assert
ut.expect(l_actual).to_equal(l_expected);
end;
procedure db_link_cleanup is
pragma autonomous_transaction;
begin
ut3_tester_helper.run_helper.db_link_cleanup();
end;
procedure db_link_setup is
pragma autonomous_transaction;
begin
ut3_tester_helper.run_helper.db_link_setup();
end;
procedure raises_20213_on_fail_link is
l_reporter ut3_develop.ut_documentation_reporter := ut3_develop.ut_documentation_reporter();
l_lines ut3_develop.ut_varchar2_list;
pragma autonomous_transaction;
begin
--Arrange
--Act
ut3_develop.ut_runner.run(ut3_develop.ut_varchar2_list('test_db_link'), ut3_develop.ut_reporters(l_reporter), a_fail_on_errors=> true);
ut.fail('Expected exception but nothing was raised');
exception
when others then
--Assert
ut.expect(sqlcode).to_equal(-20213);
ut.expect(dbms_utility.format_error_stack||dbms_utility.format_error_backtrace).not_to_be_like('%ORA-02055%');
end;
procedure create_test_csl_packages is
pragma autonomous_transaction;
begin
execute immediate q'[
create or replace package test_csl_names1 as
--%suite
--%suitepath(test_csl_names)
--%test
procedure one_is_one;
--%test
procedure two_is_two;
end;
]';
execute immediate q'{
create or replace package body test_csl_names1 as
procedure one_is_one is
begin
ut3_develop.ut.expect(1).to_equal(1);
end;
procedure two_is_two is
begin
ut3_develop.ut.expect(2).to_equal(2);
end;
end;
}';
execute immediate q'[
create or replace package test_csl_names2 as
--%suite
--%suitepath(test_csl_names)
--%test
procedure one_is_one;
--%test
procedure two_is_two;
end;
]';
execute immediate q'{
create or replace package body test_csl_names2 as
procedure one_is_one is
begin
ut3_develop.ut.expect(1).to_equal(1);
end;
procedure two_is_two is
begin
ut3_develop.ut.expect(2).to_equal(2);
end;
end;
}';
end;
procedure drop_test_csl_packages is
pragma autonomous_transaction;
begin
execute immediate 'drop package test_csl_names1';
execute immediate 'drop package test_csl_names2';
end;
procedure pass_varchar2_name_list is
l_results ut3_develop.ut_varchar2_list;
l_actual clob;
begin
select *
bulk collect into l_results
from table(ut3_develop.ut.run(ut3_develop.ut_varchar2_list('test_csl_names1','test_csl_names2')));
l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results);
ut.expect(l_actual).to_be_like('%Finished in % seconds
%4 tests, 0 failed, 0 errored, 0 disabled, 0 warning(s)%');
end;
procedure pass_varchar2_name is
l_results ut3_develop.ut_varchar2_list;
l_actual clob;
begin
select *
bulk collect into l_results
from table(ut3_develop.ut.run('test_csl_names1'));
l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results);
ut.expect(l_actual).to_be_like('%Finished in % seconds
%2 tests, 0 failed, 0 errored, 0 disabled, 0 warning(s)%');
end;
procedure pass_varchar2_suite_csl is
l_results ut3_develop.ut_varchar2_list;
l_actual clob;
begin
select *
bulk collect into l_results
from table(ut3_develop.ut.run('test_csl_names1,test_csl_names2'));
l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results);
ut.expect(l_actual).to_be_like('%Finished in % seconds
%4 tests, 0 failed, 0 errored, 0 disabled, 0 warning(s)%');
end;
procedure pass_varchar2_test_csl is
l_results ut3_develop.ut_varchar2_list;
l_actual clob;
begin
select *
bulk collect into l_results
from table(ut3_develop.ut.run('test_csl_names1.one_is_one,test_csl_names2.one_is_one'));
l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results);
ut.expect(l_actual).to_be_like('%Finished in % seconds
%2 tests, 0 failed, 0 errored, 0 disabled, 0 warning(s)%');
end;
procedure pass_varch_test_csl_spc is
l_results ut3_develop.ut_varchar2_list;
l_actual clob;
begin
select *
bulk collect into l_results
from table(ut3_develop.ut.run('test_csl_names1.one_is_one, test_csl_names2.one_is_one'));
l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results);
ut.expect(l_actual).to_be_like('%Finished in % seconds
%2 tests, 0 failed, 0 errored, 0 disabled, 0 warning(s)%');
end;
procedure pass_csl_with_srcfile is
l_results ut3_develop.ut_varchar2_list;
l_actual clob;
begin
select *
bulk collect into l_results
from table(
ut3_develop.ut.run(
a_path => 'test_csl_names1.one_is_one,test_csl_names2.one_is_one',
a_source_files => ut3_develop.ut_varchar2_list('ut3_develop.ut'),
a_test_files => ut3_develop.ut_varchar2_list('ut3_tester.test_csl_names2')
)
);
l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results);
ut.expect(l_actual).to_be_like('%Finished in % seconds
%2 tests, 0 failed, 0 errored, 0 disabled, 0 warning(s)%');
end;
procedure pass_csl_within_var2list is
l_results ut3_develop.ut_varchar2_list;
l_actual clob;
begin
select *
bulk collect into l_results
from table(ut3_develop.ut.run(ut3_develop.ut_varchar2_list('test_csl_names1.one_is_one,test_csl_names2.one_is_one')));
l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results);
ut.expect(l_actual).to_be_like('%Finished in % seconds
%2 tests, 0 failed, 0 errored, 0 disabled, 0 warning(s)%');
end;
procedure is_test_true is
begin
ut.expect(
ut3_develop.ut_runner.is_test(
a_owner => 'UT3_USER',
a_package_name => 'DUMMY_TEST_PACKAGE',
a_procedure_name => 'SOME_DUMMY_TEST_PROCEDURE'
)
).to_be_true();
ut.expect( ut3_develop.ut_runner.is_test( 'ut3_user','dummy_test_package','some_dummy_test_procedure' ) ).to_be_true();
end;
procedure is_test_false is
begin
ut.expect( ut3_develop.ut_runner.is_test( 'UT3_USER','DUMMY_TEST_PACKAGE', 'BAD' ) ).to_be_false();
ut.expect( ut3_develop.ut_runner.is_test( 'UT3_USER','BAD_TEST_PACKAGE', 'some_dummy_test_procedure' ) ).to_be_false();
ut.expect( ut3_develop.ut_runner.is_test( 'UT3_USER','DUMMY_TEST_PACKAGE', null ) ).to_be_false();
ut.expect( ut3_develop.ut_runner.is_test( 'UT3_USER',null,'some_dummy_test_procedure' ) ).to_be_false();
ut.expect( ut3_develop.ut_runner.is_test( null,'DUMMY_TEST_PACKAGE','some_dummy_test_procedure' ) ).to_be_false();
end;
procedure is_suite_true is
begin
ut.expect(
ut3_develop.ut_runner.is_suite(
a_owner => 'UT3_USER',
a_package_name => 'DUMMY_TEST_PACKAGE'
)
).to_be_true();
ut.expect( ut3_develop.ut_runner.is_suite( 'ut3_user','dummy_test_package' ) ).to_be_true();
end;
procedure is_suite_false is
begin
ut.expect( ut3_develop.ut_runner.is_suite( 'UT3_USER','BAD' ) ).to_be_false();
ut.expect( ut3_develop.ut_runner.is_suite( 'UT3_USER', null ) ).to_be_false();
ut.expect( ut3_develop.ut_runner.is_suite( null,'DUMMY_TEST_PACKAGE' ) ).to_be_false();
ut.expect( ut3_develop.ut_runner.is_suite( 'UT3_USER','bad_test_package' ) ).to_be_false();
end;
procedure has_suites_true is
begin
ut.expect( ut3_develop.ut_runner.has_suites( a_owner => 'UT3_USER' ) ).to_be_true();
ut.expect( ut3_develop.ut_runner.has_suites( 'ut3_user' ) ).to_be_true();
end;
procedure has_suites_false is
begin
ut.expect( ut3_develop.ut_runner.has_suites( 'UT3' ) ).to_be_false();
ut.expect( ut3_develop.ut_runner.has_suites( 'BAD' ) ).to_be_false();
ut.expect( ut3_develop.ut_runner.has_suites( null ) ).to_be_false();
end;
end;
/