open class HandlerResultMatchers
Factory for assertions on the selected handler or handler method.
An instance of this class is typically accessed via MockMvcResultMatchers#handler.
Note: Expectations that assert the controller method used to process the request work only for requests processed with RequestMappingHandlerMapping and RequestMappingHandlerAdapter which is used by default with the Spring MVC Java config and XML namespace.
Author
Rossen Stoyanchev
Author
Sam Brannen
Since
3.2
open fun handlerType(type: Class<*>): ResultMatcher
Assert the type of the handler that processed the request. |
|
open fun method(method: Method): ResultMatcher
Assert the controller method used to process the request. |
|
open fun methodCall(obj: Any): ResultMatcher
Assert the controller method used to process the request. The expected method is specified through a "mock" controller method invocation similar to For example, given this controller:
A test that has statically imported
|
|
open fun methodName(matcher: Matcher<in String>): ResultMatcher
Assert the name of the controller method used to process the request using the given Hamcrest Matcher. open fun methodName(name: String): ResultMatcher
Assert the name of the controller method used to process the request. |