01: /*
02: * Danet GmbH
03: * Beratung und Software-Entwicklung
04: * Geschäftstelle AN
05: *
06: * $Id: Log4j.java,v 1.1.1.2 2003/12/19 13:01:50 drmlipp Exp $
07: *
08: * $Log: Log4j.java,v $
09: * Revision 1.1.1.2 2003/12/19 13:01:50 drmlipp
10: * Updated to 1.1rc1
11: *
12: * Revision 1.6 2003/10/21 21:00:44 lipp
13: * Moved EJBClientTest to new junit sub-package.
14: *
15: * Revision 1.5 2003/08/27 12:29:42 lipp
16: * Added WLS support.
17: *
18: * Revision 1.4 2003/04/26 16:46:55 lipp
19: * Made unittests and systemtests coexist in eclipse.
20: *
21: * Revision 1.3 2003/04/16 19:25:04 lipp
22: * Adapted to jdk 1.4
23: *
24: * Revision 1.2 2003/03/31 16:50:29 huaiyang
25: * Logging using common-logging.
26: *
27: * Revision 1.1 2002/02/03 21:41:42 lipp
28: * Cleaned up unittests.
29: *
30: */
31: package util;
32:
33: import javax.security.auth.login.LoginException;
34:
35: import de.danet.an.util.junit.EJBClientTest;
36:
37: import common.UTLoginContext;
38: import junit.framework.Test;
39: import junit.framework.TestCase;
40: import junit.framework.TestSuite;
41:
42: /**
43: * Zusammenstellung aller RasObjectTests.
44: */
45: public class Log4j extends TestCase {
46:
47: private static UTLoginContext plc = null;
48: static {
49: try {
50: plc = new UTLoginContext();
51: plc.login();
52: } catch (LoginException e) {
53: throw new IllegalStateException(e.getMessage());
54: }
55: }
56:
57: /**
58: * Konstruktor zum Erzeugen eines TestCase
59: */
60: public Log4j(String name) {
61: super (name);
62: }
63:
64: /**
65: * Stellt diese TestSuite zusammen.
66: */
67: public static Test suite() {
68: TestSuite suite = new TestSuite();
69: suite.addTest(new Log4j("getEJBLogger"));
70: return new EJBClientTest(plc, suite);
71: }
72:
73: /**
74: * Try to get a EJBLogger.
75: */
76: public void getEJBLogger() throws Exception {
77: org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory
78: .getLog(Log4j.class);
79:
80: logger.info("Logging available.");
81: }
82: }
|