@@ -34,7 +34,7 @@ public class PushDownFilterTest extends AbstractPushDownTest {
3434 @ Test
3535 void equalToWithFilter () {
3636 assertEquals (4 , getCountOfRowsWithFilter ("CitationID == 1" ));
37- assertEquals ( 4 , countOfRowsReadFromMarkLogic );
37+ assertRowsReadFromMarkLogic ( 4 );
3838 }
3939
4040 @ Test
@@ -44,7 +44,7 @@ void equalToWithSchemaAndViewQualifier() {
4444 .filter ("`Medical.Authors.CitationID` == 1" )
4545 .collectAsList ()
4646 .size (), "Verifying that a filter with a fully-qualified column name still works correctly." );
47- assertEquals ( 4 , countOfRowsReadFromMarkLogic );
47+ assertRowsReadFromMarkLogic ( 4 );
4848 }
4949
5050 @ Test
@@ -55,7 +55,7 @@ void equalToWithViewQualifier() {
5555 .filter ("`myView.CitationID` == 1" )
5656 .collectAsList ()
5757 .size (), "Verifying that a filter with a view-qualified column name still works correctly." );
58- assertEquals ( 4 , countOfRowsReadFromMarkLogic );
58+ assertRowsReadFromMarkLogic ( 4 );
5959 }
6060
6161 @ Test
@@ -66,25 +66,25 @@ void noRowsFound() {
6666 .filter ("CitationID == 1" )
6767 .collectAsList ()
6868 .size ());
69- assertEquals ( 0 , countOfRowsReadFromMarkLogic );
69+ assertRowsReadFromMarkLogic ( 0 );
7070 }
7171
7272 @ Test
7373 void equalToWithWhere () {
7474 assertEquals (2 , getCountOfRowsWithFilter ("CitationID = 5" ));
75- assertEquals ( 2 , countOfRowsReadFromMarkLogic );
75+ assertRowsReadFromMarkLogic ( 2 );
7676 }
7777
7878 @ Test
7979 void equalToWithString () {
8080 assertEquals (0 , getCountOfRowsWithFilter ("LastName == 'No match'" ));
81- assertEquals ( 0 , countOfRowsReadFromMarkLogic );
81+ assertRowsReadFromMarkLogic ( 0 );
8282 }
8383
8484 @ Test
8585 void equalToWithWhereAndFilter () {
8686 assertEquals (1 , newDataset ().where ("CitationID = 1" ).filter ("LastName == 'Golby'" ).count ());
87- assertEquals ( 1 , countOfRowsReadFromMarkLogic );
87+ assertRowsReadFromMarkLogic ( 1 );
8888 }
8989
9090 @ Test
@@ -98,25 +98,25 @@ void equalNullSafe() {
9898 @ Test
9999 void greaterThan () {
100100 assertEquals (3 , getCountOfRowsWithFilter ("CitationID > 3" ));
101- assertEquals ( 3 , countOfRowsReadFromMarkLogic );
101+ assertRowsReadFromMarkLogic ( 3 );
102102 }
103103
104104 @ Test
105105 void greaterThanOrEqual () {
106106 assertEquals (7 , getCountOfRowsWithFilter ("CitationID >= 3" ));
107- assertEquals ( 7 , countOfRowsReadFromMarkLogic );
107+ assertRowsReadFromMarkLogic ( 7 );
108108 }
109109
110110 @ Test
111111 void lessThan () {
112112 assertEquals (4 , getCountOfRowsWithFilter ("CitationID < 2" ));
113- assertEquals ( 4 , countOfRowsReadFromMarkLogic );
113+ assertRowsReadFromMarkLogic ( 4 );
114114 }
115115
116116 @ Test
117117 void lessThanOrEqual () {
118118 assertEquals (8 , getCountOfRowsWithFilter ("CitationID <= 2" ));
119- assertEquals ( 8 , countOfRowsReadFromMarkLogic );
119+ assertRowsReadFromMarkLogic ( 8 );
120120 }
121121
122122 /**
@@ -126,27 +126,27 @@ void lessThanOrEqual() {
126126 @ Test
127127 void and () {
128128 assertEquals (9 , getCountOfRowsWithFilter ("CitationID < 5 AND CitationID > 1" ));
129- assertEquals ( 9 , countOfRowsReadFromMarkLogic );
129+ assertRowsReadFromMarkLogic ( 9 );
130130 }
131131
132132 @ Test
133133 void or () {
134134 assertEquals (8 , getCountOfRowsWithFilter ("CitationID == 1 OR CitationID == 2" ));
135- assertEquals ( 8 , countOfRowsReadFromMarkLogic );
135+ assertRowsReadFromMarkLogic ( 8 );
136136 }
137137
138138 @ Test
139139 void andWithinOr () {
140140 // This actually results in an "and" filter being created.
141141 assertEquals (5 , getCountOfRowsWithFilter ("(CitationID < 3 AND CitationID > 1) OR CitationID == 4" ));
142- assertEquals ( 5 , countOfRowsReadFromMarkLogic ,
142+ assertRowsReadFromMarkLogic ( 5 ,
143143 "Expecting 4 authors with a CitationID of 2 and 1 with a CitationID of 4." );
144144 }
145145
146146 @ Test
147147 void not () {
148148 assertEquals (11 , getCountOfRowsWithFilter ("CitationID != 1" ));
149- assertEquals (11 , countOfRowsReadFromMarkLogic );
149+ assertRowsReadFromMarkLogic (11 );
150150 }
151151
152152 @ Test
@@ -159,19 +159,19 @@ void multipleLevelsOfBooleanExpressions() {
159159 @ Test
160160 void in () {
161161 assertEquals (7 , getCountOfRowsWithFilter ("CitationID IN (3,4,5)" ));
162- assertEquals ( 7 , countOfRowsReadFromMarkLogic );
162+ assertRowsReadFromMarkLogic ( 7 );
163163 }
164164
165165 @ Test
166166 void inWithNoMatches () {
167167 assertEquals (0 , getCountOfRowsWithFilter ("LastName in ('Doesnt', 'Match', 'Anything')" ));
168- assertEquals ( 0 , countOfRowsReadFromMarkLogic );
168+ assertRowsReadFromMarkLogic ( 0 );
169169 }
170170
171171 @ Test
172172 void isNotNull () {
173173 assertEquals (2 , newDataset ().filter (new Column ("BooleanValue" ).isNotNull ()).collectAsList ().size ());
174- assertEquals ( 2 , countOfRowsReadFromMarkLogic );
174+ assertRowsReadFromMarkLogic ( 2 );
175175 }
176176
177177 @ Test
@@ -182,7 +182,7 @@ void isNotNullQualified() {
182182 .collectAsList ()
183183 .size ());
184184
185- assertEquals ( 2 , countOfRowsReadFromMarkLogic ,
185+ assertRowsReadFromMarkLogic ( 2 ,
186186 "2 of the authors are expected to have a BooleanValue column." );
187187 }
188188
@@ -192,7 +192,7 @@ void isNull() {
192192 .filter (new Column ("BooleanValue" ).isNull ())
193193 .collectAsList ()
194194 .size ());
195- assertEquals (13 , countOfRowsReadFromMarkLogic ,
195+ assertRowsReadFromMarkLogic (13 ,
196196 "13 of the authors are expected to have a null BooleanValue column." );
197197 }
198198
@@ -202,49 +202,49 @@ void isNullQualified() {
202202 .load ()
203203 .filter (new Column ("`Medical.Authors.BooleanValue`" ).isNull ())
204204 .collectAsList ().size ());
205- assertEquals (13 , countOfRowsReadFromMarkLogic );
205+ assertRowsReadFromMarkLogic (13 );
206206 }
207207
208208 @ Test
209209 void stringContains () {
210210 List <Row > rows = newDataset ().filter (new Column ("LastName" ).contains ("umbe" )).collectAsList ();
211211 assertEquals (1 , rows .size ());
212- assertEquals ( 1 , countOfRowsReadFromMarkLogic );
212+ assertRowsReadFromMarkLogic ( 1 );
213213 assertEquals ("Humbee" , rows .get (0 ).getAs ("LastName" ));
214214 }
215215
216216 @ Test
217217 void stringContainsNoMatch () {
218218 assertEquals (0 , newDataset ().filter (new Column ("LastName" ).contains ("umee" )).collectAsList ().size ());
219- assertEquals ( 0 , countOfRowsReadFromMarkLogic );
219+ assertRowsReadFromMarkLogic ( 0 );
220220 }
221221
222222 @ Test
223223 void stringStartsWith () {
224224 List <Row > rows = newDataset ().filter (new Column ("LastName" ).startsWith ("Humb" )).collectAsList ();
225225 assertEquals (1 , rows .size ());
226- assertEquals ( 1 , countOfRowsReadFromMarkLogic );
226+ assertRowsReadFromMarkLogic ( 1 );
227227 assertEquals ("Humbee" , rows .get (0 ).getAs ("LastName" ));
228228 }
229229
230230 @ Test
231231 void stringStartsWithNoMatch () {
232232 assertEquals (0 , newDataset ().filter (new Column ("LastName" ).startsWith ("umbe" )).collectAsList ().size ());
233- assertEquals ( 0 , countOfRowsReadFromMarkLogic );
233+ assertRowsReadFromMarkLogic ( 0 );
234234 }
235235
236236 @ Test
237237 void stringEndsWith () {
238238 List <Row > rows = newDataset ().filter (new Column ("LastName" ).endsWith ("bee" )).collectAsList ();
239239 assertEquals (1 , rows .size ());
240- assertEquals ( 1 , countOfRowsReadFromMarkLogic );
240+ assertRowsReadFromMarkLogic ( 1 );
241241 assertEquals ("Humbee" , rows .get (0 ).getAs ("LastName" ));
242242 }
243243
244244 @ Test
245245 void stringEndsWithNoMatch () {
246246 assertEquals (0 , newDataset ().filter (new Column ("LastName" ).endsWith ("umbe" )).collectAsList ().size ());
247- assertEquals ( 0 , countOfRowsReadFromMarkLogic );
247+ assertRowsReadFromMarkLogic ( 0 );
248248 }
249249
250250 private Dataset <Row > newDataset () {
0 commit comments