[slf4j-dev] svn commit: r831 - in slf4j/trunk: slf4j-jcl/src/test/java/org/slf4j slf4j-jdk14/src/test/java/org/slf4j slf4j-log4j12/src/test/java/org/slf4j slf4j-nop/src/test/java/org/slf4j slf4j-simple/src/test/java/org/slf4j

ceki at slf4j.org ceki at slf4j.org
Tue Jul 3 20:37:34 CEST 2007


Author: ceki
Date: Tue Jul  3 20:37:34 2007
New Revision: 831

Modified:
   slf4j/trunk/slf4j-jcl/src/test/java/org/slf4j/InvocationTest.java
   slf4j/trunk/slf4j-jdk14/src/test/java/org/slf4j/InvocationTest.java
   slf4j/trunk/slf4j-log4j12/src/test/java/org/slf4j/InvocationTest.java
   slf4j/trunk/slf4j-nop/src/test/java/org/slf4j/InvocationTest.java
   slf4j/trunk/slf4j-simple/src/test/java/org/slf4j/InvocationTest.java

Log:
improved testing



Modified: slf4j/trunk/slf4j-jcl/src/test/java/org/slf4j/InvocationTest.java
==============================================================================
--- slf4j/trunk/slf4j-jcl/src/test/java/org/slf4j/InvocationTest.java	(original)
+++ slf4j/trunk/slf4j-jcl/src/test/java/org/slf4j/InvocationTest.java	Tue Jul  3 20:37:34 2007
@@ -121,6 +121,7 @@
   
   public void testMDC() {
     MDC.put("k", "v");
+    assertNull(MDC.get("k"));
     MDC.remove("k");
     assertNull(MDC.get("k"));
     MDC.clear();

Modified: slf4j/trunk/slf4j-jdk14/src/test/java/org/slf4j/InvocationTest.java
==============================================================================
--- slf4j/trunk/slf4j-jdk14/src/test/java/org/slf4j/InvocationTest.java	(original)
+++ slf4j/trunk/slf4j-jdk14/src/test/java/org/slf4j/InvocationTest.java	Tue Jul  3 20:37:34 2007
@@ -121,6 +121,7 @@
   
   public void testMDC() {
     MDC.put("k", "v");
+    assertNull(MDC.get("k"));
     MDC.remove("k");
     assertNull(MDC.get("k"));
     MDC.clear();

Modified: slf4j/trunk/slf4j-log4j12/src/test/java/org/slf4j/InvocationTest.java
==============================================================================
--- slf4j/trunk/slf4j-log4j12/src/test/java/org/slf4j/InvocationTest.java	(original)
+++ slf4j/trunk/slf4j-log4j12/src/test/java/org/slf4j/InvocationTest.java	Tue Jul  3 20:37:34 2007
@@ -118,4 +118,13 @@
     logger.warn(blue, "hello {} and {} ", "world", "universe");
     logger.error(blue, "hello {} and {} ", "world", "universe");
   }
+  
+  public void testMDC() {
+    MDC.put("k", "v");
+    assertNotNull(MDC.get("k"));
+    assertEquals("v", MDC.get("k"));
+    MDC.remove("k");
+    assertNull(MDC.get("k"));
+    MDC.clear();
+  }
 }

Modified: slf4j/trunk/slf4j-nop/src/test/java/org/slf4j/InvocationTest.java
==============================================================================
--- slf4j/trunk/slf4j-nop/src/test/java/org/slf4j/InvocationTest.java	(original)
+++ slf4j/trunk/slf4j-nop/src/test/java/org/slf4j/InvocationTest.java	Tue Jul  3 20:37:34 2007
@@ -121,6 +121,7 @@
   
   public void testMDC() {
     MDC.put("k", "v");
+    assertNull(MDC.get("k"));
     MDC.remove("k");
     assertNull(MDC.get("k"));
     MDC.clear();

Modified: slf4j/trunk/slf4j-simple/src/test/java/org/slf4j/InvocationTest.java
==============================================================================
--- slf4j/trunk/slf4j-simple/src/test/java/org/slf4j/InvocationTest.java	(original)
+++ slf4j/trunk/slf4j-simple/src/test/java/org/slf4j/InvocationTest.java	Tue Jul  3 20:37:34 2007
@@ -120,6 +120,7 @@
   
   public void testMDC() {
     MDC.put("k", "v");
+    assertNull(MDC.get("k"));
     MDC.remove("k");
     assertNull(MDC.get("k"));
     MDC.clear();



More information about the slf4j-dev mailing list