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

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/develop' into feature/nested_con…
…text

# Conflicts:
#	test/ut3_tester/core/test_suite_builder.pkb
#	test/ut3_tester/core/test_suite_builder.pks
  • Loading branch information
jgebal committed Oct 23, 2019
commit 837bd47a23926b00812a128a762502c05ade1f44
60 changes: 60 additions & 0 deletions test/ut3_tester/core/test_suite_builder.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -1528,7 +1528,67 @@ create or replace package body test_suite_builder is
'%<TAGS><VARCHAR2>#?$%^&amp;*!|\/@][</VARCHAR2></TAGS>%'||
'%</UT_LOGICAL_SUITE>%'
);

end;

procedure test_spaces_in_tag is
l_actual clob;
l_annotations ut3.ut_annotations;
begin
--Arrange
l_annotations := ut3.ut_annotations(
ut3.ut_annotation(2, 'suite','testsuite', null),
ut3.ut_annotation(3, 'tags',' good_tag , bad tag , good-tag ', null),
ut3.ut_annotation(8, 'test','Some test', 'test_procedure'),
ut3.ut_annotation(9, 'tags',' good_tag , bad tag , good-tag ', 'test_procedure')
);
--Act
l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE');
--Assert
ut.expect(l_actual).to_be_like(
'%<TAGS><VARCHAR2>good_tag</VARCHAR2><VARCHAR2>good-tag</VARCHAR2></TAGS>%'||
'<TAGS><VARCHAR2>good_tag</VARCHAR2><VARCHAR2>good-tag</VARCHAR2></TAGS>%'
);
ut.expect(l_actual).to_be_like(
'%<WARNINGS><VARCHAR2>Invalid value &quot;bad tag&quot; for &quot;--%tags&quot; annotation.'||
' See documentation for details on valid tag values. Annotation value ignored.
at package &quot;UT3_TESTER.SOME_PACKAGE&quot;, line 3</VARCHAR2><VARCHAR2>%'
);
ut.expect(l_actual).to_be_like(
'%<VARCHAR2>Invalid value &quot;bad tag&quot; for &quot;--%tags&quot; annotation.'||
' See documentation for details on valid tag values. Annotation value ignored.
at package &quot;UT3_TESTER.SOME_PACKAGE.TEST_PROCEDURE&quot;, line 9</VARCHAR2></WARNINGS>%'
);
end;

procedure test_minus_in_tag is
l_actual clob;
l_annotations ut3.ut_annotations;
begin
--Arrange
l_annotations := ut3.ut_annotations(
ut3.ut_annotation(2, 'suite','testsuite', null),
ut3.ut_annotation(3, 'tags',' good_tag , -invalid_tag , good-tag ', null),
ut3.ut_annotation(8, 'test','Some test', 'test_procedure'),
ut3.ut_annotation(9, 'tags',' good_tag , -invalid_tag , good-tag ', 'test_procedure')
);
--Act
l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE');
--Assert
ut.expect(l_actual).to_be_like(
'%<TAGS><VARCHAR2>good_tag</VARCHAR2><VARCHAR2>good-tag</VARCHAR2></TAGS>%'||
'<TAGS><VARCHAR2>good_tag</VARCHAR2><VARCHAR2>good-tag</VARCHAR2></TAGS>%'
);
ut.expect(l_actual).to_be_like(
'%<WARNINGS><VARCHAR2>Invalid value &quot;-invalid_tag&quot; for &quot;--%tags&quot; annotation.'||
' See documentation for details on valid tag values. Annotation value ignored.
at package &quot;UT3_TESTER.SOME_PACKAGE&quot;, line 3</VARCHAR2><VARCHAR2>%'
);
ut.expect(l_actual).to_be_like(
'%<VARCHAR2>Invalid value &quot;-invalid_tag&quot; for &quot;--%tags&quot; annotation.'||
' See documentation for details on valid tag values. Annotation value ignored.
at package &quot;UT3_TESTER.SOME_PACKAGE.TEST_PROCEDURE&quot;, line 9</VARCHAR2></WARNINGS>%'
);
end;

end test_suite_builder;
Expand Down
24 changes: 12 additions & 12 deletions test/ut3_tester/core/test_suite_builder.pks
Original file line number Diff line number Diff line change
Expand Up @@ -116,23 +116,23 @@ create or replace package test_suite_builder is
--%test(Creates nested suite for content between context/endcontext annotations)
procedure suite_from_context;

--%test(Creates nested contexts inside a context)
procedure nested_contexts;
--%test(Creates nested contexts inside a context)
procedure nested_contexts;

--%test(Associates before/after all/each to tests in context only)
procedure before_after_in_context;
--%test(Associates before/after all/each to tests in context only)
procedure before_after_in_context;

--%test(Propagates beforeeach/aftereach to context)
procedure before_after_out_of_context;
--%test(Propagates beforeeach/aftereach to context)
procedure before_after_out_of_context;

--%test(Gives warning when endcontext is missing)
procedure context_without_endcontext;
--%test(Gives warning when endcontext is missing)
procedure context_without_endcontext;

--%test(Gives warning if --%endcontext is missing a preceding --%context)
procedure endcontext_without_context;
--%test(Gives warning if --%endcontext is missing a preceding --%context)
procedure endcontext_without_context;

--%test(Gives warning when two contexts have the same name and ignores duplicated context)
procedure duplicate_context_name;
--%test(Gives warning when two contexts have the same name and ignores duplicated context)
procedure duplicate_context_name;

--%endcontext

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.