Package org.springframework.mock.web.test

Examples of org.springframework.mock.web.test.MockMultipartFile


  public void multipartFilesAsStringArray() throws Exception {
    initServletWithControllers(MultipartController.class);

    MockMultipartHttpServletRequest request = new MockMultipartHttpServletRequest();
    request.setRequestURI("/stringArray");
    request.addFile(new MockMultipartFile("content", "Juergen".getBytes()));
    request.addFile(new MockMultipartFile("content", "Eva".getBytes()));
    MockHttpServletResponse response = new MockHttpServletResponse();
    getServlet().service(request, response);
    assertEquals("Juergen-Eva", response.getContentAsString());
  }
View Full Code Here

TOP

Related Classes of org.springframework.mock.web.test.MockMultipartFile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.