Use text block where feasible
See gh-31916
This commit is contained in:
committed by
Stéphane Nicoll
parent
9d31537ae5
commit
a35384fd57
@@ -404,16 +404,18 @@ public class BodyInsertersTests {
|
||||
dataBuffer.read(resultBytes);
|
||||
DataBufferUtils.release(dataBuffer);
|
||||
String content = new String(resultBytes, StandardCharsets.UTF_8);
|
||||
assertThat(content).contains("Content-Disposition: form-data; name=\"name\"\r\n" +
|
||||
"Content-Type: text/plain;charset=UTF-8\r\n" +
|
||||
"Content-Length: 6\r\n" +
|
||||
"\r\n" +
|
||||
"value1");
|
||||
assertThat(content).contains("Content-Disposition: form-data; name=\"name\"\r\n" +
|
||||
"Content-Type: text/plain;charset=UTF-8\r\n" +
|
||||
"Content-Length: 6\r\n" +
|
||||
"\r\n" +
|
||||
"value2");
|
||||
assertThat(content).contains("""
|
||||
Content-Disposition: form-data; name="name"\r
|
||||
Content-Type: text/plain;charset=UTF-8\r
|
||||
Content-Length: 6\r
|
||||
\r
|
||||
value1""");
|
||||
assertThat(content).contains("""
|
||||
Content-Disposition: form-data; name="name"\r
|
||||
Content-Type: text/plain;charset=UTF-8\r
|
||||
Content-Length: 6\r
|
||||
\r
|
||||
value2""");
|
||||
})
|
||||
.expectComplete()
|
||||
.verify();
|
||||
|
||||
@@ -28,10 +28,16 @@ public class OuterSample {
|
||||
descriptor;
|
||||
static {
|
||||
String[] descriptorData = {
|
||||
"\n\014sample.proto\",\n\003Msg\022\013\n\003foo\030\001 \001(\t\022\030\n\004bl" +
|
||||
"ah\030\002 \001(\0132\n.SecondMsg\"\031\n\tSecondMsg\022\014\n\004bla" +
|
||||
"h\030\001 \001(\005B-\n\034org.springframework.protobufB" +
|
||||
"\013OuterSampleP\001"
|
||||
"""
|
||||
|
||||
\014sample.proto",
|
||||
\003Msg\022\013
|
||||
\003foo\030\001 \001(\t\022\030
|
||||
\004blah\030\002 \001(\0132
|
||||
.SecondMsg"\031
|
||||
\tSecondMsg\022\014
|
||||
\004blah\030\001 \001(\005B-
|
||||
\034org.springframework.protobufB\013OuterSampleP\001"""
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
|
||||
|
||||
Reference in New Issue
Block a user