parent
8219d06ae1
commit
f78c21e40b
|
|
@ -45,7 +45,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||||
class AnnotationsScannerTests {
|
class AnnotationsScannerTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void directStrategyOnClassWhenNotAnnoatedScansNone() {
|
void directStrategyOnClassWhenNotAnnotatedScansNone() {
|
||||||
Class<?> source = WithNoAnnotations.class;
|
Class<?> source = WithNoAnnotations.class;
|
||||||
assertThat(scan(source, SearchStrategy.DIRECT)).isEmpty();
|
assertThat(scan(source, SearchStrategy.DIRECT)).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
@ -423,7 +423,7 @@ class AnnotationsScannerTests {
|
||||||
@Test
|
@Test
|
||||||
void typeHierarchyStrategyOnMethodWithIgnorablesScansAnnotations()
|
void typeHierarchyStrategyOnMethodWithIgnorablesScansAnnotations()
|
||||||
throws Exception {
|
throws Exception {
|
||||||
Method source = methodFrom(Ignoreable.class);
|
Method source = methodFrom(Ignorable.class);
|
||||||
assertThat(scan(source, SearchStrategy.TYPE_HIERARCHY)).containsExactly(
|
assertThat(scan(source, SearchStrategy.TYPE_HIERARCHY)).containsExactly(
|
||||||
"0:TestAnnotation1");
|
"0:TestAnnotation1");
|
||||||
}
|
}
|
||||||
|
|
@ -752,7 +752,7 @@ class AnnotationsScannerTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
static class Ignoreable implements IgnoreableOverrideInterface1, IgnoreableOverrideInterface2, Serializable {
|
static class Ignorable implements IgnorableOverrideInterface1, IgnorableOverrideInterface2, Serializable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@TestAnnotation1
|
@TestAnnotation1
|
||||||
|
|
@ -760,13 +760,13 @@ class AnnotationsScannerTests {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IgnoreableOverrideInterface1 {
|
interface IgnorableOverrideInterface1 {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
void method();
|
void method();
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IgnoreableOverrideInterface2 {
|
interface IgnorableOverrideInterface2 {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
void method();
|
void method();
|
||||||
|
|
|
||||||
|
|
@ -338,8 +338,8 @@ class MergedAnnotationsTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void getWithInheritedAnnotationsFromHalfConventionBasedAndHalfAliasedComposedAnnotation1() {
|
void getWithInheritedAnnotationsFromHalfConventionBasedAndHalfAliasedComposedAnnotation1() {
|
||||||
// SPR-13554: convention mapping mixed with AlaisFor annotations
|
// SPR-13554: convention mapping mixed with AliasFor annotations
|
||||||
// xmlConfigFiles can be used because it has an AlaisFor annotation
|
// xmlConfigFiles can be used because it has an AliasFor annotation
|
||||||
MergedAnnotation<?> annotation = MergedAnnotations.from(
|
MergedAnnotation<?> annotation = MergedAnnotations.from(
|
||||||
HalfConventionBasedAndHalfAliasedComposedContextConfigurationClass1.class,
|
HalfConventionBasedAndHalfAliasedComposedContextConfigurationClass1.class,
|
||||||
SearchStrategy.INHERITED_ANNOTATIONS).get(ContextConfiguration.class);
|
SearchStrategy.INHERITED_ANNOTATIONS).get(ContextConfiguration.class);
|
||||||
|
|
@ -351,8 +351,8 @@ class MergedAnnotationsTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void withInheritedAnnotationsFromHalfConventionBasedAndHalfAliasedComposedAnnotation2() {
|
void withInheritedAnnotationsFromHalfConventionBasedAndHalfAliasedComposedAnnotation2() {
|
||||||
// SPR-13554: convention mapping mixed with AlaisFor annotations
|
// SPR-13554: convention mapping mixed with AliasFor annotations
|
||||||
// locations doesn't apply because it has no AlaisFor annotation
|
// locations doesn't apply because it has no AliasFor annotation
|
||||||
MergedAnnotation<?> annotation = MergedAnnotations.from(
|
MergedAnnotation<?> annotation = MergedAnnotations.from(
|
||||||
HalfConventionBasedAndHalfAliasedComposedContextConfigurationClass2.class,
|
HalfConventionBasedAndHalfAliasedComposedContextConfigurationClass2.class,
|
||||||
SearchStrategy.INHERITED_ANNOTATIONS).get(ContextConfiguration.class);
|
SearchStrategy.INHERITED_ANNOTATIONS).get(ContextConfiguration.class);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue