[logback-dev] svn commit: r706 - in logback/trunk/logback-core/src/test: input/joran java/ch/qos/logback/core/util
noreply.ceki at qos.ch
noreply.ceki at qos.ch
Tue Oct 17 23:39:30 CEST 2006
Author: ceki
Date: Tue Oct 17 23:39:30 2006
New Revision: 706
Added:
logback/trunk/logback-core/src/test/input/joran/attributesEvent.xml
logback/trunk/logback-core/src/test/java/ch/qos/logback/core/util/StatusPrinterTest.java
Log:
adding missing files
Added: logback/trunk/logback-core/src/test/input/joran/attributesEvent.xml
==============================================================================
--- (empty file)
+++ logback/trunk/logback-core/src/test/input/joran/attributesEvent.xml Tue Oct 17 23:39:30 2006
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<inc increment="1"/>
Added: logback/trunk/logback-core/src/test/java/ch/qos/logback/core/util/StatusPrinterTest.java
==============================================================================
--- (empty file)
+++ logback/trunk/logback-core/src/test/java/ch/qos/logback/core/util/StatusPrinterTest.java Tue Oct 17 23:39:30 2006
@@ -0,0 +1,56 @@
+package ch.qos.logback.core.util;
+
+import junit.framework.TestCase;
+import ch.qos.logback.core.Context;
+import ch.qos.logback.core.ContextBase;
+import ch.qos.logback.core.status.ErrorStatus;
+import ch.qos.logback.core.status.InfoStatus;
+import ch.qos.logback.core.status.Status;
+import ch.qos.logback.core.status.WarnStatus;
+
+public class StatusPrinterTest extends TestCase {
+
+ public StatusPrinterTest(String arg0) {
+ super(arg0);
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void testBasic() {
+ Context context = new ContextBase();
+ context.getStatusManager().add(new InfoStatus("test", this));
+ StatusPrinter.print(context);
+ }
+
+ public void testNested() {
+ Status s0 = new ErrorStatus("test0", this);
+ Status s1 = new InfoStatus("test1", this);
+ Status s11 = new InfoStatus("test11", this);
+ Status s12 = new InfoStatus("test12", this);
+ s1.add(s11);
+ s1.add(s12);
+
+ Status s2 = new InfoStatus("test2", this);
+ Status s21 = new InfoStatus("test21", this);
+ Status s211 = new WarnStatus("test211", this);
+
+ Status s22 = new InfoStatus("test22", this);
+ s2.add(s21);
+ s2.add(s22);
+ s21.add(s211);
+
+
+ Context context = new ContextBase();
+ context.getStatusManager().add(s0);
+ context.getStatusManager().add(s1);
+ context.getStatusManager().add(s2);
+ StatusPrinter.print(context);
+ }
+
+}
More information about the logback-dev
mailing list