Created
May 17, 2012 02:41
-
-
Save anonymous/2715809 to your computer and use it in GitHub Desktop.
Test harness for container using module Java API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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