Use text block where feasible
See gh-31916
This commit is contained in:
committed by
Stéphane Nicoll
parent
9d31537ae5
commit
a35384fd57
@@ -114,8 +114,11 @@ public class ComplexWebApplicationContext extends StaticWebApplicationContext {
|
||||
|
||||
pvs = new MutablePropertyValues();
|
||||
pvs.add(
|
||||
"mappings", "/head.do=headController\n" +
|
||||
"body.do=bodyController\n/noview*=noviewController\n/noview/simple*=noviewController");
|
||||
"mappings", """
|
||||
/head.do=headController
|
||||
body.do=bodyController
|
||||
/noview*=noviewController
|
||||
/noview/simple*=noviewController""");
|
||||
pvs.add("order", "1");
|
||||
registerSingleton("handlerMapping", SimpleUrlHandlerMapping.class, pvs);
|
||||
|
||||
|
||||
@@ -109,11 +109,13 @@ class SseServerResponseTests {
|
||||
ModelAndView mav = response.writeTo(this.mockRequest, this.mockResponse, context);
|
||||
assertThat(mav).isNull();
|
||||
|
||||
String expected = "data:{\n" +
|
||||
"data: \"name\" : \"John Doe\",\n" +
|
||||
"data: \"age\" : 42\n" +
|
||||
"data:}\n" +
|
||||
"\n";
|
||||
String expected = """
|
||||
data:{
|
||||
data: "name" : "John Doe",
|
||||
data: "age" : 42
|
||||
data:}
|
||||
|
||||
""";
|
||||
assertThat(this.mockResponse.getContentAsString()).isEqualTo(expected);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user