open class MockMultipartHttpServletRequest : MockHttpServletRequest, MultipartHttpServletRequest
Mock implementation of the org.springframework.web.multipart.MultipartHttpServletRequest interface.
As of Spring 5.0, this set of mocks is designed on a Servlet 4.0 baseline.
Useful for testing application controllers that access multipart uploads. MockMultipartFile can be used to populate these mock requests with files.
Author
Juergen Hoeller
Author
Eric Crampton
Author
Arjen Poutsma
Since
2.0
See Also
MockMultipartFile
MockMultipartHttpServletRequest()
Create a new MockMultipartHttpServletRequest(servletContext: ServletContext)
Create a new |
open fun addFile(file: MultipartFile): Unit
Add a file to this request. The parameter name from the multipart form is taken from the |
|
open fun getFile(name: String): MultipartFile |
|
open fun getFileMap(): MutableMap<String, MultipartFile> |
|
open fun getFileNames(): MutableIterator<String> |
|
open fun getFiles(name: String): MutableList<MultipartFile> |
|
open fun getMultiFileMap(): MultiValueMap<String, MultipartFile> |
|
open fun getMultipartContentType(paramOrFileName: String): String |
|
open fun getMultipartHeaders(paramOrFileName: String): HttpHeaders |
|
open fun getRequestHeaders(): HttpHeaders |
|
open fun getRequestMethod(): HttpMethod |