use of org.evosuite.utils.generic.WildcardTypeImpl in project evosuite by EvoSuite.
the class TestGenericClass method testWildcardObjectBoundaries.
@Test
public void testWildcardObjectBoundaries() {
WildcardType objectType = new WildcardTypeImpl(new Type[] { Object.class }, new Type[] {});
GenericClass integerClass = new GenericClass(Integer.class);
GenericClass comparableClass = new GenericClass(Comparable.class);
GenericClass dateClass = new GenericClass(java.util.Date.class);
GenericClass sqlDateClass = new GenericClass(java.sql.Date.class);
Assert.assertTrue(integerClass.satisfiesBoundaries(objectType));
Assert.assertTrue(comparableClass.satisfiesBoundaries(objectType));
Assert.assertTrue(dateClass.satisfiesBoundaries(objectType));
Assert.assertTrue(sqlDateClass.satisfiesBoundaries(objectType));
}
use of org.evosuite.utils.generic.WildcardTypeImpl in project evosuite by EvoSuite.
the class TestGenericClass method testWildcardSqlDateBoundaries.
@Test
public void testWildcardSqlDateBoundaries() {
WildcardType objectType = new WildcardTypeImpl(new Type[] { java.sql.Date.class }, new Type[] {});
GenericClass integerClass = new GenericClass(Integer.class);
GenericClass comparableClass = new GenericClass(Comparable.class);
GenericClass dateClass = new GenericClass(java.util.Date.class);
GenericClass sqlDateClass = new GenericClass(java.sql.Date.class);
Assert.assertFalse(integerClass.satisfiesBoundaries(objectType));
Assert.assertFalse(comparableClass.satisfiesBoundaries(objectType));
Assert.assertFalse(dateClass.satisfiesBoundaries(objectType));
Assert.assertTrue(sqlDateClass.satisfiesBoundaries(objectType));
}
Aggregations