use of org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.get in project spring-framework by spring-projects.
the class InvocableHandlerMethodTests method checkNotModified.
@Test
public void checkNotModified() {
MockServerHttpRequest request = MockServerHttpRequest.get("/").ifModifiedSince(10 * 1000 * 1000).build();
ServerWebExchange exchange = MockServerWebExchange.from(request);
this.resolvers.add(stubResolver(exchange));
Method method = ResolvableMethod.on(TestController.class).mockCall(c -> c.notModified(exchange)).method();
HandlerResult result = invokeForResult(new TestController(), method);
assertThat(result).as("Expected no result (i.e. fully handled)").isNull();
}
Aggregations