use of spoon.support.SpoonClassNotFoundException in project spoon by INRIA.
the class TypeTest method testUnboxingTypeReference.
@Test
public void testUnboxingTypeReference() throws Exception {
// contract: When you call CtTypeReference#unbox on a class which doesn't exist
// in the spoon path, the method return the type reference itself.
final Factory factory = createFactory();
final CtTypeReference<Object> aReference = factory.Type().createReference("fr.inria.Spoon");
try {
final CtTypeReference<?> unbox = aReference.unbox();
assertEquals(aReference, unbox);
} catch (SpoonClassNotFoundException e) {
fail("Should never throw a SpoonClassNotFoundException.");
}
}
Aggregations