Improved DataBufferUtilsTest
This commit is contained in:
parent
4b92bf2af1
commit
35ce1945e0
|
|
@ -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…
Reference in New Issue