add reverse equality test assertions
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@996711 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
857cf0714d
commit
fc3a096305
|
@ -391,6 +391,7 @@ public class AnnotationUtilsTest {
|
|||
@Test
|
||||
public void testEquivalence() {
|
||||
assertTrue(AnnotationUtils.equals(field1.getAnnotation(TestAnnotation.class), field2.getAnnotation(TestAnnotation.class)));
|
||||
assertTrue(AnnotationUtils.equals(field2.getAnnotation(TestAnnotation.class), field1.getAnnotation(TestAnnotation.class)));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -401,16 +402,19 @@ public class AnnotationUtilsTest {
|
|||
@Test
|
||||
public void testNonEquivalentAnnotationsOfSameType() {
|
||||
assertFalse(AnnotationUtils.equals(field1.getAnnotation(TestAnnotation.class), field3.getAnnotation(TestAnnotation.class)));
|
||||
assertFalse(AnnotationUtils.equals(field3.getAnnotation(TestAnnotation.class), field1.getAnnotation(TestAnnotation.class)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAnnotationsOfDifferingTypes() {
|
||||
assertFalse(AnnotationUtils.equals(field1.getAnnotation(TestAnnotation.class), field4.getAnnotation(NestAnnotation.class)));
|
||||
assertFalse(AnnotationUtils.equals(field4.getAnnotation(NestAnnotation.class), field1.getAnnotation(TestAnnotation.class)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOneArgNull() {
|
||||
assertFalse(AnnotationUtils.equals(field1.getAnnotation(TestAnnotation.class), null));
|
||||
assertFalse(AnnotationUtils.equals(null, field1.getAnnotation(TestAnnotation.class)));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue