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

Skip to content

Commit a444afd

Browse files
committed
test_output_buffer.pck finished
1 parent 9c64414 commit a444afd

1 file changed

Lines changed: 24 additions & 1 deletion

File tree

tests2/test_output_buffer.pck

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ create or replace package test_output_buffer is
1212
--%test(Does not send line if null text given)
1313
procedure test_doesnt_send_on_null_text;
1414

15-
--test(Sends a line into buffer table)
15+
--%test(Sends a line into buffer table)
1616
procedure test_send_line;
17+
18+
--%test(Waits For The Data To Appear For Specified Time)
19+
procedure test_waiting_for_data;
1720

1821
end test_output_buffer;
1922
/
@@ -75,5 +78,25 @@ create or replace package body test_output_buffer is
7578
ut.expect(l_result).to_equal(c_expected);
7679
end;
7780

81+
procedure test_waiting_for_data is
82+
l_result varchar2(4000);
83+
l_remaining integer;
84+
l_expected varchar2(4000);
85+
l_reporter ut_reporter_base := ut_documentation_reporter();
86+
begin
87+
--Act
88+
l_expected := lpad('a text',4000,',a text');
89+
ut_output_buffer.send_line(l_reporter, l_expected);
90+
91+
select * into l_result from table(ut_output_buffer.get_lines(l_reporter.reporter_id,0));
92+
93+
ut.expect(l_result).to_equal(l_expected);
94+
95+
select count(1) into l_remaining from ut_output_buffer_tmp where reporter_id = l_reporter.reporter_id;
96+
97+
ut.expect(l_remaining).to_equal(0);
98+
99+
end;
100+
78101
end test_output_buffer;
79102
/

0 commit comments

Comments
 (0)