01: /*
02: * SimpleFormatterTest.java
03: * JUnit based test
04: *
05: * Created on 21. Januar 2003, 23:06
06: */
07:
08: package org.jzonic.jlo.formatter;
09:
10: import junit.framework.Test;
11: import junit.framework.TestCase;
12: import junit.framework.TestSuite;
13: import org.jzonic.jlo.LogRecord;
14: import org.jzonic.jlo.Target;
15:
16: /**
17: *
18: * @author Administrator
19: */
20: public class DefaultFormatterTest extends TestCase {
21:
22: public DefaultFormatterTest(java.lang.String testName) {
23: super (testName);
24: }
25:
26: public static void main(java.lang.String[] args) {
27: junit.textui.TestRunner.run(suite());
28: }
29:
30: public static Test suite() {
31: TestSuite suite = new TestSuite(DefaultFormatterTest.class);
32: return suite;
33: }
34:
35: public void testFormat() {
36: String test = help();
37: System.out.println(test);
38: assertNotNull("huhu", test);
39: }
40:
41: public String help() {
42: LogRecord lr = new LogRecord("Test", Target.trace);
43: DefaultFormatter df = new DefaultFormatter("Test");
44: String test = df.formatMessage(lr);
45: return test;
46: }
47:
48: }
|