BAEL-20663: Fix usage of org.springframework.data.domain.Sort
This commit is contained in:
parent
5917c9027a
commit
fc22587009
|
@ -266,7 +266,7 @@ public class UserRepositoryCommon {
|
|||
userRepository.save(new User(USER_NAME_PETER, LocalDate.now(), USER_EMAIL2, ACTIVE_STATUS));
|
||||
userRepository.save(new User("SAMPLE", LocalDate.now(), USER_EMAIL3, INACTIVE_STATUS));
|
||||
|
||||
List<User> usersSortByName = userRepository.findAll(new Sort(Sort.Direction.ASC, "name"));
|
||||
List<User> usersSortByName = userRepository.findAll(Sort.by(Sort.Direction.ASC, "name"));
|
||||
|
||||
assertThat(usersSortByName.get(0)
|
||||
.getName()).isEqualTo(USER_NAME_ADAM);
|
||||
|
@ -278,7 +278,7 @@ public class UserRepositoryCommon {
|
|||
userRepository.save(new User(USER_NAME_PETER, LocalDate.now(), USER_EMAIL2, ACTIVE_STATUS));
|
||||
userRepository.save(new User("SAMPLE", LocalDate.now(), USER_EMAIL3, INACTIVE_STATUS));
|
||||
|
||||
userRepository.findAll(new Sort(Sort.Direction.ASC, "name"));
|
||||
userRepository.findAll(Sort.by(Sort.Direction.ASC, "name"));
|
||||
|
||||
List<User> usersSortByNameLength = userRepository.findAll(Sort.by("LENGTH(name)"));
|
||||
|
||||
|
|
Loading…
Reference in New Issue