1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.commons.logging;
17
18 import junit.framework.TestCase;
19
20 /***
21 * Test cases for situations where getClassLoader or getContextClassLoader
22 * return null. This can happen when using JDK 1.1. It can also happen when
23 * JCL is deployed via the bootclassloader - something that could be done when
24 * using java in embedded systems.
25 */
26 public class NullClassLoaderTestCase extends TestCase {
27
28
29
30 /***
31 * Main method so this test case can be run direct from the command line.
32 */
33 public static void main(String[] args){
34 String[] testCaseName = { NullClassLoaderTestCase.class.getName() };
35 junit.textui.TestRunner.main(testCaseName);
36 }
37
38
39
40 /***
41 * This tests that when getContextClassLoader returns null, the
42 * LogFactory.getLog(name) method still correctly returns the same
43 * log object when called multiple times with the same name.
44 */
45 public void testSameLogObject() throws Exception {
46
47
48
49 }
50 }