This commit is contained in:
Andy Wilkinson 2017-12-07 18:27:52 +00:00
parent 996a7cf013
commit c0e3ae9042
4 changed files with 6 additions and 8 deletions

View File

@ -49,7 +49,7 @@ public class CloudFoundryWebAnnotationEndpointDiscovererTests {
@Test
public void discovererShouldAddSuppliedExtensionForHealthEndpoint() throws Exception {
load(TestConfiguration.class, endpointDiscoverer -> {
load(TestConfiguration.class, (endpointDiscoverer) -> {
Collection<EndpointInfo<WebOperation>> endpoints = endpointDiscoverer
.discoverEndpoints();
assertThat(endpoints.size()).isEqualTo(2);

View File

@ -235,9 +235,8 @@ public class ReactiveCloudFoundryActuatorAutoConfigurationTests {
this.context.refresh();
Collection<EndpointInfo<WebOperation>> endpoints = getHandlerMapping()
.getEndpoints();
EndpointInfo endpointInfo = (EndpointInfo) (endpoints.toArray()[0]);
WebOperation webOperation = (WebOperation) endpointInfo.getOperations()
.toArray()[0];
EndpointInfo<WebOperation> endpointInfo = endpoints.iterator().next();
WebOperation webOperation = endpointInfo.getOperations().iterator().next();
ReflectiveOperationInvoker invoker = (ReflectiveOperationInvoker) webOperation
.getInvoker();
assertThat(ReflectionTestUtils.getField(invoker, "target"))

View File

@ -259,9 +259,8 @@ public class CloudFoundryActuatorAutoConfigurationTests {
.getBean("cloudFoundryWebEndpointServletHandlerMapping",
CloudFoundryWebEndpointServletHandlerMapping.class)
.getEndpoints();
EndpointInfo endpointInfo = (EndpointInfo) (endpoints.toArray()[0]);
WebOperation webOperation = (WebOperation) endpointInfo.getOperations()
.toArray()[0];
EndpointInfo<WebOperation> endpointInfo = endpoints.iterator().next();
WebOperation webOperation = endpointInfo.getOperations().iterator().next();
ReflectiveOperationInvoker invoker = (ReflectiveOperationInvoker) webOperation
.getInvoker();
assertThat(ReflectionTestUtils.getField(invoker, "target"))

View File

@ -130,7 +130,7 @@ public class FreeMarkerAutoConfigurationReactiveIntegrationTests {
Mono<View> view = resolver.resolveViewName(viewName, Locale.UK);
MockServerWebExchange exchange = MockServerWebExchange
.from(MockServerHttpRequest.get("/path"));
view.flatMap(v -> v.render(null, MediaType.TEXT_HTML, exchange)).block();
view.flatMap((v) -> v.render(null, MediaType.TEXT_HTML, exchange)).block();
return exchange;
}