[logback-dev] svn commit: r1761 - in logback/trunk/logback-core: . src/test/input/joran src/test/input/joran/replay src/test/java/ch/qos/logback/core src/test/java/ch/qos/logback/core/joran/implicitAction src/test/java/ch/qos/logback/core/joran/replay

noreply.ceki at qos.ch noreply.ceki at qos.ch
Tue Aug 19 19:21:52 CEST 2008


Author: ceki
Date: Tue Aug 19 19:21:52 2008
New Revision: 1761

Added:
   logback/trunk/logback-core/src/test/input/joran/replay/
   logback/trunk/logback-core/src/test/input/joran/replay/fruit1.xml
      - copied unchanged from r1704, /logback/trunk/logback-core/src/test/input/joran/fruit1.xml
   logback/trunk/logback-core/src/test/input/joran/replay/fruit2.xml
      - copied unchanged from r1704, /logback/trunk/logback-core/src/test/input/joran/fruit2.xml
   logback/trunk/logback-core/src/test/input/joran/replay/fruitWithSubst.xml
      - copied unchanged from r1704, /logback/trunk/logback-core/src/test/input/joran/fruitWithSubst.xml
   logback/trunk/logback-core/src/test/java/ch/qos/logback/core/AllCoreTest.java
      - copied, changed from r1704, /logback/trunk/logback-core/src/test/java/ch/qos/logback/core/AllTest.java
Removed:
   logback/trunk/logback-core/src/test/input/joran/fruit1.xml
   logback/trunk/logback-core/src/test/input/joran/fruit2.xml
   logback/trunk/logback-core/src/test/input/joran/fruitWithSubst.xml
   logback/trunk/logback-core/src/test/java/ch/qos/logback/core/AllTest.java
Modified:
   logback/trunk/logback-core/pom.xml
   logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/implicitAction/FruitContextAction.java
   logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/replay/FruitConfigurationTest.java
   logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/replay/FruitShellAction.java

Log:
- Renamed AllTest as AllCoreTest so that it differs from AllTest 
  other modules, i.e. logback-classic

- FruitShell code is intended to test Joran's replay capability. 
  Thus the various config files have been moved under src/test/input/joran/replay
  

Modified: logback/trunk/logback-core/pom.xml
==============================================================================
--- logback/trunk/logback-core/pom.xml	(original)
+++ logback/trunk/logback-core/pom.xml	Tue Aug 19 19:21:52 2008
@@ -73,7 +73,7 @@
           <reportFormat>plain</reportFormat>
           <trimStackTrace>false</trimStackTrace>
           <excludes>
-            <exclude>**/AllTest.java</exclude>
+            <exclude>**/All*Test.java</exclude>
             <exclude>**/PackageTest.java</exclude>
             <exclude>**/SizeBasedRollingTest.java</exclude>
           </excludes>

Copied: logback/trunk/logback-core/src/test/java/ch/qos/logback/core/AllCoreTest.java (from r1704, /logback/trunk/logback-core/src/test/java/ch/qos/logback/core/AllTest.java)
==============================================================================
--- /logback/trunk/logback-core/src/test/java/ch/qos/logback/core/AllTest.java	(original)
+++ logback/trunk/logback-core/src/test/java/ch/qos/logback/core/AllCoreTest.java	Tue Aug 19 19:21:52 2008
@@ -13,7 +13,7 @@
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
-public class AllTest extends TestCase {
+public class AllCoreTest extends TestCase {
 
   public static Test suite() {
     TestSuite suite = new TestSuite();

Modified: logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/implicitAction/FruitContextAction.java
==============================================================================
--- logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/implicitAction/FruitContextAction.java	(original)
+++ logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/implicitAction/FruitContextAction.java	Tue Aug 19 19:21:52 2008
@@ -15,6 +15,7 @@
 import ch.qos.logback.core.joran.action.Action;
 import ch.qos.logback.core.joran.spi.ActionException;
 import ch.qos.logback.core.joran.spi.InterpretationContext;
+import ch.qos.logback.core.joran.spi.ActionException.SkipCode;
 
 public class FruitContextAction extends Action {
 
@@ -33,7 +34,7 @@
       inError = true;
       addError(
         "Could not push context", oops);
-      throw new ActionException(ActionException.SKIP_CHILDREN, oops);
+      throw new ActionException(SkipCode.SKIP_CHILDREN, oops);
     }
   }
 

Modified: logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/replay/FruitConfigurationTest.java
==============================================================================
--- logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/replay/FruitConfigurationTest.java	(original)
+++ logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/replay/FruitConfigurationTest.java	Tue Aug 19 19:21:52 2008
@@ -1,11 +1,18 @@
+/**
+ * Logback: the generic, reliable, fast and flexible logging framework.
+ * 
+ * Copyright (C) 2000-2008, QOS.ch
+ * 
+ * This library is free software, you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation.
+ */
 package ch.qos.logback.core.joran.replay;
 
 import java.util.HashMap;
 import java.util.List;
 
-import junit.framework.Test;
 import junit.framework.TestCase;
-import junit.framework.TestSuite;
 import ch.qos.logback.core.joran.SimpleConfigurator;
 import ch.qos.logback.core.joran.action.Action;
 import ch.qos.logback.core.joran.action.NOPAction;
@@ -13,6 +20,9 @@
 import ch.qos.logback.core.util.Constants;
 import ch.qos.logback.core.util.StatusPrinter;
 
+/** 
+ * The Fruit* code is intended to test Joran's replay capability
+ * */
 public class FruitConfigurationTest extends TestCase {
 
   FruitContext fruitContext = new FruitContext();
@@ -41,7 +51,7 @@
 
       simpleConfigurator.setContext(fruitContext);
 
-      simpleConfigurator.doConfigure(Constants.TEST_DIR_PREFIX + "input/joran/"
+      simpleConfigurator.doConfigure(Constants.TEST_DIR_PREFIX + "input/joran/replay/"
           + filename);
 
       return fruitContext.getFruitShellList();
@@ -51,7 +61,8 @@
     }
   }
 
-  public void test1() throws Exception {
+  @org.junit.Test
+  public void fruit1() throws Exception {
     List<FruitShell> fsList = doFirstPart("fruit1.xml");
     assertNotNull(fsList);
     assertEquals(1, fsList.size());
@@ -100,10 +111,4 @@
     assertEquals(1.2, ((WeightytFruit) fruit0).getWeight());
   }
 
-  public static Test suite() {
-    TestSuite suite = new TestSuite();
-    // suite.addTest(new FruitConfigurationTest("testWithSubst"));
-    suite.addTestSuite(FruitConfigurationTest.class);
-    return suite;
-  }
 }

Modified: logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/replay/FruitShellAction.java
==============================================================================
--- logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/replay/FruitShellAction.java	(original)
+++ logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/replay/FruitShellAction.java	Tue Aug 19 19:21:52 2008
@@ -15,8 +15,12 @@
 import ch.qos.logback.core.joran.action.Action;
 import ch.qos.logback.core.joran.spi.ActionException;
 import ch.qos.logback.core.joran.spi.InterpretationContext;
+import ch.qos.logback.core.joran.spi.ActionException.SkipCode;
 import ch.qos.logback.core.util.OptionHelper;
 
+/** 
+ * The Fruit* code is intended to test Joran's replay capability
+ * */
 public class FruitShellAction extends Action {
 
   FruitShell fruitShell;
@@ -51,7 +55,7 @@
       inError = true;
       addError(
         "Could not create an FruitShell", oops);
-      throw new ActionException(ActionException.SKIP_CHILDREN, oops);
+      throw new ActionException(SkipCode.SKIP_CHILDREN, oops);
     }
   }
 


More information about the logback-dev mailing list