@@ -1245,13 +1245,13 @@ void scrollByExampleOffset() {
1245
1245
Window <User > firstWindow = repository .findBy (example ,
1246
1246
q -> q .limit (2 ).sortBy (Sort .by ("firstname" )).scroll (OffsetScrollPosition .initial ()));
1247
1247
1248
- assertThat (firstWindow ).hasSize ( 2 ). containsOnly (jane1 , jane2 );
1248
+ assertThat (firstWindow ).containsExactly (jane1 , jane2 );
1249
1249
assertThat (firstWindow .hasNext ()).isTrue ();
1250
1250
1251
1251
Window <User > nextWindow = repository .findBy (example ,
1252
1252
q -> q .limit (2 ).sortBy (Sort .by ("firstname" )).scroll (firstWindow .positionAt (1 )));
1253
1253
1254
- assertThat (nextWindow ).hasSize ( 2 ). containsOnly (john1 , john2 );
1254
+ assertThat (nextWindow ).containsExactly (john1 , john2 );
1255
1255
assertThat (nextWindow .hasNext ()).isFalse ();
1256
1256
}
1257
1257
@@ -1277,7 +1277,7 @@ void scrollByExampleKeyset() {
1277
1277
Window <User > nextWindow = repository .findBy (example ,
1278
1278
q -> q .limit (2 ).sortBy (Sort .by ("firstname" , "emailAddress" )).scroll (firstWindow .positionAt (0 )));
1279
1279
1280
- assertThat (nextWindow ).hasSize ( 2 ). containsOnly (jane2 , john1 );
1280
+ assertThat (nextWindow ).containsExactly (jane2 , john1 );
1281
1281
assertThat (nextWindow .hasNext ()).isTrue ();
1282
1282
}
1283
1283
@@ -1319,13 +1319,13 @@ void scrollByPredicateOffset() {
1319
1319
Window <User > firstWindow = repository .findBy (QUser .user .firstname .startsWith ("J" ),
1320
1320
q -> q .limit (2 ).sortBy (Sort .by ("firstname" )).scroll (OffsetScrollPosition .initial ()));
1321
1321
1322
- assertThat (firstWindow ).hasSize ( 2 ). containsOnly (jane1 , jane2 );
1322
+ assertThat (firstWindow ).containsExactly (jane1 , jane2 );
1323
1323
assertThat (firstWindow .hasNext ()).isTrue ();
1324
1324
1325
1325
Window <User > nextWindow = repository .findBy (QUser .user .firstname .startsWith ("J" ),
1326
1326
q -> q .limit (2 ).sortBy (Sort .by ("firstname" )).scroll (firstWindow .positionAt (1 )));
1327
1327
1328
- assertThat (nextWindow ).hasSize ( 2 ). containsOnly (john1 , john2 );
1328
+ assertThat (nextWindow ).containsExactly (john1 , john2 );
1329
1329
assertThat (nextWindow .hasNext ()).isFalse ();
1330
1330
}
1331
1331
@@ -1348,7 +1348,7 @@ void scrollByPredicateKeyset() {
1348
1348
Window <User > nextWindow = repository .findBy (QUser .user .firstname .startsWith ("J" ),
1349
1349
q -> q .limit (2 ).sortBy (Sort .by ("firstname" , "emailAddress" )).scroll (firstWindow .positionAt (0 )));
1350
1350
1351
- assertThat (nextWindow ).hasSize ( 2 ). containsOnly (jane2 , john1 );
1351
+ assertThat (nextWindow ).containsExactly (jane2 , john1 );
1352
1352
assertThat (nextWindow .hasNext ()).isTrue ();
1353
1353
}
1354
1354
@@ -1365,7 +1365,7 @@ void scrollByPredicateKeysetBackward() {
1365
1365
Window <User > firstWindow = repository .findBy (QUser .user .firstname .startsWith ("J" ),
1366
1366
q -> q .limit (3 ).sortBy (Sort .by ("firstname" , "emailAddress" )).scroll (KeysetScrollPosition .initial ()));
1367
1367
1368
- assertThat (firstWindow ).containsSequence (jane1 , jane2 , john1 );
1368
+ assertThat (firstWindow ).containsExactly (jane1 , jane2 , john1 );
1369
1369
assertThat (firstWindow .hasNext ()).isTrue ();
1370
1370
1371
1371
KeysetScrollPosition scrollPosition = (KeysetScrollPosition ) firstWindow .positionAt (2 );
@@ -1374,7 +1374,7 @@ void scrollByPredicateKeysetBackward() {
1374
1374
Window <User > previousWindow = repository .findBy (QUser .user .firstname .startsWith ("J" ),
1375
1375
q -> q .limit (3 ).sortBy (Sort .by ("firstname" , "emailAddress" )).scroll (backward ));
1376
1376
1377
- assertThat (previousWindow ).hasSize ( 2 ). containsSequence (jane1 , jane2 );
1377
+ assertThat (previousWindow ).containsExactly (jane1 , jane2 );
1378
1378
1379
1379
// no more items before this window
1380
1380
assertThat (previousWindow .hasNext ()).isFalse ();
@@ -1393,7 +1393,7 @@ void scrollByPartTreeKeysetBackward() {
1393
1393
Window <User > firstWindow = repository .findTop3ByFirstnameStartingWithOrderByFirstnameAscEmailAddressAsc ("J" ,
1394
1394
KeysetScrollPosition .initial ());
1395
1395
1396
- assertThat (firstWindow ).containsSequence (jane1 , jane2 , john1 );
1396
+ assertThat (firstWindow ).containsExactly (jane1 , jane2 , john1 );
1397
1397
assertThat (firstWindow .hasNext ()).isTrue ();
1398
1398
1399
1399
KeysetScrollPosition scrollPosition = (KeysetScrollPosition ) firstWindow .positionAt (2 );
@@ -1402,7 +1402,7 @@ void scrollByPartTreeKeysetBackward() {
1402
1402
Window <User > previousWindow = repository .findTop3ByFirstnameStartingWithOrderByFirstnameAscEmailAddressAsc ("J" ,
1403
1403
backward );
1404
1404
1405
- assertThat (previousWindow ).hasSize ( 2 ). containsSequence (jane1 , jane2 );
1405
+ assertThat (previousWindow ).containsExactly (jane1 , jane2 );
1406
1406
1407
1407
// no more items before this window
1408
1408
assertThat (previousWindow .hasNext ()).isFalse ();
0 commit comments