Polish
This commit is contained in:
parent
996a7cf013
commit
c0e3ae9042
|
|
@ -49,7 +49,7 @@ public class CloudFoundryWebAnnotationEndpointDiscovererTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void discovererShouldAddSuppliedExtensionForHealthEndpoint() throws Exception {
|
public void discovererShouldAddSuppliedExtensionForHealthEndpoint() throws Exception {
|
||||||
load(TestConfiguration.class, endpointDiscoverer -> {
|
load(TestConfiguration.class, (endpointDiscoverer) -> {
|
||||||
Collection<EndpointInfo<WebOperation>> endpoints = endpointDiscoverer
|
Collection<EndpointInfo<WebOperation>> endpoints = endpointDiscoverer
|
||||||
.discoverEndpoints();
|
.discoverEndpoints();
|
||||||
assertThat(endpoints.size()).isEqualTo(2);
|
assertThat(endpoints.size()).isEqualTo(2);
|
||||||
|
|
|
||||||
|
|
@ -235,9 +235,8 @@ public class ReactiveCloudFoundryActuatorAutoConfigurationTests {
|
||||||
this.context.refresh();
|
this.context.refresh();
|
||||||
Collection<EndpointInfo<WebOperation>> endpoints = getHandlerMapping()
|
Collection<EndpointInfo<WebOperation>> endpoints = getHandlerMapping()
|
||||||
.getEndpoints();
|
.getEndpoints();
|
||||||
EndpointInfo endpointInfo = (EndpointInfo) (endpoints.toArray()[0]);
|
EndpointInfo<WebOperation> endpointInfo = endpoints.iterator().next();
|
||||||
WebOperation webOperation = (WebOperation) endpointInfo.getOperations()
|
WebOperation webOperation = endpointInfo.getOperations().iterator().next();
|
||||||
.toArray()[0];
|
|
||||||
ReflectiveOperationInvoker invoker = (ReflectiveOperationInvoker) webOperation
|
ReflectiveOperationInvoker invoker = (ReflectiveOperationInvoker) webOperation
|
||||||
.getInvoker();
|
.getInvoker();
|
||||||
assertThat(ReflectionTestUtils.getField(invoker, "target"))
|
assertThat(ReflectionTestUtils.getField(invoker, "target"))
|
||||||
|
|
|
||||||
|
|
@ -259,9 +259,8 @@ public class CloudFoundryActuatorAutoConfigurationTests {
|
||||||
.getBean("cloudFoundryWebEndpointServletHandlerMapping",
|
.getBean("cloudFoundryWebEndpointServletHandlerMapping",
|
||||||
CloudFoundryWebEndpointServletHandlerMapping.class)
|
CloudFoundryWebEndpointServletHandlerMapping.class)
|
||||||
.getEndpoints();
|
.getEndpoints();
|
||||||
EndpointInfo endpointInfo = (EndpointInfo) (endpoints.toArray()[0]);
|
EndpointInfo<WebOperation> endpointInfo = endpoints.iterator().next();
|
||||||
WebOperation webOperation = (WebOperation) endpointInfo.getOperations()
|
WebOperation webOperation = endpointInfo.getOperations().iterator().next();
|
||||||
.toArray()[0];
|
|
||||||
ReflectiveOperationInvoker invoker = (ReflectiveOperationInvoker) webOperation
|
ReflectiveOperationInvoker invoker = (ReflectiveOperationInvoker) webOperation
|
||||||
.getInvoker();
|
.getInvoker();
|
||||||
assertThat(ReflectionTestUtils.getField(invoker, "target"))
|
assertThat(ReflectionTestUtils.getField(invoker, "target"))
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ public class FreeMarkerAutoConfigurationReactiveIntegrationTests {
|
||||||
Mono<View> view = resolver.resolveViewName(viewName, Locale.UK);
|
Mono<View> view = resolver.resolveViewName(viewName, Locale.UK);
|
||||||
MockServerWebExchange exchange = MockServerWebExchange
|
MockServerWebExchange exchange = MockServerWebExchange
|
||||||
.from(MockServerHttpRequest.get("/path"));
|
.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;
|
return exchange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue