Improved DataBufferUtilsTest

master
Arjen Poutsma 8 years ago
parent 4b92bf2af1
commit 35ce1945e0
  1. 7
      spring-core/src/test/java/org/springframework/core/io/buffer/support/DataBufferUtilsTests.java

@ -61,16 +61,15 @@ public class DataBufferUtilsTests extends AbstractDataBufferAllocatingTestCase {
.toURI(); .toURI();
FileChannel channel = FileChannel.open(Paths.get(uri), StandardOpenOption.READ); FileChannel channel = FileChannel.open(Paths.get(uri), StandardOpenOption.READ);
Flux<DataBuffer> flux = DataBufferUtils.read(channel, this.bufferFactory, 2); Flux<DataBuffer> flux = DataBufferUtils.read(channel, this.bufferFactory, 5);
TestSubscriber TestSubscriber
.subscribe(flux) .subscribe(flux)
.assertNoError() .assertNoError()
.assertComplete() .assertComplete()
.assertValuesWith( .assertValuesWith(
stringConsumer("fo"), stringConsumer("ob"), stringConsumer("fooba"), stringConsumer("rbazq"),
stringConsumer("ar"), stringConsumer("ba"), stringConsumer("ux")
stringConsumer("zq"), stringConsumer("ux")
); );
assertFalse(channel.isOpen()); assertFalse(channel.isOpen());

Loading…
Cancel
Save