commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r996711 - /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/AnnotationUtilsTest.java
Date Mon, 13 Sep 2010 22:20:04 GMT
Author: mbenson
Date: Mon Sep 13 22:20:03 2010
New Revision: 996711

URL: http://svn.apache.org/viewvc?rev=996711&view=rev
Log:
add reverse equality test assertions

Modified:
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/AnnotationUtilsTest.java

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/AnnotationUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/AnnotationUtilsTest.java?rev=996711&r1=996710&r2=996711&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/AnnotationUtilsTest.java
(original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/AnnotationUtilsTest.java
Mon Sep 13 22:20:03 2010
@@ -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



Mime
View raw message