Add query parameters to MockMvc Kotlin DSL
See gh-32371
This commit is contained in:
committed by
Sébastien Deleuze
parent
4300fec023
commit
132fbe228f
@@ -115,6 +115,18 @@ open class MockHttpServletRequestDsl internal constructor (private val builder:
|
||||
*/
|
||||
var params: MultiValueMap<String, String>? = null
|
||||
|
||||
/**
|
||||
* @see [MockHttpServletRequestBuilder.queryParam]
|
||||
*/
|
||||
fun queryParam(name: String, vararg values: String) {
|
||||
builder.queryParam(name, *values)
|
||||
}
|
||||
|
||||
/**
|
||||
* @see [MockHttpServletRequestBuilder.queryParams]
|
||||
*/
|
||||
var queryParams: MultiValueMap<String, String>? = null
|
||||
|
||||
/**
|
||||
* @see [MockHttpServletRequestBuilder.cookie]
|
||||
*/
|
||||
@@ -200,6 +212,7 @@ open class MockHttpServletRequestDsl internal constructor (private val builder:
|
||||
accept?.also { builder.accept(it) }
|
||||
contentType?.also { builder.contentType(it) }
|
||||
params?.also { builder.params(it) }
|
||||
queryParams?.also { builder.queryParams(it) }
|
||||
sessionAttrs?.also { builder.sessionAttrs(it) }
|
||||
flashAttrs?.also { builder.flashAttrs(it) }
|
||||
session?.also { builder.session(it) }
|
||||
|
||||
Reference in New Issue
Block a user