GraphQlWebFluxAutoConfigurationTests.java (spring-boot-2.7.3) | : | GraphQlWebFluxAutoConfigurationTests.java (spring-boot-2.7.4) | ||
---|---|---|---|---|
skipping to change at line 154 | skipping to change at line 154 | |||
}); | }); | |||
} | } | |||
@Test | @Test | |||
void shouldConfigureWebSocketBeans() { | void shouldConfigureWebSocketBeans() { | |||
this.contextRunner.withPropertyValues("spring.graphql.websocket.p ath=/ws") | this.contextRunner.withPropertyValues("spring.graphql.websocket.p ath=/ws") | |||
.run((context) -> assertThat(context).hasSingleBe an(GraphQlWebSocketHandler.class)); | .run((context) -> assertThat(context).hasSingleBe an(GraphQlWebSocketHandler.class)); | |||
} | } | |||
@Test | @Test | |||
void routerFunctionShouldHaveOrderZero() throws Exception { | void routerFunctionShouldHaveOrderZero() { | |||
this.contextRunner.withUserConfiguration(CustomRouterFunctions.cl ass).run((context) -> { | this.contextRunner.withUserConfiguration(CustomRouterFunctions.cl ass).run((context) -> { | |||
Map<String, ?> beans = context.getBeansOfType(RouterFunct ion.class); | Map<String, ?> beans = context.getBeansOfType(RouterFunct ion.class); | |||
Object[] ordered = context.getBeanProvider(RouterFunction .class).orderedStream().toArray(); | Object[] ordered = context.getBeanProvider(RouterFunction .class).orderedStream().toArray(); | |||
assertThat(beans.get("before")).isSameAs(ordered[0]); | assertThat(beans.get("before")).isSameAs(ordered[0]); | |||
assertThat(beans.get("graphQlRouterFunction")).isSameAs(o rdered[1]); | assertThat(beans.get("graphQlRouterFunction")).isSameAs(o rdered[1]); | |||
assertThat(beans.get("after")).isSameAs(ordered[2]); | assertThat(beans.get("after")).isSameAs(ordered[2]); | |||
}); | }); | |||
} | } | |||
private void testWithWebClient(Consumer<WebTestClient> consumer) { | private void testWithWebClient(Consumer<WebTestClient> consumer) { | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |