use of org.evosuite.runtime.instrumentation.EvoClassLoader in project evosuite by EvoSuite.
the class InfiniteWhile_SystemTest method testLoading.
@Test(timeout = 5000)
public void testLoading() throws Exception {
EvoClassLoader loader = new EvoClassLoader();
Class<?> clazz = loader.loadClass(InfiniteWhile.class.getCanonicalName());
Method m = clazz.getMethod("infiniteLoop");
try {
m.invoke(null);
fail();
} catch (InvocationTargetException e) {
// expected
Assert.assertTrue(e.getCause() instanceof TooManyResourcesException);
}
}
Aggregations