Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7b34109

Browse files
committed
Unit-Test for get_reporters_list
1 parent 5272342 commit 7b34109

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

test/api/test_ut_runner.pkb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,5 +275,25 @@ end;';
275275
ut.expect(l_actual).to_equal(l_expected);
276276
end;
277277

278+
procedure test_get_reporters_list is
279+
l_expected sys_refcursor;
280+
l_actual sys_refcursor;
281+
l_owner varchar2(128) := ut_utils.ut_owner();
282+
begin
283+
--Arrange
284+
open l_expected for
285+
select l_owner || '.UT_COVERAGE_HTML_REPORTER' reporter_object_name, 'Y' is_output_reporter from dual union all
286+
select l_owner || '.UT_COVERAGE_SONAR_REPORTER', 'Y' from dual union all
287+
select l_owner || '.UT_COVERALLS_REPORTER', 'Y' from dual union all
288+
select l_owner || '.UT_DOCUMENTATION_REPORTER', 'Y' from dual union all
289+
select l_owner || '.UT_SONAR_TEST_REPORTER', 'Y' from dual union all
290+
select l_owner || '.UT_TEAMCITY_REPORTER', 'Y' from dual union all
291+
select l_owner || '.UT_XUNIT_REPORTER', 'Y' from dual;
292+
--Act
293+
open l_actual for select * from table(ut3.ut_runner.GET_REPORTERS_LIST()) order by 1;
294+
--Assert
295+
ut.expect(l_actual).to_equal(l_expected);
296+
end;
297+
278298
end;
279299
/

test/api/test_ut_runner.pks

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,10 @@ create or replace package test_ut_runner is
4848
--%aftertest(cleanup_cache)
4949
procedure test_get_unit_test_info;
5050

51+
--%test(get_reporters_list returns a cursor containing all built-in reporters and information about output-reporter)
52+
--%beforetest(setup_cache_objects)
53+
--%aftertest(cleanup_cache)
54+
procedure test_get_reporters_list;
55+
5156
end;
5257
/

0 commit comments

Comments
 (0)