use of org.evosuite.runtime.TooManyResourcesException 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