org.apache.commons.logging.tccl.logfactory
Class TcclDisabledTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.logging.tccl.logfactory.TcclDisabledTestCase
All Implemented Interfaces:
junit.framework.Test

public class TcclDisabledTestCase
extends junit.framework.TestCase

Verify that a commons-logging.properties file can prevent a custom LogFactoryImpl being loaded from the tccl classloader.


Field Summary
static String MY_LOG_FACTORY_IMPL
           
static String MY_LOG_FACTORY_PKG
           
 
Constructor Summary
TcclDisabledTestCase()
           
 
Method Summary
 void setUp()
          Set up instance variables required by this test case.
static junit.framework.Test suite()
          Return the tests included in this test suite.
 void tearDown()
          Tear down instance variables required by this test case.
 void testLoader()
          Verify that MyLogFactoryImpl is only loadable via the tccl.
 void testTcclLoading()
          Verify that the custom LogFactory implementation which is only accessable via the TCCL has NOT been loaded.
 
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

MY_LOG_FACTORY_PKG

public static final String MY_LOG_FACTORY_PKG
See Also:
Constant Field Values

MY_LOG_FACTORY_IMPL

public static final String MY_LOG_FACTORY_IMPL
See Also:
Constant Field Values
Constructor Detail

TcclDisabledTestCase

public TcclDisabledTestCase()
Method Detail

suite

public static junit.framework.Test suite()
                                  throws Exception
Return the tests included in this test suite.

Throws:
Exception

setUp

public void setUp()
           throws Exception
Set up instance variables required by this test case.

Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

tearDown

public void tearDown()
Tear down instance variables required by this test case.

Overrides:
tearDown in class junit.framework.TestCase

testLoader

public void testLoader()
                throws Exception
Verify that MyLogFactoryImpl is only loadable via the tccl.

Throws:
Exception

testTcclLoading

public void testTcclLoading()
                     throws Exception
Verify that the custom LogFactory implementation which is only accessable via the TCCL has NOT been loaded. Because this is only accessable via the TCCL, and we've use a commons-logging.properties that disables TCCL loading, we should see the default LogFactoryImpl rather than the custom one.

Throws:
Exception


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