Skip to content

Commit

Permalink
more assertions trying to flush out bugs I'd already fixed :P
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1483607 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mbenson committed May 16, 2013
1 parent ccddbbd commit 1f001d0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,16 @@ public void testGetTypeArguments() {
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
Expand Down

0 comments on commit 1f001d0

Please sign in to comment.