You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mb...@apache.org on 2013/05/17 01:34:36 UTC

svn commit: r1483607 - /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java

Author: mbenson
Date: Thu May 16 23:34:36 2013
New Revision: 1483607

URL: http://svn.apache.org/r1483607
Log:
more assertions trying to flush out bugs I'd already fixed :P

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

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java?rev=1483607&r1=1483606&r2=1483607&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java Thu May 16 23:34:36 2013
@@ -505,6 +505,16 @@ public class TypeUtilsTest<B> {
         Assert.assertEquals(2, typeVarAssigns.size());
         Assert.assertEquals(String.class, typeVarAssigns.get(This.class.getTypeParameters()[0]));
         Assert.assertEquals(Other.class.getTypeParameters()[0], typeVarAssigns.get(This.class.getTypeParameters()[1]));
+
+        typeVarAssigns = TypeUtils.getTypeArguments(And.class, This.class);
+        Assert.assertEquals(2, typeVarAssigns.size());
+        Assert.assertEquals(Number.class, typeVarAssigns.get(This.class.getTypeParameters()[0]));
+        Assert.assertEquals(Number.class, typeVarAssigns.get(This.class.getTypeParameters()[1]));
+
+        typeVarAssigns = TypeUtils.getTypeArguments(Thing.class, Other.class);
+        Assert.assertEquals(2, typeVarAssigns.size());
+        Assert.assertEquals(getClass().getTypeParameters()[0], typeVarAssigns.get(getClass().getTypeParameters()[0]));
+        Assert.assertEquals(getClass().getTypeParameters()[0], typeVarAssigns.get(Other.class.getTypeParameters()[0]));
     }
 
     @Test