1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.xulux.logging;
17
18 import org.apache.commons.logging.impl.SimpleLog;
19
20 import junit.framework.TestCase;
21
22
23
24
25
26
27 public class CommonsLoggingTest extends TestCase {
28
29 static {
30 System.setProperty("org.apache.commons.logging.Log", SimpleLog.class.getName());
31
32 }
33
34
35
36
37 public CommonsLoggingTest(String name) {
38 super(name);
39 }
40
41 public void testInitDestroy() {
42 System.out.println("testInitDestroy");
43 CommonsLogging cl = new CommonsLogging();
44 cl.init();
45 cl.destroy();
46 }
47
48 public void testLog() {
49 System.out.println("testLog");
50 CommonsLogging cl = new CommonsLogging();
51
52 cl.log(0, null, null);
53 cl.log(0, "test", null);
54 }
55
56 public void testLogException() {
57 System.out.println("testLogException");
58 CommonsLogging cl = new CommonsLogging();
59 cl.log(0, null, null, null);
60 cl.log(0, "test", null, null);
61 }
62
63 }