Class MockMultipartHttpServletRequest

java.lang.Object
org.springframework.mock.web.MockHttpServletRequest
org.springframework.mock.web.MockMultipartHttpServletRequest
All Implemented Interfaces:
HttpServletRequest, ServletRequest, MultipartHttpServletRequest, MultipartRequest

public class MockMultipartHttpServletRequest extends MockHttpServletRequest implements MultipartHttpServletRequest
Mock implementation of the MultipartHttpServletRequest interface.

As of Spring 6.0, this set of mocks is designed on a Servlet 6.0 baseline.

Useful for testing application controllers that access multipart uploads. MockMultipartFile can be used to populate these mock requests with files.

Since:
2.0
Author:
Juergen Hoeller, Eric Crampton, Arjen Poutsma
See Also: