Skip to content

Commit dab90cb

Browse files
committed
Test status quo for MergedAnnotation.getParent()
See gh-22818
1 parent e5d64e6 commit dab90cb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,13 @@ public void isPresentWhenFromClassWithMetaDepth2() {
147147
assertThat(annotations.isPresent(ComposedTransactionalComponent.class)).isTrue();
148148
}
149149

150+
@Test
151+
public void getParent() {
152+
MergedAnnotations annotations = MergedAnnotations.from(ComposedTransactionalComponentClass.class);
153+
assertThat(annotations.get(TransactionalComponent.class).getParent().getType())
154+
.isEqualTo(ComposedTransactionalComponent.class);
155+
}
156+
150157
@Test
151158
public void collectMultiValueMapFromNonAnnotatedClass() {
152159
MultiValueMap<String, Object> map = MergedAnnotations.from(

0 commit comments

Comments
 (0)