Skip to content

Commit 97119b2

Browse files
committed
DATACASS-639 - Move away from Spring Data Commons deprecations.
1 parent d967447 commit 97119b2

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/ReactiveCassandraRepositoryIntegrationTests.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,18 @@
1515
*/
1616
package org.springframework.data.cassandra.repository;
1717

18-
import reactor.core.publisher.Flux;
19-
import reactor.core.publisher.Mono;
20-
import reactor.test.StepVerifier;
21-
2218
import java.util.Arrays;
2319
import java.util.HashSet;
2420
import java.util.Set;
2521

22+
import reactor.core.publisher.Flux;
23+
import reactor.core.publisher.Mono;
24+
import reactor.test.StepVerifier;
25+
2626
import org.junit.Before;
2727
import org.junit.Test;
2828
import org.junit.runner.RunWith;
29+
2930
import org.reactivestreams.Publisher;
3031
import org.springframework.beans.BeansException;
3132
import org.springframework.beans.factory.BeanClassLoaderAware;
@@ -46,7 +47,6 @@
4647
import org.springframework.data.domain.Pageable;
4748
import org.springframework.data.domain.Slice;
4849
import org.springframework.data.domain.Sort;
49-
import org.springframework.data.domain.Sort.Direction;
5050
import org.springframework.data.repository.query.QueryMethodEvaluationContextProvider;
5151
import org.springframework.data.util.Streamable;
5252
import org.springframework.test.context.ContextConfiguration;
@@ -187,13 +187,12 @@ public void shouldFindByLastNameAndSort() {
187187

188188
StepVerifier
189189
.create(groupRepostitory.findByIdGroupnameAndIdHashPrefix("Simpsons", "hash",
190-
new Sort(Direction.ASC, "id.username"))) //
190+
Sort.by("id.username").ascending())) //
191191
.expectNext(new Group(key1), new Group(key2)) //
192192
.verifyComplete();
193193

194-
StepVerifier
195-
.create(groupRepostitory.findByIdGroupnameAndIdHashPrefix("Simpsons", "hash",
196-
new Sort(Direction.DESC, "id.username"))) //
194+
StepVerifier.create(groupRepostitory.findByIdGroupnameAndIdHashPrefix("Simpsons", "hash",
195+
Sort.by("id.username").descending()))
197196
.expectNext(new Group(key2), new Group(key1)) //
198197
.verifyComplete();
199198
}

0 commit comments

Comments
 (0)