org.jboss.test.util.test.loading
Class ClassLoaderSourceTestBase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.jboss.test.util.test.loading.ClassLoaderSourceTestBase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
ConstructorTCCLClassLoaderSourceUnitTestCase, MyClassLoaderClassLoaderSourceUnitTestCase

public abstract class ClassLoaderSourceTestBase
extends junit.framework.TestCase

Base class for testing ClassLoaderSource implementations.

Author:
Brian Stansberry

Field Summary
protected  ClassLoader origCl
           
 
Constructor Summary
ClassLoaderSourceTestBase(String name)
           
 
Method Summary
protected  void checkCorrectClassLoaderSource(ClassLoader tccl)
           
protected abstract  org.jboss.util.loading.ClassLoaderSource createClassLoaderSource()
           
protected abstract  ClassLoader getExpectedClassLoader(ClassLoader tccl)
           
protected  ClassLoader getExtendedClassLoader()
           
protected  void setUp()
           
protected  void tearDown()
           
 void testDifferentTCCL()
          Tests that the ClassLoaderSource returns the expected classloader when the TCCL is a child classloader.
 void testImplClassLoader()
          Tests that the ClassLoaderSource returns the expected classloader when the TCCL is the CLS impl's own classloader.
 void testNullTCCL()
          Tests that the ClassLoaderSource returns the expected classloader when the TCCL is null.
 void testOriginalTCCL()
          Tests that the ClassLoaderSource returns the expected classloader when the TCCL is the basic one in place when this test is executed.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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
 

Field Detail

origCl

protected ClassLoader origCl
Constructor Detail

ClassLoaderSourceTestBase

public ClassLoaderSourceTestBase(String name)
Parameters:
name -
Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
Exception

createClassLoaderSource

protected abstract org.jboss.util.loading.ClassLoaderSource createClassLoaderSource()

getExpectedClassLoader

protected abstract ClassLoader getExpectedClassLoader(ClassLoader tccl)

testNullTCCL

public void testNullTCCL()
Tests that the ClassLoaderSource returns the expected classloader when the TCCL is null.


testOriginalTCCL

public void testOriginalTCCL()
Tests that the ClassLoaderSource returns the expected classloader when the TCCL is the basic one in place when this test is executed.


testImplClassLoader

public void testImplClassLoader()
Tests that the ClassLoaderSource returns the expected classloader when the TCCL is the CLS impl's own classloader.


testDifferentTCCL

public void testDifferentTCCL()
Tests that the ClassLoaderSource returns the expected classloader when the TCCL is a child classloader.


checkCorrectClassLoaderSource

protected void checkCorrectClassLoaderSource(ClassLoader tccl)

getExtendedClassLoader

protected ClassLoader getExtendedClassLoader()


Copyright © 2009 JBoss Inc.. All Rights Reserved.