@@ -23,7 +23,7 @@ Pseudo-code:
2323All matchers have shortcuts like:
2424``` sql
2525 ut .expect ( a_actual {data- type} ).to_{matcher};
26- ut .expect ( a_actual {data- type} ).not_to {matcher};
26+ ut .expect ( a_actual {data- type} ).not_to_ {matcher};
2727```
2828
2929# Matchers
@@ -50,6 +50,9 @@ Example:
5050begin
5151 ut .expect ( a_actual => 3 ).to_be_between( a_lower_bound => 1 , a_upper_bound => 3 );
5252 ut .expect ( 3 ).to_be_between( 1 , 3 );
53+ -- or
54+ ut .expect ( a_actual => 3 ).to_( be_between( a_lower_bound => 1 , a_upper_bound => 3 ) );
55+ ut .expect ( 3 ).to_( be_between( 1 , 3 ) );
5356end;
5457```
5558
@@ -63,6 +66,8 @@ procedure test_if_cursor_is_empty is
6366begin
6467 open l_cursor for select * from dual where 1 = 0 ;
6568 ut .expect ( l_cursor ).to_be_empty();
69+ -- or
70+ ut .expect ( l_cursor ).to_( be_empty() );
6671end;
6772```
6873
7580``` sql
7681begin
7782 ut .expect ( ( 1 = 0 ) ).to_be_false();
83+ -- or
84+ ut .expect ( ( 1 = 0 ) ).to_( be_false() );
7885end;
7986```
8087
8592``` sql
8693begin
8794 ut .expect ( sysdate ).to_be_greater_or_equal( sysdate - 1 );
95+ -- or
96+ ut .expect ( sysdate ).to_( be_greater_or_equal( sysdate - 1 ) );
8897end;
8998```
9099
@@ -95,6 +104,8 @@ Usage:
95104``` sql
96105begin
97106 ut .expect ( 2 ).to_be_greater_than( 1 );
107+ -- or
108+ ut .expect ( 2 ).to_( be_greater_than( 1 ) );
98109end;
99110```
100111
@@ -105,6 +116,8 @@ Usage:
105116``` sql
106117begin
107118 ut .expect ( 3 ).to_be_less_or_equal( 3 );
119+ -- or
120+ ut .expect ( 3 ).to_( be_less_or_equal( 3 ) );
108121end;
109122```
110123
@@ -115,6 +128,8 @@ Usage:
115128``` sql
116129begin
117130 ut .expect ( 3 ).to_be_less_than( 2 );
131+ -- or
132+ ut .expect ( 3 ).to_( be_less_than( 2 ) );
118133end;
119134```
120135
@@ -127,6 +142,9 @@ Usage:
127142begin
128143 ut .expect ( ' Lorem_impsum' ).to_be_like( a_mask => ' %rem\_ %' , a_escape_char => ' \' );
129144 ut.expect( ' Lorem_impsum' ).to_be_like( ' %rem\_%' , ' \' );
145+ --or
146+ ut.expect( ' Lorem_impsum' ).to_( be_like( a_mask => ' %rem\_%' , a_escape_char => ' \' ) );
147+ ut.expect( ' Lorem_impsum' ).to_( be_like( ' %rem\_%' , ' \' ) );
130148end;
131149```
132150
@@ -140,6 +158,10 @@ Usage:
140158```sql
141159begin
142160 ut.expect( to_clob(' ABC' ) ).to_be_not_null();
161+ --or
162+ ut.expect( to_clob(' ABC' ) ).to_( be_not_null() );
163+ --or
164+ ut.expect( to_clob(' ABC' ) ).not_to( be_null() );
143165end;
144166```
145167
@@ -150,6 +172,8 @@ Usage:
150172```sql
151173begin
152174 ut.expect( cast(null as varchar2(100)) ).to_be_null();
175+ --or
176+ ut.expect( cast(null as varchar2(100)) ).to_( be_null() );
153177end;
154178```
155179
@@ -161,6 +185,8 @@ Usage:
161185```sql
162186begin
163187 ut.expect( ( 1 = 1 ) ).to_be_true();
188+ --or
189+ ut.expect( ( 1 = 1 ) ).to_( be_true() );
164190end;
165191```
166192
@@ -179,6 +205,9 @@ procedure check_if_cursors_are_equal is
179205begin
180206 ut.expect( ' a dog' ).to_equal( ' a dog' );
181207 ut.expect( a_actual => y ).to_equal( a_expected => x, a_nulls_are_equal => true );
208+ --or
209+ ut.expect( ' a dog' ).to_( equal( ' a dog' ) );
210+ ut.expect( a_actual => y ).to_( equal( a_expected => x, a_nulls_are_equal => true ) );
182211end;
183212```
184213The `a_nulls_are_equal` parameter decides on the behavior of `null=null` comparison (**this comparison by default is true!**)
@@ -341,6 +370,9 @@ Usage:
341370begin
342371 ut.expect( a_actual => '123-456-ABcd' ).to_match( a_pattern => '\d {3}-\d {3}-[a-z]', a_modifiers => 'i' );
343372 ut.expect( 'some value' ).to_match( '^some.*' );
373+ --or
374+ ut.expect( a_actual => '123-456-ABcd' ).to_( match( a_pattern => '\d {3}-\d {3}-[a-z]', a_modifiers => 'i' ) );
375+ ut.expect( 'some value' ).to_( match( '^some.*' ) );
344376end;
345377` ` `
346378
@@ -377,7 +409,7 @@ Syntax of check for matcher evaluating to true:
377409` ` ` sql
378410begin
379411 ut.expect( a_actual {data-type} ).to_{matcher};
380- ut.expect( a_actual {data-type} ).to_{ ( matcher} );
412+ ut.expect( a_actual {data-type} ).to_( { matcher} );
381413end;
382414` ` `
383415
@@ -394,7 +426,7 @@ If a matcher evaluated to NULL, then both `to_` and `not_to` will cause the expe
394426Example:
395427` ` ` sql
396428begin
397- ut.expect( null ).to_be_true( );
429+ ut.expect( null ).to_( be_true() );
398430 ut.expect( null ).not_to( be_true() );
399431end;
400432` ` `
0 commit comments