Skip to content

Commit 8705df5

Browse files
committed
Rename Verifier to StepVerifier
Issue: SPR-14800
1 parent bb0d4c8 commit 8705df5

File tree

48 files changed

+203
-204
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+203
-204
lines changed

spring-core/src/test/java/org/springframework/core/codec/ByteArrayDecoderTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import org.junit.Test;
2222
import org.reactivestreams.Publisher;
2323
import reactor.core.publisher.Flux;
24-
import reactor.test.subscriber.Verifier;
24+
import reactor.test.StepVerifier;
2525

2626
import org.springframework.core.ResolvableType;
2727
import org.springframework.core.io.buffer.AbstractDataBufferAllocatingTestCase;
@@ -58,7 +58,7 @@ public void decode() {
5858
ResolvableType.forClassWithGenerics(Publisher.class, byte[].class),
5959
null, Collections.emptyMap());
6060

61-
Verifier.create(output)
61+
StepVerifier.create(output)
6262
.consumeNextWith(bytes -> assertArrayEquals("foo".getBytes(), bytes))
6363
.consumeNextWith(bytes -> assertArrayEquals("bar".getBytes(), bytes))
6464
.expectComplete()

spring-core/src/test/java/org/springframework/core/codec/ByteArrayEncoderTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import org.junit.Test;
2525
import org.reactivestreams.Publisher;
2626
import reactor.core.publisher.Flux;
27-
import reactor.test.subscriber.Verifier;
27+
import reactor.test.StepVerifier;
2828

2929
import org.springframework.core.ResolvableType;
3030
import org.springframework.core.io.buffer.AbstractDataBufferAllocatingTestCase;
@@ -67,7 +67,7 @@ public void encode() {
6767
ResolvableType.forClassWithGenerics(Publisher.class, ByteBuffer.class),
6868
null, Collections.emptyMap());
6969

70-
Verifier.create(output)
70+
StepVerifier.create(output)
7171
.consumeNextWith(b -> {
7272
byte[] buf = new byte[3];
7373
b.read(buf);

spring-core/src/test/java/org/springframework/core/codec/ByteBufferDecoderTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import org.junit.Test;
2323
import org.reactivestreams.Publisher;
2424
import reactor.core.publisher.Flux;
25-
import reactor.test.subscriber.Verifier;
25+
import reactor.test.StepVerifier;
2626

2727
import org.springframework.core.ResolvableType;
2828
import org.springframework.core.io.buffer.AbstractDataBufferAllocatingTestCase;
@@ -58,7 +58,7 @@ public void decode() {
5858
ResolvableType.forClassWithGenerics(Publisher.class, ByteBuffer.class),
5959
null, Collections.emptyMap());
6060

61-
Verifier.create(output)
61+
StepVerifier.create(output)
6262
.expectNext(ByteBuffer.wrap("foo".getBytes()), ByteBuffer.wrap("bar".getBytes()))
6363
.expectComplete()
6464
.verify();

spring-core/src/test/java/org/springframework/core/codec/ByteBufferEncoderTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import org.junit.Test;
2525
import org.reactivestreams.Publisher;
2626
import reactor.core.publisher.Flux;
27-
import reactor.test.subscriber.Verifier;
27+
import reactor.test.StepVerifier;
2828

2929
import org.springframework.core.ResolvableType;
3030
import org.springframework.core.io.buffer.AbstractDataBufferAllocatingTestCase;
@@ -67,7 +67,7 @@ public void encode() {
6767
Flux<DataBuffer> output = this.encoder.encode(source, this.bufferFactory,
6868
ResolvableType.forClassWithGenerics(Publisher.class, ByteBuffer.class),
6969
null, Collections.emptyMap());
70-
Verifier.create(output)
70+
StepVerifier.create(output)
7171
.consumeNextWith(b -> {
7272
byte[] buf = new byte[3];
7373
b.read(buf);

spring-core/src/test/java/org/springframework/core/codec/CharSequenceEncoderTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import org.junit.runner.RunWith;
2424
import org.junit.runners.Parameterized;
2525
import reactor.core.publisher.Flux;
26-
import reactor.test.subscriber.Verifier;
26+
import reactor.test.StepVerifier;
2727

2828
import org.springframework.core.ResolvableType;
2929
import org.springframework.core.io.buffer.AbstractDataBufferAllocatingTestCase;
@@ -65,7 +65,7 @@ public void writeString() {
6565
Flux<String> stringFlux = Flux.just("foo");
6666
Flux<DataBuffer> output = Flux.from(
6767
this.encoder.encode(stringFlux, this.bufferFactory, null, null, Collections.emptyMap()));
68-
Verifier.create(output)
68+
StepVerifier.create(output)
6969
.consumeNextWith(stringConsumer("foo"))
7070
.expectComplete()
7171
.verify();
@@ -76,7 +76,7 @@ public void writeStringBuilder() {
7676
Flux<StringBuilder> stringBuilderFlux = Flux.just(new StringBuilder("foo"));
7777
Flux<DataBuffer> output = Flux.from(
7878
this.encoder.encode(stringBuilderFlux, this.bufferFactory, null, null, Collections.emptyMap()));
79-
Verifier.create(output)
79+
StepVerifier.create(output)
8080
.consumeNextWith(stringConsumer("foo"))
8181
.expectComplete()
8282
.verify();

spring-core/src/test/java/org/springframework/core/codec/ResourceDecoderTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
import org.junit.Test;
2323
import reactor.core.publisher.Flux;
24-
import reactor.test.subscriber.Verifier;
24+
import reactor.test.StepVerifier;
2525

2626
import org.springframework.core.ResolvableType;
2727
import org.springframework.core.io.ByteArrayResource;
@@ -64,7 +64,7 @@ public void decode() throws Exception {
6464
Flux<Resource> result = this.decoder
6565
.decode(source, ResolvableType.forClass(Resource.class), null, Collections.emptyMap());
6666

67-
Verifier.create(result)
67+
StepVerifier.create(result)
6868
.consumeNextWith(resource -> {
6969
try {
7070
byte[] bytes = StreamUtils.copyToByteArray(resource.getInputStream());

spring-core/src/test/java/org/springframework/core/codec/ResourceEncoderTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import org.junit.Test;
2323
import reactor.core.publisher.Flux;
2424
import reactor.core.publisher.Mono;
25-
import reactor.test.subscriber.Verifier;
25+
import reactor.test.StepVerifier;
2626

2727
import org.springframework.core.ResolvableType;
2828
import org.springframework.core.io.ByteArrayResource;
@@ -64,7 +64,7 @@ public void encode() throws Exception {
6464
ResolvableType.forClass(Resource.class),
6565
null, Collections.emptyMap());
6666

67-
Verifier.create(output)
67+
StepVerifier.create(output)
6868
.consumeNextWith(stringConsumer(s))
6969
.expectComplete()
7070
.verify();

spring-core/src/test/java/org/springframework/core/codec/ResourceRegionEncoderTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import org.junit.Test;
2424
import reactor.core.publisher.Flux;
2525
import reactor.core.publisher.Mono;
26-
import reactor.test.subscriber.Verifier;
26+
import reactor.test.StepVerifier;
2727

2828
import org.springframework.core.ResolvableType;
2929
import org.springframework.core.io.ByteArrayResource;
@@ -81,7 +81,7 @@ public void shouldEncodeResourceRegion() throws Exception {
8181
ResolvableType.forClass(ResourceRegion.class), MimeTypeUtils.APPLICATION_OCTET_STREAM
8282
, Collections.emptyMap());
8383

84-
Verifier.create(result)
84+
StepVerifier.create(result)
8585
.consumeNextWith(stringConsumer("Spring"))
8686
.expectComplete()
8787
.verify();
@@ -111,7 +111,7 @@ public void shouldEncodeMultipleResourceRegions() throws Exception {
111111
return previous;
112112
});
113113

114-
Verifier.create(reduced)
114+
StepVerifier.create(reduced)
115115
.consumeNextWith(buf -> {
116116
String content = DataBufferTestUtils.dumpString(buf, StandardCharsets.UTF_8);
117117
String[] ranges = StringUtils.tokenizeToStringArray(content, "\r\n",

spring-core/src/test/java/org/springframework/core/codec/StringDecoderTests.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import org.junit.Test;
2222
import reactor.core.publisher.Flux;
2323
import reactor.core.publisher.Mono;
24-
import reactor.test.subscriber.Verifier;
24+
import reactor.test.StepVerifier;
2525

2626
import org.springframework.core.ResolvableType;
2727
import org.springframework.core.io.buffer.AbstractDataBufferAllocatingTestCase;
@@ -62,7 +62,7 @@ public void decode() throws InterruptedException {
6262
Flux<String> output = this.decoder.decode(source, ResolvableType.forClass(String.class),
6363
null, Collections.emptyMap());
6464

65-
Verifier.create(output)
65+
StepVerifier.create(output)
6666
.expectNext("foo", "bar", "baz")
6767
.expectComplete()
6868
.verify();
@@ -77,7 +77,7 @@ public void decodeNewLine() throws InterruptedException {
7777
Flux<String> output = decoder.decode(source, ResolvableType.forClass(String.class),
7878
null, Collections.emptyMap());
7979

80-
Verifier.create(output)
80+
StepVerifier.create(output)
8181
.expectNext("\n", "foo\r", "\n", "bar\r", "\n", "baz")
8282
.expectComplete()
8383
.verify();
@@ -90,7 +90,7 @@ public void decodeEmptyFlux() throws InterruptedException {
9090
Flux<String> output = this.decoder.decode(source, ResolvableType.forClass(String.class),
9191
null, Collections.emptyMap());
9292

93-
Verifier.create(output)
93+
StepVerifier.create(output)
9494
.expectNextCount(0)
9595
.expectComplete()
9696
.verify();
@@ -103,7 +103,7 @@ public void decodeEmptyString() throws InterruptedException {
103103
Flux<String> output = this.decoder.decode(source,
104104
ResolvableType.forClass(String.class), null, Collections.emptyMap());
105105

106-
Verifier.create(output)
106+
StepVerifier.create(output)
107107
.expectNext("")
108108
.expectComplete().verify();
109109

@@ -116,7 +116,7 @@ public void decodeToMono() throws InterruptedException {
116116
Mono<String> output = this.decoder.decodeToMono(source,
117117
ResolvableType.forClass(String.class), null, Collections.emptyMap());
118118

119-
Verifier.create(output)
119+
StepVerifier.create(output)
120120
.expectNext("foobarbaz")
121121
.expectComplete()
122122
.verify();
@@ -128,7 +128,7 @@ public void decodeToMonoWithEmptyFlux() throws InterruptedException {
128128
Mono<String> output = this.decoder.decodeToMono(source,
129129
ResolvableType.forClass(String.class), null, Collections.emptyMap());
130130

131-
Verifier.create(output)
131+
StepVerifier.create(output)
132132
.expectNextCount(0)
133133
.expectComplete()
134134
.verify();

spring-core/src/test/java/org/springframework/core/io/buffer/DataBufferUtilsTests.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
import org.junit.Test;
2626
import reactor.core.publisher.Flux;
27-
import reactor.test.subscriber.Verifier;
27+
import reactor.test.StepVerifier;
2828

2929
import static org.junit.Assert.assertFalse;
3030

@@ -39,7 +39,7 @@ public void readChannel() throws Exception {
3939
FileChannel channel = FileChannel.open(Paths.get(uri), StandardOpenOption.READ);
4040
Flux<DataBuffer> flux = DataBufferUtils.read(channel, this.bufferFactory, 3);
4141

42-
Verifier.create(flux)
42+
StepVerifier.create(flux)
4343
.consumeNextWith(stringConsumer("foo"))
4444
.consumeNextWith(stringConsumer("bar"))
4545
.consumeNextWith(stringConsumer("baz"))
@@ -56,7 +56,7 @@ public void readUnalignedChannel() throws Exception {
5656
FileChannel channel = FileChannel.open(Paths.get(uri), StandardOpenOption.READ);
5757
Flux<DataBuffer> flux = DataBufferUtils.read(channel, this.bufferFactory, 5);
5858

59-
Verifier.create(flux)
59+
StepVerifier.create(flux)
6060
.consumeNextWith(stringConsumer("fooba"))
6161
.consumeNextWith(stringConsumer("rbazq"))
6262
.consumeNextWith(stringConsumer("ux"))
@@ -71,7 +71,7 @@ public void readInputStream() throws Exception {
7171
InputStream is = DataBufferUtilsTests.class.getResourceAsStream("DataBufferUtilsTests.txt");
7272
Flux<DataBuffer> flux = DataBufferUtils.read(is, this.bufferFactory, 3);
7373

74-
Verifier.create(flux)
74+
StepVerifier.create(flux)
7575
.consumeNextWith(stringConsumer("foo"))
7676
.consumeNextWith(stringConsumer("bar"))
7777
.consumeNextWith(stringConsumer("baz"))
@@ -88,7 +88,7 @@ public void takeUntilByteCount() throws Exception {
8888
Flux<DataBuffer> flux = Flux.just(foo, bar, baz);
8989
Flux<DataBuffer> result = DataBufferUtils.takeUntilByteCount(flux, 5L);
9090

91-
Verifier.create(result)
91+
StepVerifier.create(result)
9292
.consumeNextWith(stringConsumer("foo"))
9393
.consumeNextWith(stringConsumer("ba"))
9494
.expectComplete().verify();
@@ -104,7 +104,7 @@ public void skipUntilByteCount() throws Exception {
104104
Flux<DataBuffer> flux = Flux.just(foo, bar, baz);
105105
Flux<DataBuffer> result = DataBufferUtils.skipUntilByteCount(flux, 5L);
106106

107-
Verifier.create(result)
107+
StepVerifier.create(result)
108108
.consumeNextWith(stringConsumer("r"))
109109
.consumeNextWith(stringConsumer("baz"))
110110
.expectComplete()
@@ -119,7 +119,7 @@ public void skipUntilByteCountShouldSkipAll() throws Exception {
119119
Flux<DataBuffer> flux = Flux.just(foo, bar, baz);
120120
Flux<DataBuffer> result = DataBufferUtils.skipUntilByteCount(flux, 9L);
121121

122-
Verifier.create(result)
122+
StepVerifier.create(result)
123123
.expectNextCount(0)
124124
.expectComplete()
125125
.verify();

0 commit comments

Comments
 (0)