@@ -123,22 +123,30 @@ create or replace type body ut_expectation_compound as
123123
124124 member procedure include(self in ut_expectation_compound, a_items varchar2) is
125125 begin
126- if ut_utils.int_to_boolean(negated) then
127- self.not_to( treat(matcher as ut_equal).include(a_items) );
128- else
129- self.to_( treat(matcher as ut_equal).include(a_items) );
130- end if;
131- end;
126+ if ut_utils.int_to_boolean(negated) then
127+ if (matcher is of (ut_include)) then
128+ self.not_include( treat(matcher as ut_equal).include(a_items) );
129+ else
130+ self.not_to( treat(matcher as ut_equal).include(a_items) );
131+ end if;
132+ else
133+ self.to_( treat(matcher as ut_equal).include(a_items) );
134+ end if;
135+ end;
132136
133137 member procedure include(self in ut_expectation_compound, a_items ut_varchar2_list) is
134138 begin
139+ if ut_utils.int_to_boolean(negated) then
140+ if (matcher is of (ut_include)) then
141+ self.not_include( treat(matcher as ut_equal).include(a_items) );
142+ else
143+ self.not_to( treat(matcher as ut_equal).include(a_items) );
144+ end if;
145+ else
146+ self.to_( treat(matcher as ut_equal).include(a_items) );
147+ end if;
148+ end;
135149
136- if ut_utils.int_to_boolean(negated) then
137- self.not_to( treat(matcher as ut_equal).include(a_items) );
138- else
139- self.to_( treat(matcher as ut_equal).include(a_items) );
140- end if;
141- end;
142150
143151
144152 member function exclude(a_items varchar2) return ut_expectation_compound is
@@ -160,17 +168,24 @@ create or replace type body ut_expectation_compound as
160168 member procedure exclude(self in ut_expectation_compound, a_items varchar2) is
161169 begin
162170 if ut_utils.int_to_boolean(negated) then
163- self.not_to( treat(matcher as ut_equal).exclude(a_items) );
171+ if (matcher is of (ut_include)) then
172+ self.not_include( treat(matcher as ut_equal).exclude(a_items) );
173+ else
174+ self.not_to( treat(matcher as ut_equal).exclude(a_items) );
175+ end if;
164176 else
165177 self.to_( treat(matcher as ut_equal).exclude(a_items) );
166178 end if;
167179 end;
168180
169181 member procedure exclude(self in ut_expectation_compound, a_items ut_varchar2_list) is
170182 begin
171-
172183 if ut_utils.int_to_boolean(negated) then
173- self.not_to( treat(matcher as ut_equal).exclude(a_items) );
184+ if (matcher is of (ut_include)) then
185+ self.not_include( treat(matcher as ut_equal).exclude(a_items) );
186+ else
187+ self.not_to( treat(matcher as ut_equal).exclude(a_items) );
188+ end if;
174189 else
175190 self.to_( treat(matcher as ut_equal).exclude(a_items) );
176191 end if;
@@ -213,17 +228,24 @@ create or replace type body ut_expectation_compound as
213228 member procedure join_by(self in ut_expectation_compound, a_columns varchar2) is
214229 begin
215230 if ut_utils.int_to_boolean(negated) then
216- self.not_to( treat(matcher as ut_equal).join_by(a_columns) );
231+ if (matcher is of (ut_include)) then
232+ self.not_include( treat(matcher as ut_equal).join_by(a_columns) );
233+ else
234+ self.not_to( treat(matcher as ut_equal).join_by(a_columns) );
235+ end if;
217236 else
218237 self.to_( treat(matcher as ut_equal).join_by(a_columns) );
219238 end if;
220239 end;
221240
222241 member procedure join_by(self in ut_expectation_compound, a_columns ut_varchar2_list) is
223242 begin
224-
225243 if ut_utils.int_to_boolean(negated) then
226- self.not_to( treat(matcher as ut_equal).join_by(a_columns) );
244+ if (matcher is of (ut_include)) then
245+ self.not_include( treat(matcher as ut_equal).join_by(a_columns) );
246+ else
247+ self.not_to( treat(matcher as ut_equal).join_by(a_columns) );
248+ end if;
227249 else
228250 self.to_( treat(matcher as ut_equal).join_by(a_columns) );
229251 end if;
0 commit comments