This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
commit 34bafc94580bccb1312e6ea22fde0d81f7d10255 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Sat Sep 18 10:25:15 2021 +0200 Fixed CS --- .../servlet/springboot/test/ServletMultiPartTest.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/components-starter/camel-servlet-starter/src/test/java/org/apache/camel/component/servlet/springboot/test/ServletMultiPartTest.java b/components-starter/camel-servlet-starter/src/test/java/org/apache/camel/component/servlet/springboot/test/ServletMultiPartTest.java index 1f92c73..157d375 100644 --- a/components-starter/camel-servlet-starter/src/test/java/org/apache/camel/component/servlet/springboot/test/ServletMultiPartTest.java +++ b/components-starter/camel-servlet-starter/src/test/java/org/apache/camel/component/servlet/springboot/test/ServletMultiPartTest.java @@ -62,17 +62,18 @@ public class ServletMultiPartTest { HttpServletRequest httpServletRequest = exchange.getIn().getBody(HttpServletRequest.class); exchange.getIn().setBody(httpServletRequest.getPart("file").getName()); }); - } - }); - } + } + }); + } + @Test public void testMultipartRequest() throws Exception { HttpHeaders httpHeaders = new HttpHeaders(); httpHeaders.setContentType(MediaType.MULTIPART_FORM_DATA); LinkedMultiValueMap<String, Object> message = new LinkedMultiValueMap<>(); - message.add("file","Multipart Test"); - HttpEntity<LinkedMultiValueMap<String, Object>> httpEntity = new HttpEntity<>(message,httpHeaders); - Assert.assertEquals("file", restTemplate.postForEntity("/camel/test",httpEntity,String.class).getBody()); + message.add("file", "Multipart Test"); + HttpEntity<LinkedMultiValueMap<String, Object>> httpEntity = new HttpEntity<>(message, httpHeaders); + Assert.assertEquals("file", restTemplate.postForEntity("/camel/test", httpEntity, String.class).getBody()); } }