diff --git a/pom.xml b/pom.xml
index 6ff9336e..04a69681 100644
--- a/pom.xml
+++ b/pom.xml
@@ -168,7 +168,7 @@
junit
junit
- 3.8.1
+ 4.13.2
test
diff --git a/src/test/java/org/apache/log4j/xml/XMLDecoderTest.java b/src/test/java/org/apache/log4j/xml/XMLDecoderTest.java
index 54f1ff44..ea7dac50 100644
--- a/src/test/java/org/apache/log4j/xml/XMLDecoderTest.java
+++ b/src/test/java/org/apache/log4j/xml/XMLDecoderTest.java
@@ -25,21 +25,15 @@
import java.util.Vector;
import java.net.URL;
import org.apache.log4j.chainsaw.logevents.ChainsawLoggingEvent;
+import org.junit.Test;
+
+import static junit.framework.TestCase.assertEquals;
/**
* Tests for XMLDecoder.
*
*/
-public class XMLDecoderTest extends TestCase {
-
-
- /**
- * Constructor for XMLDecoderTest.
- * @param arg0 test name.
- */
- public XMLDecoderTest(String arg0) {
- super(arg0);
- }
+public class XMLDecoderTest {
public String getStringFromResource(final String resourceName,
final int maxSize) throws Exception {
@@ -56,6 +50,7 @@ public String getStringFromResource(final String resourceName,
return cb.toString();
}
+ @Test
public void testDecodeEventsString1() throws Exception {
String xmlStr = getStringFromResource("xmlLayout.1.xml", 10000);
XMLDecoder decoder = new XMLDecoder();
@@ -63,6 +58,7 @@ public void testDecodeEventsString1() throws Exception {
assertEquals(17, events.size());
}
+ @Test
public void testDecodeEventsString2() throws Exception {
String xmlStr = getStringFromResource("xsltLayout.1.xml", 10000);
XMLDecoder decoder = new XMLDecoder();
@@ -70,6 +66,7 @@ public void testDecodeEventsString2() throws Exception {
assertEquals(15, events.size());
}
+ @Test
public void testDecodeEventsURL1() throws Exception {
URL resource = XMLDecoderTest.class.getResource("xmlLayout.1.xml");
XMLDecoder decoder = new XMLDecoder();
@@ -77,11 +74,11 @@ public void testDecodeEventsURL1() throws Exception {
assertEquals(17, events.size());
}
+ @Test
public void testDecodeEventsURL2() throws Exception {
URL resource = XMLDecoderTest.class.getResource("xsltLayout.1.xml");
XMLDecoder decoder = new XMLDecoder();
Vector events = decoder.decode(resource);
assertEquals(15, events.size());
}
-
}