[logback-dev] svn commit: r1629 - logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/action

noreply.ceki at qos.ch noreply.ceki at qos.ch
Tue Mar 4 19:04:20 CET 2008


Author: ceki
Date: Tue Mar  4 19:04:20 2008
New Revision: 1629

Modified:
   logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeActionTest.java

Log:
- fixing bug #129 see also http://bugzilla.qos.ch/show_bug.cgi?id=129\

- refactored the IncludeAction for clarity
- IncludeActionTest has been enhanced to check for bug 129

Modified: logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeActionTest.java
==============================================================================
--- logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeActionTest.java	(original)
+++ logback/trunk/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeActionTest.java	Tue Mar  4 19:04:20 2008
@@ -22,33 +22,27 @@
 import ch.qos.logback.core.status.StatusChecker;
 import ch.qos.logback.core.util.StatusPrinter;
 
-public class IncludeActionTest  {
+public class IncludeActionTest {
 
   final static String INCLUDE_KEY = "includeKey";
   final static String SUB_FILE_KEY = "subFileKey";
   final static String SECOND_FILE_KEY = "secondFileKey";
-  
-  
+
   Context context = new ContextBase();
   TrivialConfigurator tc;
 
   static final String INCLUSION_DIR_PREFIX = "src/test/input/joran/inclusion/";
 
-  static final String TOP_BY_FILE = INCLUSION_DIR_PREFIX
-      + "topByFile.xml";
-  
-  static final String SUB_FILE = INCLUSION_DIR_PREFIX
-  + "subByFile.xml";
-  
+  static final String TOP_BY_FILE = INCLUSION_DIR_PREFIX + "topByFile.xml";
+
+  static final String SUB_FILE = INCLUSION_DIR_PREFIX + "subByFile.xml";
+
   static final String MULTI_INCLUDE_BY_FILE = INCLUSION_DIR_PREFIX
-  + "multiIncludeByFile.xml";
-  
-  static final String SECOND_FILE = INCLUSION_DIR_PREFIX
-  + "second.xml";
-  
-  
-  static final String TOP_BY_URL = INCLUSION_DIR_PREFIX
-      + "topByUrl.xml";
+      + "multiIncludeByFile.xml";
+
+  static final String SECOND_FILE = INCLUSION_DIR_PREFIX + "second.xml";
+
+  static final String TOP_BY_URL = INCLUSION_DIR_PREFIX + "topByUrl.xml";
 
   static final String INCLUDE_BY_RESOURCE = INCLUSION_DIR_PREFIX
       + "topByResource.xml";
@@ -100,7 +94,7 @@
   }
 
   @Test
-   public void testBasicURL() throws JoranException {
+  public void testBasicURL() throws JoranException {
     System.setProperty(INCLUDE_KEY, URL_TO_INCLUDE);
     tc.doConfigure(TOP_BY_URL);
     StatusPrinter.print(context);
@@ -152,7 +146,7 @@
     verifyConfig(1);
 
   }
-  
+
   @Test
   public void multiInclude() throws JoranException {
     System.setProperty(INCLUDE_KEY, INCLUDED_FILE);
@@ -160,9 +154,7 @@
     tc.doConfigure(MULTI_INCLUDE_BY_FILE);
     verifyConfig(3);
   }
-  
 
-  
   void verifyConfig(int expected) {
     assertEquals(expected, IncAction.beginCount);
     assertEquals(expected, IncAction.endCount);



More information about the logback-dev mailing list