Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
48abf1a
Initial checkin
lwasylow Jun 1, 2020
7041912
added expectation
lwasylow Jun 2, 2020
13d86b6
Adding more methods
lwasylow Jun 2, 2020
caeeb30
Adding contain and not contain
lwasylow Jun 2, 2020
8ff4f6b
Adding code and tests,.
lwasylow Jun 6, 2020
89cb0bc
Fixingtoo long names
lwasylow Jun 6, 2020
a5481ac
fixing issue
lwasylow Jun 6, 2020
9ee0e75
Update documentation and tests
lwasylow Jun 7, 2020
a660208
First code corrections
lwasylow Jun 14, 2020
ada1ea4
Resolving another comment
lwasylow Jun 14, 2020
fe1b0cb
Updating issues
lwasylow Jun 14, 2020
013db74
Update tble
lwasylow Jun 14, 2020
b5c73b4
Separated into two different matchers
jgebal Jun 19, 2020
2e721da
CHECKPOINT
lwasylow Jun 19, 2020
fbc0f26
Merge branch 'feature/rework_matcher' of https://github.com/utPLSQL/u…
lwasylow Jun 19, 2020
f182430
Update uninstall
lwasylow Jun 19, 2020
e3fb2d7
Update progress
lwasylow Jun 19, 2020
322e0a1
Making code a bit more readable
lwasylow Jun 19, 2020
ff15596
Added tests for `be_within_pct`
jgebal Jun 20, 2020
3cae9a2
Fixed test issue
jgebal Jun 20, 2020
22549db
Fixed stacktrace for failed expectations on chained matchers.
jgebal Jun 21, 2020
1d771a5
Update timestamps
lwasylow Jun 25, 2020
363c333
Fixed and simplified matcher
jgebal Jun 27, 2020
0ea8925
Fixed native dynamic SQL types compatibility for 11g
jgebal Jun 28, 2020
7c01afb
Fixed native dynamic SQL types compatibility for 11g
jgebal Jun 28, 2020
66d92fc
Merge branch 'develop' into feature/rework_matcher
jgebal Jan 28, 2022
590fb38
Improving test stability (flaky tests)
jgebal Jan 28, 2022
5e2642a
Removing reference to ut3_develop schema.
jgebal Jan 28, 2022
ed06e33
Relaxed sql-injection check to work with 11g2
jgebal Jan 28, 2022
38f3cbc
Fixed issues with comparison of dates&timestamps using interval year-…
jgebal Jan 30, 2022
86e84c8
Improving code coverage.
jgebal Jan 31, 2022
718ac0d
Improved test stability.
jgebal Jan 31, 2022
6dbef20
Fixing build process to build using develop branch as testing framewo…
jgebal Jan 31, 2022
25b55b4
Improving test coverage.
jgebal Jan 31, 2022
5b5a5c0
Improving matcher documentation
jgebal Jan 31, 2022
7fec0f9
Added tests for 0 value of actual and expected and actual greater tha…
jgebal Feb 2, 2022
fd7ef9c
Fixed issues with precission of distance. `NATURAL` is a subtype of i…
jgebal Feb 2, 2022
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
Next Next commit
Initial checkin
  • Loading branch information
lwasylow committed Jun 1, 2020
commit 48abf1a83c36ca44c2f395eceea5473ac99a0221
7 changes: 7 additions & 0 deletions source/expectations/matchers/ut_equal.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,13 @@ create or replace type body ut_equal as
return l_result;
end;

member procedure include(self in ut_equal, a_items varchar2) is
--l_result ut_equal := self;
begin
null;
--l_result.expectation.to_(l_result );
end;

member function exclude(a_items varchar2) return ut_equal is
l_result ut_equal := self;
begin
Expand Down
3 changes: 2 additions & 1 deletion source/expectations/matchers/ut_equal.tps
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ create or replace type ut_equal force under ut_comparison_matcher(
constructor function ut_equal(self in out nocopy ut_equal, a_expected dsinterval_unconstrained, a_nulls_are_equal boolean := null) return self as result,
constructor function ut_equal(self in out nocopy ut_equal, a_expected json_element_t, a_nulls_are_equal boolean := null) return self as result,
member function include(a_items varchar2) return ut_equal,
member procedure include(self in ut_equal, a_items varchar2),
member function include(a_items ut_varchar2_list) return ut_equal,
member function exclude(a_items varchar2) return ut_equal,
member function exclude(a_items ut_varchar2_list) return ut_equal,
Expand All @@ -56,4 +57,4 @@ create or replace type ut_equal force under ut_comparison_matcher(
member function uc return ut_equal
)
not final
/

7 changes: 3 additions & 4 deletions source/expectations/matchers/ut_matcher.tps
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
create or replace type ut_matcher authid current_user as object(
create or replace type ut_matcher force under ut_matcher_base(
/*
utPLSQL - Version 3
Copyright 2016 - 2019 utPLSQL Project
Expand All @@ -15,10 +15,9 @@ create or replace type ut_matcher authid current_user as object(
See the License for the specific language governing permissions and
limitations under the License.
*/
self_type varchar2(250),
is_errored integer,
is_negated_flag number(1,0),

expectation ut_expectation,
/*
function: run_matcher

Expand All @@ -41,4 +40,4 @@ create or replace type ut_matcher authid current_user as object(
member function negated return ut_matcher,
member function is_negated return boolean
) not final not instantiable
/

20 changes: 20 additions & 0 deletions source/expectations/matchers/ut_matcher_base.tpb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
create or replace type body ut_matcher_base as
/*
utPLSQL - Version 3
Copyright 2016 - 2019 utPLSQL Project

Licensed under the Apache License, Version 2.0 (the "License"):
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

end;
/
4 changes: 4 additions & 0 deletions source/expectations/matchers/ut_matcher_base.tps
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
create or replace type ut_matcher_base force authid current_user as object(
self_type varchar2(250)
)
not final not instantiable
10 changes: 5 additions & 5 deletions source/expectations/ut_expectation.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ create or replace type body ut_expectation as
See the License for the specific language governing permissions and
limitations under the License.
*/
member procedure to_(self in ut_expectation, a_matcher ut_matcher) is
member procedure to_(self in ut_expectation, a_matcher ut_matcher_base) is
l_expectation_result boolean;
l_matcher ut_matcher := a_matcher;
l_matcher ut_matcher := treat(a_matcher as ut_matcher);
l_message varchar2(32767);
begin
if a_matcher.is_negated() then
if l_matcher.is_negated() then
self.not_to( a_matcher );
else
l_expectation_result := l_matcher.run_matcher( self.actual_data );
Expand All @@ -30,9 +30,9 @@ create or replace type body ut_expectation as
end if;
end;

member procedure not_to(self in ut_expectation, a_matcher ut_matcher) is
member procedure not_to(self in ut_expectation, a_matcher ut_matcher_base) is
l_expectation_result boolean;
l_matcher ut_matcher := a_matcher;
l_matcher ut_matcher := treat(a_matcher as ut_matcher);
l_message varchar2(32767);
begin
l_expectation_result := coalesce( l_matcher.run_matcher_negated( self.actual_data ), false );
Expand Down
8 changes: 4 additions & 4 deletions source/expectations/ut_expectation.tps
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
create or replace type ut_expectation authid current_user as object(
create or replace type ut_expectation force authid current_user as object(
/*
utPLSQL - Version 3
Copyright 2016 - 2019 utPLSQL Project
Expand All @@ -19,8 +19,8 @@ create or replace type ut_expectation authid current_user as object(
description varchar2(4000 char),

--base matcher executors
member procedure to_(self in ut_expectation, a_matcher ut_matcher),
member procedure not_to(self in ut_expectation, a_matcher ut_matcher),
member procedure to_(self in ut_expectation, a_matcher ut_matcher_base),
member procedure not_to(self in ut_expectation, a_matcher ut_matcher_base),

--shortcuts
member procedure to_be_null(self in ut_expectation),
Expand Down Expand Up @@ -172,4 +172,4 @@ create or replace type ut_expectation authid current_user as object(

)
not final
/

5 changes: 3 additions & 2 deletions source/expectations/ut_expectation_compound.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ create or replace type body ut_expectation_compound as
return l_result;
end;

member function to_equal(a_expected sys_refcursor, a_nulls_are_equal boolean := null) return ut_expectation_compound is
member function to_equal(a_expected sys_refcursor, a_nulls_are_equal boolean := null) return ut_equal is
l_result ut_expectation_compound := self;
begin
l_result.matcher := ut_equal(a_expected, a_nulls_are_equal);
return l_result;
l_result.matcher.expectation := l_result;
return treat(l_result.matcher as ut_equal);
end;

member function not_to_equal(a_expected sys_refcursor, a_nulls_are_equal boolean := null) return ut_expectation_compound is
Expand Down
4 changes: 2 additions & 2 deletions source/expectations/ut_expectation_compound.tps
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ create or replace type ut_expectation_compound force under ut_expectation(

member function to_equal(a_expected anydata, a_nulls_are_equal boolean := null) return ut_expectation_compound,
member function not_to_equal(a_expected anydata, a_nulls_are_equal boolean := null) return ut_expectation_compound,
member function to_equal(a_expected sys_refcursor, a_nulls_are_equal boolean := null) return ut_expectation_compound,
member function to_equal(a_expected sys_refcursor, a_nulls_are_equal boolean := null) return ut_equal,
member function not_to_equal(a_expected sys_refcursor, a_nulls_are_equal boolean := null) return ut_expectation_compound,
member function to_contain(a_expected sys_refcursor) return ut_expectation_compound,
member function not_to_contain(a_expected sys_refcursor) return ut_expectation_compound,
Expand All @@ -51,4 +51,4 @@ create or replace type ut_expectation_compound force under ut_expectation(
member function uc return ut_expectation_compound,
member procedure uc(self in ut_expectation_compound)
)
/