Merge branch 'BAEL-20663' of https://github.com/kwoyke/tutorials into BAEL-20663
This commit is contained in:
commit
44ddb2bcc4
|
@ -223,6 +223,8 @@
|
|||
</profiles>
|
||||
|
||||
<properties>
|
||||
<spring-boot.version>2.1.9.RELEASE</spring-boot.version>
|
||||
|
||||
<thymeleaf.version>3.0.9.RELEASE</thymeleaf.version>
|
||||
|
||||
<!-- persistence -->
|
||||
|
|
|
@ -15,7 +15,7 @@ public class StudentServiceImpl implements StudentService {
|
|||
|
||||
@Override
|
||||
public Page<Student> findPaginated(int page, int size) {
|
||||
return dao.findAll(new PageRequest(page, size));
|
||||
return dao.findAll(PageRequest.of(page, size));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ public class SpringDataWithSecurityIntegrationTest {
|
|||
.setAuthentication(auth);
|
||||
Page<Tweet> page = null;
|
||||
do {
|
||||
page = tweetRepository.getMyTweetsAndTheOnesILiked(new PageRequest(page != null ? page.getNumber() + 1 : 0, 5));
|
||||
page = tweetRepository.getMyTweetsAndTheOnesILiked(PageRequest.of(page != null ? page.getNumber() + 1 : 0, 5));
|
||||
for (Tweet twt : page.getContent()) {
|
||||
isTrue((twt.getOwner() == appUser.getUsername()) || (twt.getLikes()
|
||||
.contains(appUser.getUsername())), "I do not have any Tweets");
|
||||
|
@ -94,7 +94,7 @@ public class SpringDataWithSecurityIntegrationTest {
|
|||
public void givenNoAppUser_whenPaginatedResultsRetrievalAttempted_shouldFail() {
|
||||
Page<Tweet> page = null;
|
||||
do {
|
||||
page = tweetRepository.getMyTweetsAndTheOnesILiked(new PageRequest(page != null ? page.getNumber() + 1 : 0, 5));
|
||||
page = tweetRepository.getMyTweetsAndTheOnesILiked(PageRequest.of(page != null ? page.getNumber() + 1 : 0, 5));
|
||||
} while (page != null && page.hasNext());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue