[logback-dev] svn commit: r1288 - logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/selector

noreply.seb at qos.ch noreply.seb at qos.ch
Mon Jan 29 14:50:46 CET 2007


Author: seb
Date: Mon Jan 29 14:50:45 2007
New Revision: 1288

Modified:
   logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/selector/ContextJNDISelectorTest.java

Log:
added a test case

Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/selector/ContextJNDISelectorTest.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/selector/ContextJNDISelectorTest.java	(original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/selector/ContextJNDISelectorTest.java	Mon Jan 29 14:50:45 2007
@@ -60,4 +60,14 @@
     assertEquals(2, selector.getCount());
   }
   
+  public void testReturnDefaultContext() {
+    MockInitialContext mic = MockInitialContextFactory.getContext();
+    mic.map.put(ClassicGlobal.JNDI_CONTEXT_NAME, null);
+
+    ContextJNDISelector selector = (ContextJNDISelector)LoggerFactory.getContextSelector();
+    Context context = selector.getLoggerContext();
+    
+    assertEquals("default", context.getName());    
+  }
+  
 }



More information about the logback-dev mailing list