Polishing in data binding tests

See gh-32676
This commit is contained in:
rstoyanchev
2024-06-04 09:55:09 +01:00
parent 36b0702c0b
commit 398aae2b9a
4 changed files with 46 additions and 42 deletions

View File

@@ -45,10 +45,10 @@ class ExtendedServletRequestDataBinderTests {
@Test
void createBinder() {
Map<String, String> uriTemplateVars = new HashMap<>();
uriTemplateVars.put("name", "nameValue");
uriTemplateVars.put("age", "25");
request.setAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE, uriTemplateVars);
this.request.setAttribute(
HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE,
Map.of("name", "nameValue", "age", "25"));
TestBean target = new TestBean();
ServletRequestDataBinder binder = new ExtendedServletRequestDataBinder(target, "");