public class MockMultipartHttpServletRequestBuilder extends MockHttpServletRequestBuilder
MockMultipartHttpServletRequest
.Modifier and Type | Method and Description |
---|---|
protected MockHttpServletRequest |
createServletRequest(ServletContext servletContext)
Create a new
MockHttpServletRequest based on the given
ServletContext . |
MockMultipartHttpServletRequestBuilder |
file(MockMultipartFile file)
Add the given MockMultipartFile.
|
MockMultipartHttpServletRequestBuilder |
file(String name,
byte[] content)
Create a new MockMultipartFile with the given content.
|
Object |
merge(Object parent)
Merges the properties of the "parent" RequestBuilder accepting values
only if not already set in "this" instance.
|
accept, accept, buildRequest, characterEncoding, content, content, contentType, contextPath, cookie, flashAttr, flashAttrs, header, headers, isMergeEnabled, locale, param, pathInfo, postProcessRequest, principal, requestAttr, secure, servletPath, session, sessionAttr, sessionAttrs, with
public MockMultipartHttpServletRequestBuilder file(String name, byte[] content)
name
- the name of the filecontent
- the content of the filepublic MockMultipartHttpServletRequestBuilder file(MockMultipartFile file)
file
- the multipart filepublic Object merge(Object parent)
MockHttpServletRequestBuilder
merge
in interface Mergeable
merge
in class MockHttpServletRequestBuilder
parent
- the parent RequestBuilder
to inherit properties fromprotected final MockHttpServletRequest createServletRequest(ServletContext servletContext)
MockHttpServletRequestBuilder
MockHttpServletRequest
based on the given
ServletContext
. Can be overridden in subclasses.createServletRequest
in class MockHttpServletRequestBuilder