Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion source/core/ut_suite_builder.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ create or replace package body ut_suite_builder is
l_used_context_names(l_context_name) := true;

l_context := ut_suite_context(a_parent.object_owner, a_parent.object_name, l_context_name, l_context_pos );
l_context.path := a_parent.path||'.'||l_context_name;
l_context.path := a_parent.path||'.'||l_context.name;
l_context.description := coalesce( a_annotations.by_line( l_context_pos ).text, l_context_name );
l_context.parse_time := a_annotations.parse_time;

Expand Down
48 changes: 48 additions & 0 deletions test/ut3_tester/core/test_suite_builder.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -1370,6 +1370,54 @@ create or replace package body test_suite_builder is
);
end;

procedure context_name_case_insensitive is
l_actual clob;
l_annotations ut3_develop.ut_annotations;
begin
--Arrange
l_annotations := ut3_develop.ut_annotations(
ut3_develop.ut_annotation(1, 'suite','Cool', null),
ut3_develop.ut_annotation(2, 'beforeall',null, 'suite_level_beforeall'),
ut3_develop.ut_annotation(3, 'test','In suite', 'suite_level_test'),
ut3_develop.ut_annotation(4, 'context','A context', null),
ut3_develop.ut_annotation(5, 'name','a_Context', null),
ut3_develop.ut_annotation(6, 'beforeall',null, 'context_setup'),
ut3_develop.ut_annotation(7, 'test', 'In context', 'test_in_a_context'),
ut3_develop.ut_annotation(8, 'endcontext',null, null)
);
--Act
l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE');
--Assert
ut.expect(l_actual).to_be_like(
'<ROWSET><ROW>'||
'<UT_LOGICAL_SUITE>' ||
'%<WARNINGS/>' ||
'%<ITEMS>' ||
'<UT_SUITE_ITEM>' ||
'%<NAME>suite_level_test</NAME><DESCRIPTION>In suite</DESCRIPTION><PATH>some_package.suite_level_test</PATH>' ||
'%</UT_SUITE_ITEM>' ||
'<UT_SUITE_ITEM>' ||
'%<NAME>a_context</NAME><DESCRIPTION>A context</DESCRIPTION><PATH>some_package.a_context</PATH>' ||
'%<ITEMS>' ||
'<UT_SUITE_ITEM>' ||
'%<NAME>test_in_a_context</NAME><DESCRIPTION>In context</DESCRIPTION><PATH>some_package.a_context.test_in_a_context</PATH>' ||
'%</UT_SUITE_ITEM>' ||
'</ITEMS>' ||
'<BEFORE_ALL_LIST>' ||
'%<OBJECT_NAME>some_package</OBJECT_NAME><PROCEDURE_NAME>context_setup</PROCEDURE_NAME>' ||
'%</BEFORE_ALL_LIST>' ||
'<AFTER_ALL_LIST/>' ||
'</UT_SUITE_ITEM>' ||
'</ITEMS>' ||
'<BEFORE_ALL_LIST>' ||
'%<OBJECT_NAME>some_package</OBJECT_NAME><PROCEDURE_NAME>suite_level_beforeall</PROCEDURE_NAME>' ||
'%</BEFORE_ALL_LIST>' ||
'<AFTER_ALL_LIST/>' ||
'</UT_LOGICAL_SUITE>'||
'</ROW></ROWSET>'
);
end;

procedure throws_value_empty is
l_actual clob;
l_annotations ut3_develop.ut_annotations;
Expand Down
5 changes: 4 additions & 1 deletion test/ut3_tester/core/test_suite_builder.pks
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ create or replace package test_suite_builder is
--%test(Falls back to default context name and gives warning when name contains spaces)
procedure name_with_spaces_invalid;

--%test(Raises warning when more than one name annotation used )
--%test(Raises warning when more than one name annotation used)
procedure duplicate_name_annotation;

--%test(Is ignored when used outside of context - no warning given)
Expand All @@ -154,6 +154,9 @@ create or replace package test_suite_builder is
--%test(Is applied to corresponding context when multiple contexts used)
procedure multiple_contexts;

--%test(Context name is case insensitive)
procedure context_name_case_insensitive;

--%endcontext

--%context(--%throws annotation)
Expand Down
4 changes: 2 additions & 2 deletions test/ut3_user/reporters/test_tfs_junit_reporter.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ create or replace package body test_tfs_junit_reporter as
--%displayname(Test in and out of context)

-- %context(incontext)
-- %name(ProductincontextFeatures)
-- %name(Production_context_Features)

--%test(inctx)
--%displayname(inctx)
Expand Down Expand Up @@ -298,7 +298,7 @@ create or replace package body test_tfs_junit_reporter as
<testsuites>
<testsuite tests="2" id="1" package="core.check_junit_inout_context" errors="0" failures="0" name="Test in and out of context" time="%" timestamp="%" hostname="%" >
<properties/>
<testcase classname="core.check_junit_inout_context.ProductincontextFeatures" name="inctx" time="%">
<testcase classname="core.check_junit_inout_context.production_context_features" name="inctx" time="%">
</testcase>
<testcase classname="core.check_junit_inout_context" name="outctx" time="%">
</testcase>
Expand Down
Loading