[slf4j-dev] svn commit: r947 - slf4j/trunk/slf4j-jdk14/src/test/java/org/slf4j

ceki at slf4j.org ceki at slf4j.org
Thu Jan 17 21:33:57 CET 2008


Author: ceki
Date: Thu Jan 17 21:33:57 2008
New Revision: 947

Modified:
   slf4j/trunk/slf4j-jdk14/src/test/java/org/slf4j/InvocationTest.java

Log:
- MDC is now supported in slf4j-jdk14

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	Thu Jan 17 21:33:57 2008
@@ -121,9 +121,21 @@
   
   public void testMDC() {
     MDC.put("k", "v");
-    assertNull(MDC.get("k"));
+    assertNotNull(MDC.get("k"));
+    assertEquals("v", MDC.get("k"));
+
     MDC.remove("k");
     assertNull(MDC.get("k"));
+
+    MDC.put("k1", "v1");
+    assertEquals("v1", MDC.get("k1"));
     MDC.clear();
+    assertNull(MDC.get("k1"));
+
+    try {
+      MDC.put(null, "x");
+      fail("null keys are invalid");
+    } catch (IllegalArgumentException e) {
+    }
   }
 }



More information about the slf4j-dev mailing list