File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
spring-test/src/main/java/org/springframework/test/web/reactive/server Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -167,12 +167,12 @@ public <T> T assertWithDiagnosticsAndReturn(Supplier<T> assertion) {
167
167
public String toString () {
168
168
return "\n " +
169
169
"> " + getMethod () + " " + getUrl () + "\n " +
170
- "> " + formatHeaders (getRequestHeaders ()) + "\n " +
170
+ "> " + formatHeaders ("> " , getRequestHeaders ()) + "\n " +
171
171
"\n " +
172
172
formatContent (getRequestHeaders ().getContentType (), getRequestContent ()) + "\n " +
173
173
"\n " +
174
- "> " + getStatus () + " " + getStatusReason () + "\n " +
175
- "> " + formatHeaders (getResponseHeaders ()) + "\n " +
174
+ "< " + getStatus () + " " + getStatusReason () + "\n " +
175
+ "< " + formatHeaders ("< " , getResponseHeaders ()) + "\n " +
176
176
"\n " +
177
177
formatContent (getResponseHeaders ().getContentType (), getResponseContent ()) + "\n \n " ;
178
178
}
@@ -185,10 +185,10 @@ private String getStatusReason() {
185
185
return reason ;
186
186
}
187
187
188
- private String formatHeaders (HttpHeaders headers ) {
188
+ private String formatHeaders (String linePrefix , HttpHeaders headers ) {
189
189
return headers .entrySet ().stream ()
190
190
.map (entry -> entry .getKey () + ": " + entry .getValue ())
191
- .collect (Collectors .joining ("\n > " ));
191
+ .collect (Collectors .joining ("\n " + linePrefix ));
192
192
}
193
193
194
194
private String formatContent (MediaType contentType , MonoProcessor <byte []> body ) {
You can’t perform that action at this time.
0 commit comments