This commit is contained in:
Looly
2022-07-17 18:43:58 +08:00
parent 49e40132ac
commit 94d5889b1c
2 changed files with 8 additions and 4 deletions

View File

@@ -11,14 +11,14 @@ public class AnnotationUtilTest {
public void getCombinationAnnotationsTest(){
final Annotation[] annotations = AnnotationUtil.getAnnotations(ClassWithAnnotation.class, true);
Assert.assertNotNull(annotations);
Assert.assertEquals(3, annotations.length);
Assert.assertEquals(2, annotations.length);
}
@Test
public void getCombinationAnnotationsWithClassTest(){
final AnnotationForTest[] annotations = AnnotationUtil.getCombinationAnnotations(ClassWithAnnotation.class, AnnotationForTest.class);
Assert.assertNotNull(annotations);
Assert.assertEquals(2, annotations.length);
Assert.assertEquals(1, annotations.length);
Assert.assertEquals("测试", annotations[0].value());
}