spring-framework / org.springframework.test.web.servlet.result / RequestResultMatchers / asyncResult

asyncResult

open fun <T : Any> asyncResult(matcher: Matcher<T>): ResultMatcher

Assert the result from asynchronous processing with the given matcher.

This method can be used when a controller method returns Callable or WebAsyncTask.

open fun <T : Any> asyncResult(expectedResult: Any): ResultMatcher

Assert the result from asynchronous processing.

This method can be used when a controller method returns Callable or WebAsyncTask. The value matched is the value returned from the Callable or the exception raised.