Search in sources :

Example 1 with DispatcherHandlerMappingDescription

use of org.springframework.boot.actuate.web.mappings.reactive.DispatcherHandlerMappingDescription in project spring-boot by spring-projects.

the class MappingsEndpointTests method reactiveWebMappings.

@Test
void reactiveWebMappings() {
    new ReactiveWebApplicationContextRunner().withUserConfiguration(EndpointConfiguration.class, ReactiveWebConfiguration.class).run((context) -> {
        ContextMappings contextMappings = contextMappings(context);
        assertThat(contextMappings.getParentId()).isNull();
        assertThat(contextMappings.getMappings()).containsOnlyKeys("dispatcherHandlers");
        Map<String, List<DispatcherHandlerMappingDescription>> dispatcherHandlers = mappings(contextMappings, "dispatcherHandlers");
        assertThat(dispatcherHandlers).containsOnlyKeys("webHandler");
        List<DispatcherHandlerMappingDescription> handlerMappings = dispatcherHandlers.get("webHandler");
        assertThat(handlerMappings).hasSize(3);
    });
}
Also used : DispatcherHandlerMappingDescription(org.springframework.boot.actuate.web.mappings.reactive.DispatcherHandlerMappingDescription) ContextMappings(org.springframework.boot.actuate.web.mappings.MappingsEndpoint.ContextMappings) List(java.util.List) ReactiveWebApplicationContextRunner(org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner) Test(org.junit.jupiter.api.Test)

Aggregations

List (java.util.List)1 Test (org.junit.jupiter.api.Test)1 ContextMappings (org.springframework.boot.actuate.web.mappings.MappingsEndpoint.ContextMappings)1 DispatcherHandlerMappingDescription (org.springframework.boot.actuate.web.mappings.reactive.DispatcherHandlerMappingDescription)1 ReactiveWebApplicationContextRunner (org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner)1