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
Show all changes
148 commits
Select commit Hold shift + click to select a range
42d8d45
Initial check in
lwasylow Oct 6, 2018
2360ca4
First working stab. No messages defined.
lwasylow Oct 6, 2018
dd63970
Include matcher
lwasylow Oct 6, 2018
81240fb
Updated install and deinstall
lwasylow Oct 6, 2018
440670b
Update install
lwasylow Oct 10, 2018
a0ee195
Added tests for include
lwasylow Oct 11, 2018
314b998
Added test for to_contain
lwasylow Oct 11, 2018
6193ff3
Adding negated matcher
lwasylow Oct 11, 2018
f798e39
Added tests and negated code
lwasylow Oct 14, 2018
86276ec
Fixing test dependency on NLS settings.
jgebal Oct 19, 2018
7b037d4
Adding fix to avoid running sonar-scanner on external pull-requests.
jgebal Oct 19, 2018
b2f1b96
Updated project version after build [skip ci]
Oct 19, 2018
80ea7d7
Change CLI version to 3.1.0.
PhilippSalvisberg Oct 19, 2018
3d3a2e8
ignore temporary files created by actions described in CONTRIBUTING.md
PhilippSalvisberg Oct 19, 2018
7170cda
Updated project version after build [skip ci]
Oct 19, 2018
59b1ead
fix to unordered.
lwasylow Oct 20, 2018
4d2a890
Updated project version after build [skip ci]
Oct 20, 2018
29e1bf7
Moving uninstall tests to child job no 2 - (12.1) as it is now fastes…
jgebal Oct 20, 2018
45448ac
Disabling compilation with PLSQL compiler warnings.
jgebal Oct 21, 2018
add5ed8
Updated project version after build [skip ci]
Oct 21, 2018
f39b96a
Update not to include
lwasylow Oct 21, 2018
9557daa
Merge branch 'develop' of github.com:utPLSQL/utPLSQL into feature/mat…
lwasylow Oct 21, 2018
5aa19ea
Update some of the format
lwasylow Oct 21, 2018
03ad5ec
Update documentation
lwasylow Oct 27, 2018
18d89f6
Merge branch 'develop' of https://github.com/utPLSQL/utPLSQL into fea…
lwasylow Nov 1, 2018
74c3648
Merge branch 'develop' of https://github.com/utPLSQL/utPLSQL into fea…
lwasylow Nov 1, 2018
42563e9
Update documentation and added additional test.
lwasylow Nov 1, 2018
3e685e8
Merge branch 'feature/matcher_include' of https://github.com/utPLSQL/…
lwasylow Nov 1, 2018
2a133a1
Fix to issue #770 when the merge statement is run via current user wh…
lwasylow Oct 27, 2018
68d43d6
Added test for min user test
lwasylow Oct 28, 2018
afe9e2c
Update sqlcl download
lwasylow Oct 28, 2018
12edb2a
Squashed commit of the following:
lwasylow Nov 1, 2018
9dbb4e5
Update run test shell.
lwasylow Nov 1, 2018
8752509
Update shell
lwasylow Nov 1, 2018
4138d25
Added extra test for duplicate.
lwasylow Nov 1, 2018
8388276
First stab
lwasylow Nov 3, 2018
9741948
Added belt and braces for big cartesian
lwasylow Nov 4, 2018
be55366
Inserting only first max display rows
lwasylow Nov 5, 2018
ae3d34f
Remove clob transformation
lwasylow Nov 5, 2018
b4113fd
Check in progress of working version.
lwasylow Nov 6, 2018
816a1c1
Beautify sql generation
lwasylow Nov 6, 2018
e5de7d2
Tidy up
lwasylow Nov 6, 2018
9843e14
Code updates for pure sql
lwasylow Nov 8, 2018
ab593d9
Update code to consolidate compare sqls into one place where is gener…
lwasylow Nov 9, 2018
4d3dadc
Update for 11g where error about inline with was raised.
lwasylow Nov 9, 2018
d9ccc83
Fix to sql diff to resolve 11g optimizer rewrite error
lwasylow Nov 9, 2018
c009a86
Update code to bring all code into one place.
lwasylow Nov 10, 2018
ecaf48a
Add some bigger tests
lwasylow Nov 10, 2018
af8b49a
Update rownumber generated
lwasylow Nov 11, 2018
c633ff5
Update code with bug fixes
lwasylow Nov 11, 2018
ee7bdf2
Update order
lwasylow Nov 11, 2018
5b46ab0
Updated code for tests.
lwasylow Nov 12, 2018
c997616
Added cursor info code
lwasylow Nov 13, 2018
2b9d4f3
Capture cursor info and filter it out
lwasylow Nov 15, 2018
fc905ac
Saving progress
lwasylow Nov 16, 2018
107a30b
Updated progress by capturing a nested types in hierarchy structured …
lwasylow Nov 17, 2018
6726f1a
Saving progress
lwasylow Nov 18, 2018
e4043b5
Updates to include nested an collections
lwasylow Nov 19, 2018
6cb5fe7
Further deprecation of Xpath
lwasylow Nov 20, 2018
1356f39
Update to cursor comparision
lwasylow Nov 20, 2018
b094911
Update tests
lwasylow Nov 21, 2018
21dca2b
Resolve issue with nested table being join
lwasylow Nov 21, 2018
6e034bf
Merge branch 'develop' of https://github.com/utPLSQL/utPLSQL into fea…
lwasylow Nov 21, 2018
9dc266e
Update test to be more generic
lwasylow Nov 21, 2018
d96d602
remove schema quantifier
lwasylow Nov 21, 2018
2b90c4b
remove schema quantifier
lwasylow Nov 21, 2018
416df70
Merge branch 'feature/pure_sql' of https://github.com/utPLSQL/utPLSQL…
lwasylow Nov 24, 2018
3759e90
Phase 2. Removal of x path and clean-up deprecated code
lwasylow Nov 26, 2018
35d200c
Merge branch 'develop' of https://github.com/utPLSQL/utPLSQL into fea…
lwasylow Nov 26, 2018
29fe2e1
Update stylecheck
lwasylow Nov 26, 2018
1c0582b
Update test time exec
lwasylow Nov 26, 2018
7837eb4
Anydata refactoring.
lwasylow Nov 28, 2018
e082b75
Improvements to extraction of cursor details using anydata to allow g…
lwasylow Dec 1, 2018
815deac
Updates to documentation
lwasylow Dec 2, 2018
cf0c592
Sorting out some duplicate code.
lwasylow Dec 2, 2018
c156852
Cleanup of code
lwasylow Dec 2, 2018
d8525d6
Change behaviour to compare columns regardless of column position in …
lwasylow Dec 2, 2018
48ad81e
Small fixes and updates regarding peer review.
lwasylow Dec 7, 2018
3ff1e27
Updated paths to venn diagram images
jgebal Dec 9, 2018
69da762
Fixed formatting of examples.
jgebal Dec 9, 2018
8697cea
Added missing synonyms for new matchers `contain / include`
jgebal Dec 9, 2018
1645445
Formatting fixes.
jgebal Dec 9, 2018
62c12cd
Removed unused variables.
jgebal Dec 9, 2018
ca9f8eb
Formatting fixes.
jgebal Dec 9, 2018
004b537
Refactoring recursive calls for resolving complex types in cursor.
jgebal Dec 10, 2018
ada957d
Fixed exception handling on `anytype.getpersistent`
jgebal Dec 10, 2018
2ff110d
Change cursor behaviour to be ordered columns by default.
lwasylow Dec 11, 2018
bd54710
Adding short-name for unordered columns option UC.
lwasylow Dec 11, 2018
6f830dc
Minor formatting and warnings fixed
jgebal Dec 12, 2018
a67b853
Merge branch 'develop' into feature/pure_sql
lwasylow Dec 12, 2018
45643e0
Tidy up code
lwasylow Dec 13, 2018
1e71c99
Adding a new expectation type to specialize unordered_columns only to…
lwasylow Dec 13, 2018
470bb32
A bit of code cleanup
jgebal Jan 3, 2019
b64443d
Fixed cleanup issues.
jgebal Jan 4, 2019
c2d52ae
resolved sonar violations
jgebal Jan 5, 2019
0c994a4
Merge branch 'develop' into feature/pure_sql
jgebal Jan 5, 2019
fab120e
Merge branch 'develop' into feature/pure_sql
jgebal Jan 12, 2019
4663e3b
Merge branch 'develop' into feature/pure_sql
jgebal Jan 13, 2019
9ddc332
Merge branch 'develop' into feature/pure_sql
jgebal Jan 31, 2019
b4483a7
Merge remote-tracking branch 'origin/develop' into feature/pure_sql
jgebal Feb 4, 2019
62e5d80
Fixed doc link
jgebal Feb 4, 2019
d7a2711
Fixed issue with spaces in column lists.
jgebal Feb 5, 2019
97cd079
Improved documentation for `unordered` and `unordered_columns` options.
jgebal Feb 12, 2019
94e58a0
Refactoring - to be continued.
jgebal Feb 14, 2019
08ed9ab
Refactoring - to be continued.
jgebal Feb 15, 2019
90aca9f
Refactoring - to be continued.
jgebal Feb 15, 2019
24c14f9
Refactoring - to be continued.
jgebal Feb 16, 2019
f850428
Fixed issue with DBMS_LOB.COMPARE when empty XML produced.
jgebal Feb 16, 2019
917828c
Refactoring.
jgebal Feb 17, 2019
80563f8
Refactoring.
jgebal Feb 19, 2019
faf3d12
Rework dynamic sql generation to more readible format.
lwasylow Feb 22, 2019
6306af6
Rework dynamic sql generation to more readible format.
lwasylow Feb 22, 2019
daa8ec3
fixing issue with order of data.
lwasylow Feb 23, 2019
ab55d12
fixing issue with order of data.
lwasylow Feb 23, 2019
7676a9a
Merge branch 'feature/pure_sql' of https://github.com/utPLSQL/utPLSQL…
lwasylow Feb 23, 2019
dd7e868
Renamed `ut_include` to `ut_contain`.
jgebal Feb 24, 2019
9fccd1d
Wrapping up anydata into cursor
lwasylow Feb 23, 2019
6421ec8
Merge branch 'feature/pure_sql' of https://github.com/utPLSQL/utPLSQL…
lwasylow Feb 24, 2019
061895a
Wrapping up anydata into cursor
lwasylow Feb 24, 2019
7bb5533
Fixing issue with null object and counts
lwasylow Feb 26, 2019
147a506
Fixing issues with null and empty objects / collections
lwasylow Mar 1, 2019
5dd4d42
Shorter tests names and removal of unused types files.
lwasylow Mar 2, 2019
01e93e7
Wrapping in the quota column name in cursor as it uses a type value w…
lwasylow Mar 2, 2019
2c8cd32
Fixing issue with refcursor in anydata.
lwasylow Mar 4, 2019
bbb9020
Adding cursor closure
lwasylow Mar 4, 2019
09b43da
Adding in out
lwasylow Mar 4, 2019
9961dbc
Testing fix for issue with cursors
lwasylow Mar 5, 2019
2534c96
fixing cursor issue
lwasylow Mar 5, 2019
dea6d3c
Refactoring.
lwasylow Mar 5, 2019
bf4a25a
Merge branch 'feature/pure_sql' of https://github.com/utPLSQL/utPLSQL…
lwasylow Mar 6, 2019
e32d700
Refactoring
lwasylow Mar 6, 2019
2dab607
Merge branch 'develop' into feature/pure_sql
lwasylow Mar 6, 2019
5c1ef69
Update sonar sh
lwasylow Mar 6, 2019
b91ea69
Fixing SONAR errors
lwasylow Mar 6, 2019
e8e5772
Merge branch 'feature/pure_sql' of https://github.com/utPLSQL/utPLSQL…
lwasylow Mar 6, 2019
7a77a7f
small improvments
lwasylow Mar 8, 2019
cfada15
Remove tests as its not replicating issue
lwasylow Mar 8, 2019
b823922
Merge branch 'develop' into feature/pure_sql
jgebal Mar 8, 2019
c583319
Adding extra tests for collection with join_by and unordered
lwasylow Mar 12, 2019
46fb8ff
Merge branch 'feature/pure_sql' of https://github.com/utPLSQL/utPLSQL…
lwasylow Mar 12, 2019
3aa872b
Updated docs/userguide/advanced_data_comparison.md
lwasylow Mar 12, 2019
3e4e1a8
Fixing a conversion of date when extracting XML DATE,TS, TS_TZ,TS_LTS…
lwasylow Mar 14, 2019
898bec2
Fixed support for different DATE NLS settings.
jgebal Mar 15, 2019
6590735
Merge remote-tracking branch 'origin/develop' into feature/pure_sql
jgebal Mar 15, 2019
05adfa2
Moving expectations for compound into single type and removing expect…
lwasylow Mar 15, 2019
ca64da8
Merge branch 'feature/pure_sql' of https://github.com/utPLSQL/utPLSQL…
lwasylow Mar 15, 2019
10a6bf7
Update docs
lwasylow Mar 15, 2019
76c068e
Merge branch 'develop' into feature/pure_sql
lwasylow Mar 15, 2019
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
Renamed ut_include to ut_contain.
  • Loading branch information
jgebal committed Feb 24, 2019
commit dd7e86869d69421011b23aa0b164cf89a158fd2d
10 changes: 5 additions & 5 deletions docs/userguide/advanced_data_comparison.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Advanced data-comparison options are available for the [`equal`](expectations.md
ut.expect( a_actual {data-type} ).not_to( equal( a_expected {data-type})[.extendend_option()[.extendend_option()[...]]]) );
ut.expect( a_actual {data-type} ).to_equal( a_expected {data-type})[.extendend_option()[.extendend_option()[...]]]);
ut.expect( a_actual {data-type} ).not_to_equal( a_expected {data-type})[.extendend_option()[.extendend_option()[...]]] );
ut.expect( a_actual {data-type} ).to_( contain( a_expected {data-type})[.extendend_option()[.extendend_option()[...]]]);
ut.expect( a_actual {data-type} ).not_to( contain( a_expected {data-type})[.extendend_option()[.extendend_option()[...]]]) );
ut.expect( a_actual {data-type} ).to_contain( a_expected {data-type})[.extendend_option()[.extendend_option()[...]]]);
ut.expect( a_actual {data-type} ).to_include( a_expected {data-type})[.extendend_option()[.extendend_option()[...]]]);
ut.expect( a_actual {data-type} ).not_to_include( a_expected {data-type})[.extendend_option()[.extendend_option()[...]]]);
ut.expect( a_actual {data-type} ).not_to_contain( a_expected {data-type})[.extendend_option()[.extendend_option()[...]]]);
```

Expand Down Expand Up @@ -61,7 +61,7 @@ procedure test_cur_skip_columns_cn is
begin
open l_expected for select 'text' ignore_me, d.* from user_tables d where rownum = 1;
open l_actual for select sysdate "ADate", d.* from user_tables d;
ut.expect( l_actual ).to_include( l_expected ).exclude( 'IGNORE_ME,ADate' );
ut.expect( l_actual ).to_contain( l_expected ).exclude( 'IGNORE_ME,ADate' );
end;
```

Expand Down Expand Up @@ -230,7 +230,7 @@ end;
Above test will indicate that in actual data-set

```sql
Actual: refcursor [ count = 43 ] was expected to include: refcursor [ count = 44 ]
Actual: refcursor [ count = 43 ] was expected to contain: refcursor [ count = 44 ]
Diff:
Rows: [ 1 differences ]
PK <USERNAME>TEST</USERNAME> - Missing <USER_ID>-610</USER_ID>
Expand Down Expand Up @@ -404,7 +404,7 @@ create or replace package body test_unordered_columns as
and rownum < 20;

--Assert
ut.expect(l_actual).to_include(l_expected).unordered_columns();
ut.expect(l_actual).to_contain(l_expected).unordered_columns();
end;
end;
/
Expand Down
102 changes: 53 additions & 49 deletions docs/userguide/expectations.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ utPLSQL provides the following matchers to perform checks on the expected and ac
- `be_null`
- `be_true`
- `equal`
- `include ` / `contain`
- `contain`
- `have_count`
- `match`

Expand Down Expand Up @@ -433,17 +433,17 @@ end;
The `a_nulls_are_equal` parameter controls the behavior of a `null = null` comparison.
To change the behavior of `NULL = NULL` comparison pass the `a_nulls_are_equal => false` to the `equal` matcher.

## include / contain
## contain

This matcher supports only cursor comparison. It check if the give set contain all values from given subset.
Comment thread
jgebal marked this conversation as resolved.
Outdated

when comparing data using `include / contain` matcher, the data-types of columns for compared cursors must be exactly the same.
When comparing data using `contain` matcher, the data-types of columns for compared cursors must be exactly the same.

The matcher supports all advanced comparison options as `equal` e.g. include , exclude, join_by.
The matcher supports all advanced comparison options as `equal` like: `include` , `exclude`, `join_by` etc..

The matcher is successful when all of the values from expected results are included in actual data set.
The matcher is successful when actual data set contains all of the values from expected results.

The matcher will cause a test to fail if any of expected values are not included in actual data set.
The matcher will cause a test to fail if actual data set does not contain any of expected values.

![included_set](../images/venn21.gif)

Expand All @@ -460,23 +460,23 @@ The matcher will cause a test to fail if any of expected values are not included
union all select rownum as rn from dual a connect by level < 4;

--Act
ut.expect(l_actual).to_include(l_expected);
ut.expect(l_actual).to_contain(l_expected);
end;
```

Will result in failure message

```sql
1) ut_refcursors
Actual: refcursor [ count = 9 ] was expected to include: refcursor [ count = 6 ]
Actual: refcursor [ count = 9 ] was expected to contain: refcursor [ count = 6 ]
Diff:
Rows: [ 3 differences ]
Missing: <ROW><RN>3</RN></ROW>
Missing: <ROW><RN>2</RN></ROW>
Missing: <ROW><RN>1</RN></ROW>
```

When duplicate rows are present in expected data set, actual data set must also include the same amount of duplicate.
When duplicate rows are present in expected data set, actual data set must also include the same amount of duplicates.

*Example 2.*

Expand All @@ -488,19 +488,19 @@ create or replace package ut_duplicate_test is
--%suite(Sample Test Suite)

--%test(Ref Cursor contain duplicates)
procedure ut_duplicate_include;
procedure ut_duplicate_contain;

end ut_duplicate_test;
/

create or replace package body ut_duplicate_test is
procedure ut_duplicate_include is
procedure ut_duplicate_contain is
l_actual sys_refcursor;
l_expected sys_refcursor;
begin
open l_expected for select mod(level,2) as rn from dual connect by level < 5;
open l_actual for select mod(level,8) as rn from dual connect by level < 9;
ut.expect(l_actual).to_include(l_expected);
ut.expect(l_actual).to_contain(l_expected);
end;

end ut_duplicate_test;
Expand All @@ -509,8 +509,8 @@ end ut_duplicate_test;
Will result in failure test message

```sql
1) ut_duplicate_include
Actual: refcursor [ count = 8 ] was expected to include: refcursor [ count = 4 ]
1) ut_duplicate_contain
Actual: refcursor [ count = 8 ] was expected to contain: refcursor [ count = 4 ]
Diff:
Rows: [ 2 differences ]
Missing: <RN>0</RN>
Expand All @@ -519,7 +519,7 @@ Will result in failure test message



The negated version of `include / contain` ( `not_to_include`/ `not_to_contain` ) is successful only when all values from expected set are not part of actual (they are disjoint and there is no overlap).
The negated version of `contain` ( `not_to_contain` ) is successful only when all values from expected set are not part of actual (they are disjoint and there is no overlap).



Expand All @@ -531,7 +531,7 @@ Set 1 is defined as [ A , B , C ]

*Set 2 is defined as [A , D , E ]*

*Result : This will fail both of options to`to_include` and `not_to_include`*
*Result : This will fail both of options to `to_contain` and `not_to_contain`*



Expand All @@ -541,7 +541,7 @@ Set 1 is defined as [ A , B , C , D ]

*Set 2 is defined as [A , B , D ]*

*Result : This will be success on option `to_include` and fail `not_to_include`*
*Result : This will be success on option `to_contain` and fail `not_to_contain`*



Expand All @@ -551,33 +551,33 @@ Set 1 is defined as [ A , B , C ]

*Set 2 is defined as [D, E , F ]*

*Result : This will be success on options `not_to_include` and fail `to_include`*
*Result : This will be success on options `not_to_contain` and fail `to_contain`*



Example usage

```sql
create or replace package example_include is
--%suite(Include test)
create or replace package example_contain is
--%suite(Contain test)

--%test( Cursor include data from another cursor)
procedure cursor_to_include;
--%test( Cursor contains data from another cursor)
procedure cursor_to_contain;

--%test( Cursor include data from another cursor)
procedure cursor_not_to_include;
--%test( Cursor contains data from another cursor)
procedure cursor_not_to_contain;

--%test( Cursor fail include)
procedure cursor_fail_include;
--%test( Cursor fail on to_contain)
procedure cursor_fail_contain;

--%test( Cursor fail not include)
procedure cursor_fail_not_include;
--%test( Cursor fail not_to_contain)
procedure cursor_fail_not_contain;
end;
/

create or replace package body example_include is
create or replace package body example_contain is

procedure cursor_to_include is
procedure cursor_to_contain is
l_actual SYS_REFCURSOR;
l_expected SYS_REFCURSOR;
begin
Expand All @@ -594,10 +594,10 @@ create or replace package body example_include is
select 'c' as name from dual;

--Act
ut.expect(l_actual).to_include(l_expected);
ut.expect(l_actual).to_contain(l_expected);
end;

procedure cursor_not_to_include is
procedure cursor_not_to_contain is
l_actual SYS_REFCURSOR;
l_expected SYS_REFCURSOR;
begin
Expand All @@ -613,10 +613,10 @@ create or replace package body example_include is
select 'f' as name from dual;

--Act
ut.expect(l_actual).not_to_include(l_expected);
ut.expect(l_actual).not_to_contain(l_expected);
end;

procedure cursor_fail_include is
procedure cursor_fail_contain is
l_actual SYS_REFCURSOR;
l_expected SYS_REFCURSOR;
begin
Expand All @@ -632,10 +632,10 @@ create or replace package body example_include is
select 'e' as name from dual;

--Act
ut.expect(l_actual).to_include(l_expected);
ut.expect(l_actual).to_contain(l_expected);
end;

procedure cursor_fail_not_include is
procedure cursor_fail_not_contain is
l_actual SYS_REFCURSOR;
l_expected SYS_REFCURSOR;
begin
Expand All @@ -651,7 +651,7 @@ create or replace package body example_include is
select 'e' as name from dual;

--Act
ut.expect(l_actual).not_to_include(l_expected);
ut.expect(l_actual).not_to_contain(l_expected);
end;
end;
/
Expand All @@ -660,26 +660,30 @@ end;


Above execution will provide results as follow:
Cursor contains data from another cursor
Cursor contains data from another cursor
Cursor fail on to_contain
Cursor fail not_to_contain

```sql
Include test
Cursor include data from another cursor [.045 sec]
Cursor include data from another cursor [.039 sec]
Cursor fail include [.046 sec] (FAILED - 1)
Cursor fail not include [.043 sec] (FAILED - 2)
Contain test
Cursor contains data from another cursor [.045 sec]
Cursor contains data from another cursor [.039 sec]
Cursor fail on to_contain [.046 sec] (FAILED - 1)
Cursor fail not_to_contain [.043 sec] (FAILED - 2)

Failures:

1) cursor_fail_include
Actual: refcursor [ count = 3 ] was expected to include: refcursor [ count = 3 ]
1) cursor_fail_contain
Actual: refcursor [ count = 3 ] was expected to contain: refcursor [ count = 3 ]
Diff:
Rows: [ 2 differences ]
Missing: <ROW><NAME>d</NAME></ROW>
Missing: <ROW><NAME>e</NAME></ROW>
at "UT3.EXAMPLE_INCLUDE.CURSOR_FAIL_INCLUDE", line 71 ut.expect(l_actual).to_include(l_expected);
at "UT3.EXAMPLE_CONTAIN.CURSOR_FAIL_CONTAIN", line 71 ut.expect(l_actual).to_contain(l_expected);


2) cursor_fail_not_include
2) cursor_fail_not_contain
Actual: (refcursor [ count = 3 ])
Data-types:
<ROW><NAME xml_valid_name="NAME">CHAR</NAME>
Expand All @@ -688,15 +692,15 @@ Failures:
<ROW><NAME>a</NAME></ROW>
<ROW><NAME>b</NAME></ROW>
<ROW><NAME>c</NAME></ROW>
was expected not to include:(refcursor [ count = 3 ])
was expected not to contain:(refcursor [ count = 3 ])
Data-types:
<ROW><NAME xml_valid_name="NAME">CHAR</NAME>
</ROW>
Data:
<ROW><NAME>a</NAME></ROW>
<ROW><NAME>d</NAME></ROW>
<ROW><NAME>e</NAME></ROW>
at "UT3.EXAMPLE_INCLUDE.CURSOR_FAIL_NOT_INCLUDE", line 94 ut.expect(l_actual).not_to_include(l_expected);
at "UT3.EXAMPLE_CONTAIN.CURSOR_FAIL_NOT_CONTAIN", line 94 ut.expect(l_actual).not_to_contain(l_expected);
```


Expand Down Expand Up @@ -1161,7 +1165,7 @@ The matrix below illustrates the data types supported by different matchers.
| **be_less_than** | | | | X | X | X | X | X | | X | X | | | |
| **be_between** | | | | X | X | X | X | X | X | X | X | | | |
| **equal** | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
| **include / contain** | | | | | | | | | | | | X | X | X |
| **contain** | | | | | | | | | | | | X | X | X |
| **match** | | | X | | | | | | X | | | | | |
| **be_like** | | | X | | | | | | X | | | | | |
| **be_empty** | X | | X | | | | | | | | | X | X | |
Expand Down
2 changes: 1 addition & 1 deletion source/api/contain.syn
Original file line number Diff line number Diff line change
@@ -1 +1 @@
create synonym contain for ut_include;
create synonym contain for ut_contain;
1 change: 0 additions & 1 deletion source/api/include.syn

This file was deleted.

3 changes: 1 addition & 2 deletions source/create_synonyms_and_grants_for_public.sql
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,9 @@ create public synonym be_like for &&ut3_owner..be_like;
create public synonym be_not_null for &&ut3_owner..be_not_null;
create public synonym be_null for &&ut3_owner..be_null;
create public synonym be_true for &&ut3_owner..be_true;
create public synonym contain for &&ut3_owner..include;
create public synonym contain for &&ut3_owner..contain;
create public synonym equal for &&ut3_owner..equal;
create public synonym have_count for &&ut3_owner..have_count;
create public synonym include for &&ut3_owner..include;
create public synonym match for &&ut3_owner..match;

create public synonym ut for &&ut3_owner..ut;
Expand Down
1 change: 1 addition & 0 deletions source/create_user_synonyms.sql
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ create or replace synonym &ut3_user..be_like for &&ut3_owner..be_like;
create or replace synonym &ut3_user..be_not_null for &&ut3_owner..be_not_null;
create or replace synonym &ut3_user..be_null for &&ut3_owner..be_null;
create or replace synonym &ut3_user..be_true for &&ut3_owner..be_true;
create or replace synonym &ut3_user..contain for &&ut3_owner..contain;
create or replace synonym &ut3_user..equal for &&ut3_owner..equal;
create or replace synonym &ut3_user..have_count for &&ut3_owner..have_count;
create or replace synonym &ut3_user..match for &&ut3_owner..match;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
create or replace type body ut_include as
create or replace type body ut_contain as
/*
utPLSQL - Version 3
Copyright 2016 - 2018 utPLSQL Project
Expand All @@ -16,14 +16,14 @@ create or replace type body ut_include as
limitations under the License.
*/

constructor function ut_include(self in out nocopy ut_include, a_expected sys_refcursor) return self as result is
constructor function ut_contain(self in out nocopy ut_contain, a_expected sys_refcursor) return self as result is
begin
self.init(ut_data_value_refcursor(a_expected), null, $$plsql_unit);
self.options.unordered();
return;
end;

overriding member function run_matcher(self in out nocopy ut_include, a_actual ut_data_value) return boolean is
overriding member function run_matcher(self in out nocopy ut_contain, a_actual ut_data_value) return boolean is
l_result boolean;
begin
if self.expected.data_type = a_actual.data_type then
Expand All @@ -38,7 +38,7 @@ create or replace type body ut_include as
return l_result;
end;

overriding member function run_matcher_negated(self in out nocopy ut_include, a_actual ut_data_value) return boolean is
overriding member function run_matcher_negated(self in out nocopy ut_contain, a_actual ut_data_value) return boolean is
begin
return run_matcher(a_actual);
end;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
create or replace type ut_include under ut_equal(
create or replace type ut_contain under ut_equal(
/*
utPLSQL - Version 3
Copyright 2016 - 2018 utPLSQL Project
Expand All @@ -23,9 +23,9 @@ create or replace type ut_include under ut_equal(
* that false include not necessary mean true not include.
*/

constructor function ut_include(self in out nocopy ut_include, a_expected sys_refcursor) return self as result,
overriding member function run_matcher(self in out nocopy ut_include, a_actual ut_data_value) return boolean,
overriding member function run_matcher_negated(self in out nocopy ut_include, a_actual ut_data_value) return boolean,
constructor function ut_contain(self in out nocopy ut_contain, a_expected sys_refcursor) return self as result,
overriding member function run_matcher(self in out nocopy ut_contain, a_actual ut_data_value) return boolean,
overriding member function run_matcher_negated(self in out nocopy ut_contain, a_actual ut_data_value) return boolean,
overriding member function failure_message(a_actual ut_data_value) return varchar2,
overriding member function failure_message_when_negated(a_actual ut_data_value) return varchar2
)
Expand Down
Loading