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

Skip to content

Feature/additional asserts#55

Merged
jgebal merged 3 commits intoutPLSQL:version3from
Pazus:feature/additional_asserts
Oct 2, 2016
Merged

Feature/additional asserts#55
jgebal merged 3 commits intoutPLSQL:version3from
Pazus:feature/additional_asserts

Conversation

@Pazus
Copy link
Copy Markdown
Member

@Pazus Pazus commented Oct 1, 2016

Fixed tests failing due to NLS setting (in RUSSIAN_CIS NLS the delimiter is ",")
Added prompt to the first line of the installer so PL/SQL Developer treats the installer file as command window.
Added two new assertions: str_like and regexp_like
Reordered declaration of the assertion procedures to enforce users to use implementation with assert description provided
Added tests for the new asserts

Comment thread source/ut_assert.pkb Outdated
end;

-- Strings assertions
procedure str_like(a_msg in varchar2, a_checking_string in varchar2, a_mask in varchar, a_escape_char in varchar2) is
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe is_like or is_matching instead of str_like and a_actual instead of a_checking_string, to keep it consistent with the rest of asserts.

Comment thread source/ut_assert.pkb Outdated
str_like(a_msg => null, a_checking_string => a_checking_string, a_mask => a_mask);
end;

procedure regexp_like(a_msg in varchar2, a_srcstr in varchar2, a_pattern in varchar2, a_modifier in varchar2 default null) is
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you change the name of a_srcstr

Comment thread source/ut_assert.pks Outdated

procedure this(a_condition in boolean);
procedure this(a_msg in varchar2, a_condition in boolean);
-- Strings assertions
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about.
--pattern matching assertions

Comment thread tests/RunAll.sql Outdated
@@lib/RunTest.sql ut_assert/ut_assert.are_equal.varchar2.GivesFailureWhenBothAreNull.sql
@@lib/RunTest.sql ut_assert/ut_assert.are_equal.varchar2.GivesFailureWhenExpectedIsNull.sql
@@lib/RunTest.sql ut_assert/ut_assert.are_equal.varchar2.GivesSuccessForEqualValues.sql
@@lib/RunTest.sql ut_assert/ut_assert.are_equal.varchar2.GivesSuccessForLikeString.sql
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong file names, should be: ut_assert.str_like.varchar2...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add tests proving that assertions are capable of failing?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add tests for the regexp_like assertion?

@Pazus
Copy link
Copy Markdown
Member Author

Pazus commented Oct 1, 2016

@jgebal Made requested changed

Pazus added 3 commits October 1, 2016 16:49
…reats the installer file as command window.

Added two new assertions: str_like and regexp_like
Reordered declaration of the assertion procedures to enforce users to use implementation with assert description provided
Added tests for the new asserts
Added tests for regexp_like
added failure tests
@Pazus Pazus force-pushed the feature/additional_asserts branch from 271b268 to 49c9c32 Compare October 1, 2016 14:15
@Pazus
Copy link
Copy Markdown
Member Author

Pazus commented Oct 1, 2016

fixed

@jgebal jgebal merged commit dc3c3ef into utPLSQL:version3 Oct 2, 2016
@jgebal jgebal removed the in progress label Oct 2, 2016
Shoelace pushed a commit to Shoelace/utPLSQL that referenced this pull request Oct 3, 2016
* Fixed tests failing due to NLS setting
* Added prompt to the first line of the installer so PL/SQL Developer treats the installer file as command window.
* Added two new assertions: str_like and regexp_like
* Reordered declaration of the assertion procedures to enforce users to use implementation with assert description provided
* Added tests for the new asserts

* Changes according to @jgebal comments
Added tests for regexp_like
added failure tests
@Pazus Pazus deleted the feature/additional_asserts branch July 15, 2017 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants