open class MockFilterChain : FilterChain
Mock implementation of the javax.servlet.FilterChain interface.
A MockFilterChain can be configured with one or more filters and a Servlet to invoke. The first time the chain is called, it invokes all filters and the Servlet, and saves the request and response. Subsequent invocations raise an IllegalStateException unless #reset()
is called.
Author
Juergen Hoeller
Author
Rob Winch
Author
Rossen Stoyanchev
Since
2.0.3
See Also
MockFilterConfigPassThroughFilterChain
MockFilterChain()
Register a single do-nothing Filter implementation. The first invocation saves the request and response. Subsequent invocations raise an IllegalStateException unless MockFilterChain(servlet: Servlet)
Create a FilterChain with a Servlet. MockFilterChain(servlet: Servlet, vararg filters: Filter)
Create a |
open fun doFilter(request: ServletRequest, response: ServletResponse): Unit
Invoke registered Filters and/or Servlet also saving the request and response. |
|
open fun getRequest(): ServletRequest
Return the request that |
|
open fun getResponse(): ServletResponse
Return the response that |
|
open fun reset(): Unit
Reset the MockFilterChain allowing it to be invoked again. |