Search in sources :

Example 1 with ReactiveHealthContributor

use of org.springframework.boot.actuate.health.ReactiveHealthContributor in project spring-boot by spring-projects.

the class AutoConfiguredReactiveHealthContributorRegistryTests method registerContributorWithGroupNameThrowsException.

@Test
void registerContributorWithGroupNameThrowsException() {
    ReactiveHealthContributorRegistry registry = new AutoConfiguredReactiveHealthContributorRegistry(Collections.emptyMap(), Arrays.asList("spring", "boot"));
    assertThatIllegalStateException().isThrownBy(() -> registry.registerContributor("spring", mock(ReactiveHealthContributor.class))).withMessage("ReactiveHealthContributor with name \"spring\" clashes with group");
}
Also used : ReactiveHealthContributor(org.springframework.boot.actuate.health.ReactiveHealthContributor) ReactiveHealthContributorRegistry(org.springframework.boot.actuate.health.ReactiveHealthContributorRegistry) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)1 ReactiveHealthContributor (org.springframework.boot.actuate.health.ReactiveHealthContributor)1 ReactiveHealthContributorRegistry (org.springframework.boot.actuate.health.ReactiveHealthContributorRegistry)1