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
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
not_to shortcut for greater/less expectations
  • Loading branch information
Pazus committed May 6, 2017
commit 83f13b93edab2ae19742be6ff40ef16eafd1a57a
24 changes: 24 additions & 0 deletions source/expectations/ut_expectation_date.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,30 @@ create or replace type body ut_expectation_date as
ut_utils.debug_log('ut_expectation_date.not_to_be_between(self in ut_expectation_date, a_lower_bound date, a_upper_bound date)');
self.not_to( ut_be_between(a_lower_bound,a_upper_bound) );
end;

member procedure not_to_be_greater_or_equal(self in ut_expectation_date, a_expected date) is
begin
ut_utils.debug_log('ut_expectation_date.not_to_be_greater_or_equal(self in ut_expectation_date, a_expected date)');
self.not_to( ut_be_greater_or_equal (a_expected) );
end;

member procedure not_to_be_greater_than(self in ut_expectation_date, a_expected date) is
begin
ut_utils.debug_log('ut_expectation_date.not_to_be_greater_than(self in ut_expectation_date, a_expected date)');
self.not_to( ut_be_greater_than (a_expected) );
end;

member procedure not_to_be_less_or_equal(self in ut_expectation_date, a_expected date) is
begin
ut_utils.debug_log('ut_expectation_date.not_to_be_less_or_equal(self in ut_expectation_date, a_expected date)');
self.not_to( ut_be_less_or_equal (a_expected) );
end;

member procedure not_to_be_less_than(self in ut_expectation_date, a_expected date) is
begin
ut_utils.debug_log('ut_expectation_date.not_to_be_less_than(self in ut_expectation_date, a_expected date');
self.not_to( ut_be_less_than (a_expected) );
end;

end;
/
6 changes: 5 additions & 1 deletion source/expectations/ut_expectation_date.tps
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ create or replace type ut_expectation_date under ut_expectation(
member procedure to_be_less_than(self in ut_expectation_date, a_expected date),

overriding member procedure not_to_equal(self in ut_expectation_date, a_expected date, a_nulls_are_equal boolean := null),
member procedure not_to_be_between(self in ut_expectation_date, a_lower_bound date, a_upper_bound date)
member procedure not_to_be_between(self in ut_expectation_date, a_lower_bound date, a_upper_bound date),
member procedure not_to_be_greater_or_equal(self in ut_expectation_date, a_expected date),
member procedure not_to_be_greater_than(self in ut_expectation_date, a_expected date),
member procedure not_to_be_less_or_equal(self in ut_expectation_date, a_expected date),
member procedure not_to_be_less_than(self in ut_expectation_date, a_expected date)
)
/
21 changes: 21 additions & 0 deletions source/expectations/ut_expectation_dsinterval.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,27 @@ create or replace type body ut_expectation_dsinterval as
ut_utils.debug_log('ut_expectation_dsinterval.not_to_be_between(self in ut_expectation_dsinterval, a_lower_bound dsinterval_unconstrained, a_upper_bound dsinterval_unconstrained)');
self.not_to( ut_be_between(a_lower_bound,a_upper_bound) );
end;

member procedure not_to_be_greater_or_equal(self in ut_expectation_dsinterval, a_expected dsinterval_unconstrained) is
begin
ut_utils.debug_log('ut_expectation_dsinterval.not_to_be_greater_or_equal(self in ut_expectation_dsinterval, a_expected dsinterval_unconstrained)');
self.not_to( ut_be_greater_or_equal (a_expected) );
end;
member procedure not_to_be_greater_than(self in ut_expectation_dsinterval, a_expected dsinterval_unconstrained) is
begin
ut_utils.debug_log('ut_expectation_dsinterval.not_to_be_greater_than(self in ut_expectation_dsinterval, a_expected dsinterval_unconstrained)');
self.not_to( ut_be_greater_than (a_expected) );
end;
member procedure not_to_be_less_or_equal(self in ut_expectation_dsinterval, a_expected dsinterval_unconstrained) is
begin
ut_utils.debug_log('ut_expectation_dsinterval.not_to_be_less_or_equal(self in ut_expectation_dsinterval, a_expected dsinterval_unconstrained)');
self.not_to( ut_be_less_or_equal (a_expected) );
end;
member procedure not_to_be_less_than(self in ut_expectation_dsinterval, a_expected dsinterval_unconstrained) is
begin
ut_utils.debug_log('ut_expectation_dsinterval.not_to_be_less_than(self in ut_expectation_dsinterval, a_expected dsinterval_unconstrained)');
self.not_to( ut_be_less_than (a_expected) );
end;

end;
/
6 changes: 5 additions & 1 deletion source/expectations/ut_expectation_dsinterval.tps
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ create or replace type ut_expectation_dsinterval under ut_expectation(
member procedure to_be_less_than(self in ut_expectation_dsinterval, a_expected dsinterval_unconstrained),

overriding member procedure not_to_equal(self in ut_expectation_dsinterval, a_expected dsinterval_unconstrained, a_nulls_are_equal boolean := null),
member procedure not_to_be_between(self in ut_expectation_dsinterval, a_lower_bound dsinterval_unconstrained, a_upper_bound dsinterval_unconstrained)
member procedure not_to_be_between(self in ut_expectation_dsinterval, a_lower_bound dsinterval_unconstrained, a_upper_bound dsinterval_unconstrained),
member procedure not_to_be_greater_or_equal(self in ut_expectation_dsinterval, a_expected dsinterval_unconstrained),
member procedure not_to_be_greater_than(self in ut_expectation_dsinterval, a_expected dsinterval_unconstrained),
member procedure not_to_be_less_or_equal(self in ut_expectation_dsinterval, a_expected dsinterval_unconstrained),
member procedure not_to_be_less_than(self in ut_expectation_dsinterval, a_expected dsinterval_unconstrained)
)
/
24 changes: 24 additions & 0 deletions source/expectations/ut_expectation_number.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,30 @@ create or replace type body ut_expectation_number as
ut_utils.debug_log('ut_expectation_number.not_to_be_between(self in ut_expectation_date, a_lower_bound number, a_upper_bound number)');
self.not_to( ut_be_between(a_lower_bound,a_upper_bound) );
end;

member procedure not_to_be_greater_or_equal(self in ut_expectation_number, a_expected number) is
begin
ut_utils.debug_log('ut_expectation_number.not_to_be_greater_or_equal(self in ut_expectation_number, a_expected number)');
self.not_to( ut_be_greater_or_equal (a_expected) );
end;

member procedure not_to_be_greater_than(self in ut_expectation_number, a_expected number) is
begin
ut_utils.debug_log('ut_expectation_number.not_to_be_greater_than(self in ut_expectation_number, a_expected number)');
self.not_to( ut_be_greater_than (a_expected) );
end;

member procedure not_to_be_less_or_equal(self in ut_expectation_number, a_expected number) is
begin
ut_utils.debug_log('ut_expectation_number.not_to_be_less_or_equal(self in ut_expectation_number, a_expected number)');
self.not_to( ut_be_less_or_equal (a_expected) );
end;

member procedure not_to_be_less_than(self in ut_expectation_number, a_expected number) is
begin
ut_utils.debug_log('ut_expectation_number.not_to_be_less_than(self in ut_expectation_number, a_expected number');
self.not_to( ut_be_less_than (a_expected) );
end;

end;
/
6 changes: 5 additions & 1 deletion source/expectations/ut_expectation_number.tps
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ create or replace type ut_expectation_number under ut_expectation(
member procedure to_be_less_than(self in ut_expectation_number, a_expected number),

overriding member procedure not_to_equal(self in ut_expectation_number, a_expected number, a_nulls_are_equal boolean := null),
member procedure not_to_be_between(self in ut_expectation_number, a_lower_bound number, a_upper_bound number)
member procedure not_to_be_between(self in ut_expectation_number, a_lower_bound number, a_upper_bound number),
member procedure not_to_be_greater_or_equal(self in ut_expectation_number, a_expected number),
member procedure not_to_be_greater_than(self in ut_expectation_number, a_expected number),
member procedure not_to_be_less_or_equal(self in ut_expectation_number, a_expected number),
member procedure not_to_be_less_than(self in ut_expectation_number, a_expected number)
)
/
24 changes: 24 additions & 0 deletions source/expectations/ut_expectation_timestamp.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,30 @@ create or replace type body ut_expectation_timestamp as
ut_utils.debug_log('ut_expectation_timestamp.not_to_be_between(self in ut_expectation_timestamp, a_lower_bound timestamp_unconstrained, a_upper_bound timestamp_unconstrained)');
self.not_to( ut_be_between(a_lower_bound, a_upper_bound) );
end;

member procedure not_to_be_greater_or_equal(self in ut_expectation_timestamp, a_expected timestamp_unconstrained) is
begin
ut_utils.debug_log('ut_expectation_timestamp.not_to_be_greater_or_equal(self in ut_expectation_timestamp, a_expected timestamp_unconstrained)');
self.not_to( ut_be_greater_or_equal (a_expected) );
end;

member procedure not_to_be_greater_than(self in ut_expectation_timestamp, a_expected timestamp_unconstrained) is
begin
ut_utils.debug_log('ut_expectation_timestamp.not_to_be_greater_than(self in ut_expectation_timestamp, a_expected timestamp_unconstrained)');
self.not_to( ut_be_greater_than (a_expected) );
end;

member procedure not_to_be_less_or_equal(self in ut_expectation_timestamp, a_expected timestamp_unconstrained) is
begin
ut_utils.debug_log('ut_expectation_timestamp.not_to_be_less_or_equal(self in ut_expectation_timestamp, a_expected timestamp_unconstrained)');
self.not_to( ut_be_less_or_equal (a_expected) );
end;

member procedure not_to_be_less_than(self in ut_expectation_timestamp, a_expected timestamp_unconstrained) is
begin
ut_utils.debug_log('ut_expectation_timestamp.not_to_be_less_than(self in ut_expectation_timestamp, a_expected timestamp_unconstrained)');
self.not_to( ut_be_less_than (a_expected) );
end;

end;
/
6 changes: 5 additions & 1 deletion source/expectations/ut_expectation_timestamp.tps
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ create or replace type ut_expectation_timestamp under ut_expectation(
member procedure to_be_less_than(self in ut_expectation_timestamp, a_expected timestamp_unconstrained),

overriding member procedure not_to_equal(self in ut_expectation_timestamp, a_expected timestamp_unconstrained, a_nulls_are_equal boolean := null),
member procedure not_to_be_between(self in ut_expectation_timestamp, a_lower_bound timestamp_unconstrained, a_upper_bound timestamp_unconstrained)
member procedure not_to_be_between(self in ut_expectation_timestamp, a_lower_bound timestamp_unconstrained, a_upper_bound timestamp_unconstrained),
member procedure not_to_be_greater_or_equal(self in ut_expectation_timestamp, a_expected timestamp_unconstrained),
member procedure not_to_be_greater_than(self in ut_expectation_timestamp, a_expected timestamp_unconstrained),
member procedure not_to_be_less_or_equal(self in ut_expectation_timestamp, a_expected timestamp_unconstrained),
member procedure not_to_be_less_than(self in ut_expectation_timestamp, a_expected timestamp_unconstrained)
)
/
21 changes: 21 additions & 0 deletions source/expectations/ut_expectation_timestamp_ltz.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,27 @@ create or replace type body ut_expectation_timestamp_ltz as
ut_utils.debug_log('ut_expectation_timestamp_ltz.not_to_be_between(self in ut_expectation_timestamp_ltz, a_lower_bound timestamp_ltz_unconstrained, a_upper_bound timestamp_ltz_unconstrained)');
self.not_to( ut_be_between(a_lower_bound, a_upper_bound) );
end;

member procedure not_to_be_greater_or_equal(self in ut_expectation_timestamp_ltz, a_expected timestamp_ltz_unconstrained) is
begin
ut_utils.debug_log('ut_expectation_timestamp_ltz.not_to_be_greater_or_equal(self in ut_expectation_timestamp_ltz, a_expected timestamp_ltz_unconstrained)');
self.not_to( ut_be_greater_or_equal (a_expected) );
end;
member procedure not_to_be_greater_than(self in ut_expectation_timestamp_ltz, a_expected timestamp_ltz_unconstrained) is
begin
ut_utils.debug_log('ut_expectation_timestamp_ltz.not_to_be_greater_than(self in ut_expectation_timestamp_ltz, a_expected timestamp_ltz_unconstrained)');
self.not_to( ut_be_greater_than (a_expected) );
end;
member procedure not_to_be_less_or_equal(self in ut_expectation_timestamp_ltz, a_expected timestamp_ltz_unconstrained) is
begin
ut_utils.debug_log('ut_expectation_timestamp_ltz.not_to_be_less_or_equal(self in ut_expectation_timestamp_ltz, a_expected timestamp_ltz_unconstrained)');
self.not_to( ut_be_less_or_equal (a_expected) );
end;
member procedure not_to_be_less_than(self in ut_expectation_timestamp_ltz, a_expected timestamp_ltz_unconstrained) is
begin
ut_utils.debug_log('ut_expectation_timestamp_ltz.not_to_be_less_than(self in ut_expectation_timestamp_ltz, a_expected timestamp_ltz_unconstrained)');
self.not_to( ut_be_less_than (a_expected) );
end;

end;
/
6 changes: 5 additions & 1 deletion source/expectations/ut_expectation_timestamp_ltz.tps
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ create or replace type ut_expectation_timestamp_ltz under ut_expectation(
member procedure to_be_less_than(self in ut_expectation_timestamp_ltz, a_expected timestamp_ltz_unconstrained),

overriding member procedure not_to_equal(self in ut_expectation_timestamp_ltz, a_expected timestamp_ltz_unconstrained, a_nulls_are_equal boolean := null),
member procedure not_to_be_between(self in ut_expectation_timestamp_ltz, a_lower_bound timestamp_ltz_unconstrained, a_upper_bound timestamp_ltz_unconstrained)
member procedure not_to_be_between(self in ut_expectation_timestamp_ltz, a_lower_bound timestamp_ltz_unconstrained, a_upper_bound timestamp_ltz_unconstrained),
member procedure not_to_be_greater_or_equal(self in ut_expectation_timestamp_ltz, a_expected timestamp_ltz_unconstrained),
member procedure not_to_be_greater_than(self in ut_expectation_timestamp_ltz, a_expected timestamp_ltz_unconstrained),
member procedure not_to_be_less_or_equal(self in ut_expectation_timestamp_ltz, a_expected timestamp_ltz_unconstrained),
member procedure not_to_be_less_than(self in ut_expectation_timestamp_ltz, a_expected timestamp_ltz_unconstrained)
)
/
21 changes: 21 additions & 0 deletions source/expectations/ut_expectation_timestamp_tz.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,27 @@ create or replace type body ut_expectation_timestamp_tz as
ut_utils.debug_log('ut_expectation_timestamp_tz.not_to_be_between(self in ut_expectation_timestamp_tz, a_lower_bound timestamp_tz_unconstrained, a_upper_bound timestamp_tz_unconstrained)');
self.not_to( ut_be_between(a_lower_bound, a_upper_bound) );
end;

member procedure not_to_be_greater_or_equal(self in ut_expectation_timestamp_tz, a_expected timestamp_tz_unconstrained) is
begin
ut_utils.debug_log('ut_expectation_timestamp_tz.not_to_be_greater_or_equal(self in ut_expectation_timestamp_tz, a_expected timestamp_tz_unconstrained)');
self.not_to( ut_be_greater_or_equal (a_expected) );
end;
member procedure not_to_be_greater_than(self in ut_expectation_timestamp_tz, a_expected timestamp_tz_unconstrained) is
begin
ut_utils.debug_log('ut_expectation_timestamp_tz.not_to_be_greater_than(self in ut_expectation_timestamp_tz, a_expected timestamp_tz_unconstrained)');
self.not_to( ut_be_greater_than (a_expected) );
end;
member procedure not_to_be_less_or_equal(self in ut_expectation_timestamp_tz, a_expected timestamp_tz_unconstrained) is
begin
ut_utils.debug_log('ut_expectation_timestamp_tz.not_to_be_less_or_equal(self in ut_expectation_timestamp_tz, a_expected timestamp_tz_unconstrained)');
self.not_to( ut_be_less_or_equal (a_expected) );
end;
member procedure not_to_be_less_than(self in ut_expectation_timestamp_tz, a_expected timestamp_tz_unconstrained) is
begin
ut_utils.debug_log('ut_expectation_timestamp_tz.not_to_be_less_than(self in ut_expectation_timestamp_tz, a_expected timestamp_tz_unconstrained)');
self.not_to( ut_be_less_than (a_expected) );
end;

end;
/
6 changes: 5 additions & 1 deletion source/expectations/ut_expectation_timestamp_tz.tps
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ create or replace type ut_expectation_timestamp_tz under ut_expectation(
member procedure to_be_less_than(self in ut_expectation_timestamp_tz, a_expected timestamp_tz_unconstrained),

overriding member procedure not_to_equal(self in ut_expectation_timestamp_tz, a_expected timestamp_tz_unconstrained, a_nulls_are_equal boolean := null),
member procedure not_to_be_between(self in ut_expectation_timestamp_tz, a_lower_bound timestamp_tz_unconstrained, a_upper_bound timestamp_tz_unconstrained)
member procedure not_to_be_between(self in ut_expectation_timestamp_tz, a_lower_bound timestamp_tz_unconstrained, a_upper_bound timestamp_tz_unconstrained),
member procedure not_to_be_greater_or_equal(self in ut_expectation_timestamp_tz, a_expected timestamp_tz_unconstrained),
member procedure not_to_be_greater_than(self in ut_expectation_timestamp_tz, a_expected timestamp_tz_unconstrained),
member procedure not_to_be_less_or_equal(self in ut_expectation_timestamp_tz, a_expected timestamp_tz_unconstrained),
member procedure not_to_be_less_than(self in ut_expectation_timestamp_tz, a_expected timestamp_tz_unconstrained)
)
/
21 changes: 21 additions & 0 deletions source/expectations/ut_expectation_yminterval.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,27 @@ create or replace type body ut_expectation_yminterval as
ut_utils.debug_log('ut_expectation_yminterval.not_to_be_between(self in ut_expectation_yminterval, a_lower_bound dsinterval_unconstrained, a_upper_bound dsinterval_unconstrained)');
self.not_to( ut_be_between(a_lower_bound,a_upper_bound) );
end;

member procedure not_to_be_greater_or_equal(self in ut_expectation_yminterval, a_expected yminterval_unconstrained) is
begin
ut_utils.debug_log('ut_expectation_yminterval.not_to_be_greater_or_equal(self in ut_expectation_yminterval, a_expected yminterval_unconstrained)');
self.not_to( ut_be_greater_or_equal (a_expected) );
end;
member procedure not_to_be_greater_than(self in ut_expectation_yminterval, a_expected yminterval_unconstrained) is
begin
ut_utils.debug_log('ut_expectation_yminterval.not_to_be_greater_than(self in ut_expectation_yminterval, a_expected yminterval_unconstrained)');
self.not_to( ut_be_greater_than (a_expected) );
end;
member procedure not_to_be_less_or_equal(self in ut_expectation_yminterval, a_expected yminterval_unconstrained) is
begin
ut_utils.debug_log('ut_expectation_yminterval.not_to_be_less_or_equal(self in ut_expectation_yminterval, a_expected yminterval_unconstrained)');
self.not_to( ut_be_less_or_equal (a_expected) );
end;
member procedure not_to_be_less_than(self in ut_expectation_yminterval, a_expected yminterval_unconstrained) is
begin
ut_utils.debug_log('ut_expectation_yminterval.not_to_be_less_than(self in ut_expectation_yminterval, a_expected yminterval_unconstrained)');
self.not_to( ut_be_less_than (a_expected) );
end;

end;
/
6 changes: 5 additions & 1 deletion source/expectations/ut_expectation_yminterval.tps
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ create or replace type ut_expectation_yminterval under ut_expectation(
member procedure to_be_less_than(self in ut_expectation_yminterval, a_expected yminterval_unconstrained),

overriding member procedure not_to_equal(self in ut_expectation_yminterval, a_expected yminterval_unconstrained, a_nulls_are_equal boolean := null),
member procedure not_to_be_between(self in ut_expectation_yminterval, a_lower_bound yminterval_unconstrained, a_upper_bound yminterval_unconstrained)
member procedure not_to_be_between(self in ut_expectation_yminterval, a_lower_bound yminterval_unconstrained, a_upper_bound yminterval_unconstrained),
member procedure not_to_be_greater_or_equal(self in ut_expectation_yminterval, a_expected yminterval_unconstrained),
member procedure not_to_be_greater_than(self in ut_expectation_yminterval, a_expected yminterval_unconstrained),
member procedure not_to_be_less_or_equal(self in ut_expectation_yminterval, a_expected yminterval_unconstrained),
member procedure not_to_be_less_than(self in ut_expectation_yminterval, a_expected yminterval_unconstrained)
)
/