@@ -298,6 +298,33 @@ public void testStringLess() {
298
298
assertEquals ("BaNaNa Split" , entities .get (2 ).getSimpleString ());
299
299
}
300
300
301
+ @ Test
302
+ public void string_lessOrEqual_works () {
303
+ putTestEntitiesStrings ();
304
+
305
+ ListItemAsserter <TestEntity > lessOrEqualAsserter = (index , item ) -> {
306
+ if (index == 0 ) assertEquals ("apple" , item .getSimpleString ());
307
+ if (index == 1 ) assertEquals ("banana" , item .getSimpleString ());
308
+ if (index == 2 ) assertEquals ("banana milk shake" , item .getSimpleString ());
309
+ };
310
+
311
+ buildFindAndAssert (
312
+ box .query ()
313
+ .lessOrEqual (TestEntity_ .simpleString , "BANANA MILK SHAKE" , StringOrder .CASE_INSENSITIVE )
314
+ .order (TestEntity_ .simpleString ),
315
+ 3 ,
316
+ lessOrEqualAsserter
317
+ );
318
+
319
+ buildFindAndAssert (
320
+ box .query ()
321
+ .lessOrEqual (TestEntity_ .simpleString , "banana milk shake" , StringOrder .CASE_SENSITIVE )
322
+ .order (TestEntity_ .simpleString ),
323
+ 3 ,
324
+ lessOrEqualAsserter
325
+ );
326
+ }
327
+
301
328
@ Test
302
329
public void testStringGreater () {
303
330
putTestEntitiesStrings ();
@@ -325,6 +352,33 @@ public void testStringGreater() {
325
352
assertEquals ("foo bar" , entities .get (2 ).getSimpleString ());
326
353
}
327
354
355
+ @ Test
356
+ public void string_greaterOrEqual_works () {
357
+ putTestEntitiesStrings ();
358
+
359
+ ListItemAsserter <TestEntity > greaterOrEqualAsserter = (index , item ) -> {
360
+ if (index == 0 ) assertEquals ("banana milk shake" , item .getSimpleString ());
361
+ if (index == 1 ) assertEquals ("bar" , item .getSimpleString ());
362
+ if (index == 2 ) assertEquals ("foo bar" , item .getSimpleString ());
363
+ };
364
+
365
+ buildFindAndAssert (
366
+ box .query ()
367
+ .greaterOrEqual (TestEntity_ .simpleString , "BANANA MILK SHAKE" , StringOrder .CASE_INSENSITIVE )
368
+ .order (TestEntity_ .simpleString ),
369
+ 3 ,
370
+ greaterOrEqualAsserter
371
+ );
372
+
373
+ buildFindAndAssert (
374
+ box .query ()
375
+ .greaterOrEqual (TestEntity_ .simpleString , "banana milk shake" , StringOrder .CASE_SENSITIVE )
376
+ .order (TestEntity_ .simpleString ),
377
+ 3 ,
378
+ greaterOrEqualAsserter
379
+ );
380
+ }
381
+
328
382
@ Test
329
383
public void testStringIn () {
330
384
putTestEntitiesStrings ();
0 commit comments