Search in sources :

Example 1 with EnabledEndpoint

use of org.springframework.boot.configurationsample.endpoint.EnabledEndpoint in project spring-boot by spring-projects.

the class EndpointMetadataGenerationTests method enabledEndpoint.

@Test
void enabledEndpoint() {
    ConfigurationMetadata metadata = compile(EnabledEndpoint.class);
    assertThat(metadata).has(Metadata.withGroup("management.endpoint.enabled").fromSource(EnabledEndpoint.class));
    assertThat(metadata).has(enabledFlag("enabled", true));
    assertThat(metadata.getItems()).hasSize(2);
}
Also used : ConfigurationMetadata(org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata) EnabledEndpoint(org.springframework.boot.configurationsample.endpoint.EnabledEndpoint) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)1 ConfigurationMetadata (org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata)1 EnabledEndpoint (org.springframework.boot.configurationsample.endpoint.EnabledEndpoint)1