org.apache.commons.logging
Class NullClassLoaderTestCase

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

public class NullClassLoaderTestCase
extends junit.framework.TestCase

Test cases for situations where getClassLoader or getContextClassLoader return null. This can happen when using JDK 1.1. It can also happen when JCL is deployed via the bootclassloader - something that could be done when using java in embedded systems.


Constructor Summary
NullClassLoaderTestCase()
           
 
Method Summary
static void main(String[] args)
          Main method so this test case can be run direct from the command line.
 void testSameLogObject()
          This tests that when getContextClassLoader returns null, the LogFactory.getLog(name) method still correctly returns the same log object when called multiple times with the same name.
 
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

NullClassLoaderTestCase

public NullClassLoaderTestCase()
Method Detail

main

public static void main(String[] args)
Main method so this test case can be run direct from the command line.


testSameLogObject

public void testSameLogObject()
                       throws Exception
This tests that when getContextClassLoader returns null, the LogFactory.getLog(name) method still correctly returns the same log object when called multiple times with the same name.

Throws:
Exception


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