Skip to content

Commit

Permalink
LPS-127022 More obvious
Browse files Browse the repository at this point in the history
  • Loading branch information
brianchandotcom committed Apr 24, 2021
1 parent 8ceb4a3 commit 28c88e5
Showing 1 changed file with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ public void testConstructor() {

@Test
public void testGetGenericClass() {

// Index 0

Assert.assertEquals(
String.class,
GenericUtil.getGenericClass(new StringParameterizedType()));
Expand All @@ -56,20 +59,9 @@ public void testGetGenericClass() {
Assert.assertEquals(
String.class,
GenericUtil.getGenericClass(StringParameterizedType.class));
}

@Test
public void testGetGenericClassName() {
Assert.assertEquals(
Object.class.getCanonicalName(),
GenericUtil.getGenericClassName(new NoParameterizedTypeImpl()));
Assert.assertEquals(
String.class.getCanonicalName(),
GenericUtil.getGenericClassName(new StringParameterizedType()));
}
// Index 1

@Test
public void testGetSecondGenericClass() {
Assert.assertEquals(
String.class,
GenericUtil.getGenericClass(
Expand All @@ -89,6 +81,16 @@ public void testGetSecondGenericClass() {
GenericUtil.getGenericClass(StringParameterizedType.class, 1));
}

@Test
public void testGetGenericClassName() {
Assert.assertEquals(
Object.class.getCanonicalName(),
GenericUtil.getGenericClassName(new NoParameterizedTypeImpl()));
Assert.assertEquals(
String.class.getCanonicalName(),
GenericUtil.getGenericClassName(new StringParameterizedType()));
}

public static class ExtendsNoParameterizedTypeImpl
extends NoParameterizedTypeImpl {
}
Expand Down

0 comments on commit 28c88e5

Please sign in to comment.