use of com.examples.with.different.packagename.generic.GuavaExample5 in project evosuite by EvoSuite.
the class TestGenericClass method testGuavaExample.
@Test
public void testGuavaExample() {
Type abstractGuavaExampleString = new TypeToken<AbstractGuavaExample<String>>() {
}.getType();
Type guavaExample5 = new TypeToken<GuavaExample5<String>>() {
}.getType();
GenericClass abstractClass = new GenericClass(abstractGuavaExampleString);
GenericClass concreteClass = new GenericClass(guavaExample5);
Assert.assertTrue(TypeUtils.isAssignable(concreteClass.getType(), abstractClass.getType()));
Assert.assertTrue("Cannot assign " + concreteClass + " to " + abstractClass, abstractClass.isAssignableFrom(concreteClass));
Assert.assertTrue(concreteClass.isAssignableTo(abstractClass));
}
Aggregations