org.apache.commons.logging.pathable
Class ChildFirstTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.logging.pathable.ChildFirstTestCase
All Implemented Interfaces:
junit.framework.Test

public class ChildFirstTestCase
extends junit.framework.TestCase

Tests for the PathableTestSuite and PathableClassLoader functionality, where lookup order for the PathableClassLoader is child-first.

These tests assume:


Constructor Summary
ChildFirstTestCase()
           
 
Method Summary
static junit.framework.Test suite()
          Set up a custom classloader hierarchy for this test case.
 void testPaths()
          Test that the classloader hierarchy is as expected, and that calling loadClass() on various classloaders works as expected.
 void testResource()
          Test that the various flavours of ClassLoader.getResource work as expected.
 void testResourceAsStream()
          Test that getResourceAsStream works.
 void testResources()
          Test that the various flavours of ClassLoader.getResources work as expected.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChildFirstTestCase

public ChildFirstTestCase()
Method Detail

suite

public static junit.framework.Test suite()
                                  throws Exception
Set up a custom classloader hierarchy for this test case. The hierarchy is:

Throws:
Exception

testPaths

public void testPaths()
               throws Exception
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.

Throws:
Exception

testResource

public void testResource()
Test that the various flavours of ClassLoader.getResource work as expected.


testResources

public void testResources()
                   throws Exception
Test that the various flavours of ClassLoader.getResources work as expected.

Throws:
Exception

testResourceAsStream

public void testResourceAsStream()
                          throws Exception
Test that getResourceAsStream works.

Throws:
Exception


Copyright © 2001-2011 Apache Software Foundation. All Rights Reserved.