| org.apache.commons.logging.pathable.ParentFirstTestCase
ParentFirstTestCase | public class ParentFirstTestCase extends TestCase (Code) | | Tests for the PathableTestSuite and PathableClassLoader functionality,
where lookup order for the PathableClassLoader is parent-first.
These tests assume:
- junit is in system classpath
- nothing else is in system classpath
|
Method Summary | |
public static Test | suite() Set up a custom classloader hierarchy for this test case. | public void | testPaths() Test that the classloader hierarchy is as expected, and that
calling loadClass() on various classloaders works as expected. | public void | testResource() Test that the various flavours of ClassLoader.getResource work as expected. | public void | testResourceAsStream() Test that getResourceAsStream works. | public void | testResources() Test that the various flavours of ClassLoader.getResources work as expected. |
suite | public static Test suite() throws Exception(Code) | | Set up a custom classloader hierarchy for this test case.
The hierarchy is:
- contextloader: parent-first.
- childloader: parent-first, used to load test case.
- parentloader: parent-first, parent is the bootclassloader.
|
testPaths | public void testPaths() throws Exception(Code) | | Test that the classloader hierarchy is as expected, and that
calling loadClass() on various classloaders works as expected.
Note that for this test case, parent-first classloading is
in effect.
|
testResource | public void testResource()(Code) | | Test that the various flavours of ClassLoader.getResource work as expected.
|
testResourceAsStream | public void testResourceAsStream() throws Exception(Code) | | Test that getResourceAsStream works.
|
testResources | public void testResources() throws Exception(Code) | | Test that the various flavours of ClassLoader.getResources work as expected.
|
|
|