Fix deprecated StandardAnnotationMetadata usages

Closes gh-16930
This commit is contained in:
dreis2211
2019-05-21 20:19:15 +02:00
committed by Stephane Nicoll
parent 9ba5c78878
commit 27ca7e17d9
5 changed files with 12 additions and 16 deletions

View File

@@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration;
import org.springframework.boot.actuate.autoconfigure.web.ManagementContextType;
import org.springframework.core.annotation.Order;
import org.springframework.core.type.StandardAnnotationMetadata;
import org.springframework.core.type.AnnotationMetadata;
import static org.assertj.core.api.Assertions.assertThat;
@@ -41,7 +41,7 @@ public class ManagementContextConfigurationImportSelectorTests {
public void selectImportsShouldOrderResult() {
String[] imports = new TestManagementContextConfigurationsImportSelector(C.class,
A.class, D.class, B.class).selectImports(
new StandardAnnotationMetadata(EnableChildContext.class));
AnnotationMetadata.introspect(EnableChildContext.class));
assertThat(imports).containsExactly(A.class.getName(), B.class.getName(),
C.class.getName(), D.class.getName());
}
@@ -50,7 +50,7 @@ public class ManagementContextConfigurationImportSelectorTests {
public void selectImportsFiltersChildOnlyConfigurationWhenUsingSameContext() {
String[] imports = new TestManagementContextConfigurationsImportSelector(
ChildOnly.class, SameOnly.class, A.class).selectImports(
new StandardAnnotationMetadata(EnableSameContext.class));
AnnotationMetadata.introspect(EnableSameContext.class));
assertThat(imports).containsExactlyInAnyOrder(SameOnly.class.getName(),
A.class.getName());
}
@@ -59,7 +59,7 @@ public class ManagementContextConfigurationImportSelectorTests {
public void selectImportsFiltersSameOnlyConfigurationWhenUsingChildContext() {
String[] imports = new TestManagementContextConfigurationsImportSelector(
ChildOnly.class, SameOnly.class, A.class).selectImports(
new StandardAnnotationMetadata(EnableChildContext.class));
AnnotationMetadata.introspect(EnableChildContext.class));
assertThat(imports).containsExactlyInAnyOrder(ChildOnly.class.getName(),
A.class.getName());
}