Use Named arguments in parameterized tests
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -35,7 +35,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException
|
||||
class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void byteCountsAndPositions(String displayName, DataBufferFactory bufferFactory) {
|
||||
void byteCountsAndPositions(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(2);
|
||||
@@ -78,7 +78,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void readPositionSmallerThanZero(String displayName, DataBufferFactory bufferFactory) {
|
||||
void readPositionSmallerThanZero(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(1);
|
||||
@@ -92,7 +92,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void readPositionGreaterThanWritePosition(String displayName, DataBufferFactory bufferFactory) {
|
||||
void readPositionGreaterThanWritePosition(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(1);
|
||||
@@ -106,7 +106,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void writePositionSmallerThanReadPosition(String displayName, DataBufferFactory bufferFactory) {
|
||||
void writePositionSmallerThanReadPosition(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(2);
|
||||
@@ -122,7 +122,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void writePositionGreaterThanCapacity(String displayName, DataBufferFactory bufferFactory) {
|
||||
void writePositionGreaterThanCapacity(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(1);
|
||||
@@ -136,7 +136,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void writeAndRead(String displayName, DataBufferFactory bufferFactory) {
|
||||
void writeAndRead(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(5);
|
||||
@@ -157,7 +157,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void writeNullString(String displayName, DataBufferFactory bufferFactory) {
|
||||
void writeNullString(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(1);
|
||||
@@ -171,7 +171,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void writeNullCharset(String displayName, DataBufferFactory bufferFactory) {
|
||||
void writeNullCharset(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(1);
|
||||
@@ -185,7 +185,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void writeEmptyString(String displayName, DataBufferFactory bufferFactory) {
|
||||
void writeEmptyString(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(1);
|
||||
@@ -197,7 +197,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void writeUtf8String(String displayName, DataBufferFactory bufferFactory) {
|
||||
void writeUtf8String(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(6);
|
||||
@@ -211,7 +211,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void writeUtf8StringOutGrowsCapacity(String displayName, DataBufferFactory bufferFactory) {
|
||||
void writeUtf8StringOutGrowsCapacity(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(5);
|
||||
@@ -225,7 +225,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void writeIsoString(String displayName, DataBufferFactory bufferFactory) {
|
||||
void writeIsoString(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(3);
|
||||
@@ -239,7 +239,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void writeMultipleUtf8String(String displayName, DataBufferFactory bufferFactory) {
|
||||
void writeMultipleUtf8String(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(1);
|
||||
@@ -261,7 +261,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void toStringNullCharset(String displayName, DataBufferFactory bufferFactory) {
|
||||
void toStringNullCharset(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(1);
|
||||
@@ -275,7 +275,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void toStringUtf8(String displayName, DataBufferFactory bufferFactory) {
|
||||
void toStringUtf8(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
String spring = "Spring";
|
||||
@@ -290,7 +290,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void toStringSection(String displayName, DataBufferFactory bufferFactory) {
|
||||
void toStringSection(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
String spring = "Spring";
|
||||
@@ -305,7 +305,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void inputStream(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void inputStream(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(4);
|
||||
@@ -339,7 +339,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void inputStreamReleaseOnClose(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void inputStreamReleaseOnClose(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(3);
|
||||
@@ -357,7 +357,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void outputStream(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void outputStream(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(4);
|
||||
@@ -377,7 +377,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void expand(String displayName, DataBufferFactory bufferFactory) {
|
||||
void expand(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(1);
|
||||
@@ -391,7 +391,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void increaseCapacity(String displayName, DataBufferFactory bufferFactory) {
|
||||
void increaseCapacity(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(1);
|
||||
@@ -404,7 +404,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void decreaseCapacityLowReadPosition(String displayName, DataBufferFactory bufferFactory) {
|
||||
void decreaseCapacityLowReadPosition(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(2);
|
||||
@@ -416,7 +416,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void decreaseCapacityHighReadPosition(String displayName, DataBufferFactory bufferFactory) {
|
||||
void decreaseCapacityHighReadPosition(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(2);
|
||||
@@ -429,7 +429,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void capacityLessThanZero(String displayName, DataBufferFactory bufferFactory) {
|
||||
void capacityLessThanZero(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(1);
|
||||
@@ -443,7 +443,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void writeByteBuffer(String displayName, DataBufferFactory bufferFactory) {
|
||||
void writeByteBuffer(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer1 = createDataBuffer(1);
|
||||
@@ -472,7 +472,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void writeDataBuffer(String displayName, DataBufferFactory bufferFactory) {
|
||||
void writeDataBuffer(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer1 = createDataBuffer(1);
|
||||
@@ -495,7 +495,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void asByteBuffer(String displayName, DataBufferFactory bufferFactory) {
|
||||
void asByteBuffer(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(4);
|
||||
@@ -516,7 +516,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void asByteBufferIndexLength(String displayName, DataBufferFactory bufferFactory) {
|
||||
void asByteBufferIndexLength(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(3);
|
||||
@@ -536,7 +536,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void byteBufferContainsDataBufferChanges(String displayName, DataBufferFactory bufferFactory) {
|
||||
void byteBufferContainsDataBufferChanges(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer dataBuffer = createDataBuffer(1);
|
||||
@@ -552,7 +552,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void dataBufferContainsByteBufferChanges(String displayName, DataBufferFactory bufferFactory) {
|
||||
void dataBufferContainsByteBufferChanges(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer dataBuffer = createDataBuffer(1);
|
||||
@@ -568,7 +568,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void emptyAsByteBuffer(String displayName, DataBufferFactory bufferFactory) {
|
||||
void emptyAsByteBuffer(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(1);
|
||||
@@ -580,7 +580,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void indexOf(String displayName, DataBufferFactory bufferFactory) {
|
||||
void indexOf(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(3);
|
||||
@@ -602,7 +602,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void lastIndexOf(String displayName, DataBufferFactory bufferFactory) {
|
||||
void lastIndexOf(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(3);
|
||||
@@ -633,7 +633,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void slice(String displayName, DataBufferFactory bufferFactory) {
|
||||
void slice(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(3);
|
||||
@@ -662,7 +662,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void retainedSlice(String displayName, DataBufferFactory bufferFactory) {
|
||||
void retainedSlice(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(3);
|
||||
@@ -691,7 +691,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void spr16351(String displayName, DataBufferFactory bufferFactory) {
|
||||
void spr16351(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = createDataBuffer(6);
|
||||
@@ -711,7 +711,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void join(String displayName, DataBufferFactory bufferFactory) {
|
||||
void join(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer composite = this.bufferFactory.join(Arrays.asList(stringBuffer("a"),
|
||||
@@ -726,7 +726,7 @@ class DataBufferTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void getByte(String displayName, DataBufferFactory bufferFactory) {
|
||||
void getByte(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = stringBuffer("abc");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -76,7 +76,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void readInputStream(String displayName, DataBufferFactory bufferFactory) {
|
||||
void readInputStream(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
Flux<DataBuffer> flux = DataBufferUtils.readInputStream(
|
||||
@@ -86,7 +86,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void readByteChannel(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void readByteChannel(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
URI uri = this.resource.getURI();
|
||||
@@ -98,7 +98,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void readByteChannelError(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void readByteChannelError(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
ReadableByteChannel channel = mock(ReadableByteChannel.class);
|
||||
@@ -121,7 +121,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void readByteChannelCancel(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void readByteChannelCancel(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
URI uri = this.resource.getURI();
|
||||
@@ -136,7 +136,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void readAsynchronousFileChannel(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void readAsynchronousFileChannel(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
URI uri = this.resource.getURI();
|
||||
@@ -148,7 +148,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void readAsynchronousFileChannelPosition(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void readAsynchronousFileChannelPosition(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
URI uri = this.resource.getURI();
|
||||
@@ -163,7 +163,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void readAsynchronousFileChannelError(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void readAsynchronousFileChannelError(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
AsynchronousFileChannel channel = mock(AsynchronousFileChannel.class);
|
||||
@@ -195,7 +195,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void readAsynchronousFileChannelCancel(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void readAsynchronousFileChannelCancel(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
URI uri = this.resource.getURI();
|
||||
@@ -210,7 +210,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest // gh-22107
|
||||
void readAsynchronousFileChannelCancelWithoutDemand(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void readAsynchronousFileChannelCancelWithoutDemand(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
URI uri = this.resource.getURI();
|
||||
@@ -224,7 +224,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void readPath(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void readPath(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
Flux<DataBuffer> flux = DataBufferUtils.read(this.resource.getFile().toPath(), super.bufferFactory, 3);
|
||||
@@ -233,7 +233,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void readResource(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void readResource(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
Flux<DataBuffer> flux = DataBufferUtils.read(this.resource, super.bufferFactory, 3);
|
||||
@@ -242,7 +242,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void readResourcePosition(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void readResourcePosition(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
Flux<DataBuffer> flux = DataBufferUtils.read(this.resource, 9, super.bufferFactory, 3);
|
||||
@@ -264,7 +264,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void readResourcePositionAndTakeUntil(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void readResourcePositionAndTakeUntil(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
Resource resource = new ClassPathResource("DataBufferUtilsTests.txt", getClass());
|
||||
@@ -281,7 +281,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void readByteArrayResourcePositionAndTakeUntil(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void readByteArrayResourcePositionAndTakeUntil(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
Resource resource = new ByteArrayResource("foobarbazqux" .getBytes());
|
||||
@@ -298,7 +298,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void writeOutputStream(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void writeOutputStream(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer foo = stringBuffer("foo");
|
||||
@@ -315,7 +315,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void writeWritableByteChannel(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void writeWritableByteChannel(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer foo = stringBuffer("foo");
|
||||
@@ -332,7 +332,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void writeWritableByteChannelErrorInFlux(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void writeWritableByteChannelErrorInFlux(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer foo = stringBuffer("foo");
|
||||
@@ -355,7 +355,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void writeWritableByteChannelErrorInWrite(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void writeWritableByteChannelErrorInWrite(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer foo = stringBuffer("foo");
|
||||
@@ -383,7 +383,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void writeWritableByteChannelCancel(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void writeWritableByteChannelCancel(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer foo = stringBuffer("foo");
|
||||
@@ -407,7 +407,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void writeAsynchronousFileChannel(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void writeAsynchronousFileChannel(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer foo = stringBuffer("foo");
|
||||
@@ -439,7 +439,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void writeAsynchronousFileChannelErrorInFlux(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void writeAsynchronousFileChannelErrorInFlux(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer foo = stringBuffer("foo");
|
||||
@@ -465,7 +465,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
@SuppressWarnings("unchecked")
|
||||
void writeAsynchronousFileChannelErrorInWrite(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void writeAsynchronousFileChannelErrorInWrite(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer foo = stringBuffer("foo");
|
||||
@@ -506,7 +506,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void writeAsynchronousFileChannelCanceled(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void writeAsynchronousFileChannelCanceled(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer foo = stringBuffer("foo");
|
||||
@@ -531,7 +531,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void writePath(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void writePath(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer foo = stringBuffer("foo");
|
||||
@@ -548,7 +548,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void readAndWriteByteChannel(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void readAndWriteByteChannel(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
Path source = Paths.get(
|
||||
@@ -582,7 +582,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void readAndWriteAsynchronousFileChannel(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void readAndWriteAsynchronousFileChannel(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
Path source = Paths.get(
|
||||
@@ -623,7 +623,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void takeUntilByteCount(String displayName, DataBufferFactory bufferFactory) {
|
||||
void takeUntilByteCount(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
Flux<DataBuffer> result = DataBufferUtils.takeUntilByteCount(
|
||||
@@ -637,7 +637,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void takeUntilByteCountCanceled(String displayName, DataBufferFactory bufferFactory) {
|
||||
void takeUntilByteCountCanceled(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
Flux<DataBuffer> source = Flux.concat(
|
||||
@@ -654,7 +654,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void takeUntilByteCountError(String displayName, DataBufferFactory bufferFactory) {
|
||||
void takeUntilByteCountError(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
Flux<DataBuffer> source = Flux.concat(
|
||||
@@ -671,7 +671,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void takeUntilByteCountExact(String displayName, DataBufferFactory bufferFactory) {
|
||||
void takeUntilByteCountExact(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
Flux<DataBuffer> source = Flux.concat(
|
||||
@@ -690,7 +690,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void skipUntilByteCount(String displayName, DataBufferFactory bufferFactory) {
|
||||
void skipUntilByteCount(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
Flux<DataBuffer> source = Flux.concat(
|
||||
@@ -708,7 +708,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void skipUntilByteCountCancelled(String displayName, DataBufferFactory bufferFactory) {
|
||||
void skipUntilByteCountCancelled(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
Flux<DataBuffer> source = Flux.concat(
|
||||
@@ -724,7 +724,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void skipUntilByteCountErrorInFlux(String displayName, DataBufferFactory bufferFactory) {
|
||||
void skipUntilByteCountErrorInFlux(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer foo = stringBuffer("foo");
|
||||
@@ -738,7 +738,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void skipUntilByteCountShouldSkipAll(String displayName, DataBufferFactory bufferFactory) {
|
||||
void skipUntilByteCountShouldSkipAll(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer foo = stringBuffer("foo");
|
||||
@@ -753,7 +753,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void releaseConsumer(String displayName, DataBufferFactory bufferFactory) {
|
||||
void releaseConsumer(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer foo = stringBuffer("foo");
|
||||
@@ -776,7 +776,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void SPR16070(String displayName, DataBufferFactory bufferFactory) throws Exception {
|
||||
void SPR16070(DataBufferFactory bufferFactory) throws Exception {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
ReadableByteChannel channel = mock(ReadableByteChannel.class);
|
||||
@@ -807,7 +807,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void join(String displayName, DataBufferFactory bufferFactory) {
|
||||
void join(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer foo = stringBuffer("foo");
|
||||
@@ -825,7 +825,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void joinWithLimit(String displayName, DataBufferFactory bufferFactory) {
|
||||
void joinWithLimit(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer foo = stringBuffer("foo");
|
||||
@@ -855,7 +855,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void joinErrors(String displayName, DataBufferFactory bufferFactory) {
|
||||
void joinErrors(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer foo = stringBuffer("foo");
|
||||
@@ -869,7 +869,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void joinCanceled(String displayName, DataBufferFactory bufferFactory) {
|
||||
void joinCanceled(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
Flux<DataBuffer> source = Flux.concat(
|
||||
@@ -885,7 +885,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void matcher(String displayName, DataBufferFactory bufferFactory) {
|
||||
void matcher(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer foo = stringBuffer("foo");
|
||||
@@ -903,7 +903,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void matcher2(String displayName, DataBufferFactory bufferFactory) {
|
||||
void matcher2(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer foo = stringBuffer("foooobar");
|
||||
@@ -923,7 +923,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void matcher3(String displayName, DataBufferFactory bufferFactory) {
|
||||
void matcher3(DataBufferFactory bufferFactory) {
|
||||
super.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer foo = stringBuffer("foooobar");
|
||||
@@ -943,7 +943,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void propagateContextByteChannel(String displayName, DataBufferFactory bufferFactory) throws IOException {
|
||||
void propagateContextByteChannel(DataBufferFactory bufferFactory) throws IOException {
|
||||
Path path = Paths.get(this.resource.getURI());
|
||||
try (SeekableByteChannel out = Files.newByteChannel(this.tempFile, StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING)) {
|
||||
Flux<DataBuffer> result = DataBufferUtils.read(path, bufferFactory, 1024, StandardOpenOption.READ)
|
||||
@@ -967,7 +967,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void propagateContextAsynchronousFileChannel(String displayName, DataBufferFactory bufferFactory) throws IOException {
|
||||
void propagateContextAsynchronousFileChannel(DataBufferFactory bufferFactory) throws IOException {
|
||||
Path path = Paths.get(this.resource.getURI());
|
||||
try (AsynchronousFileChannel out = AsynchronousFileChannel.open(this.tempFile, StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING)) {
|
||||
Flux<DataBuffer> result = DataBufferUtils.read(path, bufferFactory, 1024, StandardOpenOption.READ)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
class DataBufferTestUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void dumpBytes(String displayName, DataBufferFactory bufferFactory) {
|
||||
void dumpBytes(DataBufferFactory bufferFactory) {
|
||||
this.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = this.bufferFactory.allocateBuffer(4);
|
||||
@@ -47,7 +47,7 @@ class DataBufferTestUtilsTests extends AbstractDataBufferAllocatingTests {
|
||||
}
|
||||
|
||||
@ParameterizedDataBufferAllocatingTest
|
||||
void dumpString(String displayName, DataBufferFactory bufferFactory) {
|
||||
void dumpString(DataBufferFactory bufferFactory) {
|
||||
this.bufferFactory = bufferFactory;
|
||||
|
||||
DataBuffer buffer = this.bufferFactory.allocateBuffer(4);
|
||||
|
||||
Reference in New Issue
Block a user