Skip to content

Instantly share code, notes, and snippets.

Created May 17, 2012 02:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/2715809 to your computer and use it in GitHub Desktop.
Save anonymous/2715809 to your computer and use it in GitHub Desktop.
Test harness for container using module Java API
public class ContainerUsingInterfaceTest extends ContainerTest
{
@Test
public void testStandAloneClassLoader() throws Exception
{
test(new IClassLoaderFactory()
{
public ClassLoader factory() throws MalformedURLException
{
// don't load any classes from the parent
return new URLClassLoader(buildClassPath(), null);
}
});
}
@Test
public void testPostDelegationClassLoader() throws Exception
{
test(new IClassLoaderFactory()
{
public ClassLoader factory() throws MalformedURLException
{
// load classes from the child before the parent
return new PostDelegationClassLoader(buildClassPath());
}
});
}
@Test
public void testConditionalDelegationClassLoader() throws Exception
{
test(new IClassLoaderFactory()
{
public ClassLoader factory() throws MalformedURLException
{
// load Flurry classes from the parent before the child,
// all other from the child before the parent
return new ConditionalDelegationClassLoader(buildClassPath(), flurryPrefix);
}
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment