1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.logging.jdk14;
18
19 import junit.framework.Test;
20
21 import org.apache.commons.logging.PathableTestSuite;
22 import org.apache.commons.logging.PathableClassLoader;
23
24
25 /***
26 * TestCase for Jdk14 logging when the commons-logging-api jar file is in
27 * the parent classpath and commons-logging.jar is in the child.
28 */
29
30 public class CustomConfigAPITestCase extends CustomConfigTestCase {
31
32
33 public CustomConfigAPITestCase(String name) {
34 super(name);
35 }
36
37
38 /***
39 * Return the tests included in this test suite.
40 */
41 public static Test suite() throws Exception {
42 PathableClassLoader parent = new PathableClassLoader(null);
43 parent.useSystemLoader("junit.");
44
45
46
47
48
49 parent.useSystemLoader("org.apache.commons.logging.jdk14.TestHandler");
50 parent.addLogicalLib("commons-logging-api");
51
52 PathableClassLoader child = new PathableClassLoader(parent);
53 child.addLogicalLib("testclasses");
54 child.addLogicalLib("commons-logging");
55
56 Class testClass = child.loadClass(CustomConfigAPITestCase.class.getName());
57 return new PathableTestSuite(testClass, child);
58 }
59 }