Methods Summary |
---|
protected void | setUp()
super.setUp();
assignableFrom = new AssignableFrom(Animal.class);
|
public void | testImplementorsAreAssignable()
assignableFrom = new AssignableFrom(WritingInstrument.class);
assertTrue(assignableFrom.apply(testMethodFor(Pencil.class)));
assertTrue(assignableFrom.apply(testMethodFor(Pen.class)));
|
private TestMethod | testMethodFor(java.lang.Class aClass)
Method method = aClass.getMethod("testX");
return new TestMethod(method, aClass);
|
public void | testNotAssignable()
assertFalse(assignableFrom.apply(testMethodFor(Pencil.class)));
|
public void | testSelfIsAssignable()
assertTrue(assignableFrom.apply(testMethodFor(Animal.class)));
|
public void | testSubclassesAreAssignable()
assertTrue(assignableFrom.apply(testMethodFor(Mammal.class)));
assertTrue(assignableFrom.apply(testMethodFor(Human.class)));
|