Search in sources :

Example 1 with SpecificEndpoint

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

the class EndpointMetadataGenerationTests method specificEndpoint.

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

Aggregations

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