mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-10-06 06:59:11 +00:00
Improved DataBufferUtilsTest
This commit is contained in:
+3
-4
@@ -61,16 +61,15 @@ public class DataBufferUtilsTests extends AbstractDataBufferAllocatingTestCase {
|
||||
.toURI();
|
||||
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
|
||||
.subscribe(flux)
|
||||
.assertNoError()
|
||||
.assertComplete()
|
||||
.assertValuesWith(
|
||||
stringConsumer("fo"), stringConsumer("ob"),
|
||||
stringConsumer("ar"), stringConsumer("ba"),
|
||||
stringConsumer("zq"), stringConsumer("ux")
|
||||
stringConsumer("fooba"), stringConsumer("rbazq"),
|
||||
stringConsumer("ux")
|
||||
);
|
||||
|
||||
assertFalse(channel.isOpen());
|
||||
|
||||
Reference in New Issue
Block a user