use of org.springframework.core.testfixture.stereotype.Component in project spring-framework by spring-projects.
the class AnnotationUtilsTests method findClassAnnotationFavorsMoreLocallyDeclaredComposedAnnotationsOverAnnotationsOnInterfaces.
// @since 4.1.2
@Test
void findClassAnnotationFavorsMoreLocallyDeclaredComposedAnnotationsOverAnnotationsOnInterfaces() {
Component component = findAnnotation(ClassWithLocalMetaAnnotationAndMetaAnnotatedInterface.class, Component.class);
assertThat(component).isNotNull();
assertThat(component.value()).isEqualTo("meta2");
}
use of org.springframework.core.testfixture.stereotype.Component in project spring-framework by spring-projects.
the class AnnotationUtilsTests method findClassAnnotationOnMetaCycleAnnotatedClassWithMissingTargetMetaAnnotation.
@Test
void findClassAnnotationOnMetaCycleAnnotatedClassWithMissingTargetMetaAnnotation() {
Component component = findAnnotation(MetaCycleAnnotatedClass.class, Component.class);
assertThat(component).as("Should not find @Component on MetaCycleAnnotatedClass").isNull();
}
Aggregations