diff --git a/log4j-jpl/pom.xml b/log4j-jpl/pom.xml index 70345ff657e..736a95f387b 100644 --- a/log4j-jpl/pom.xml +++ b/log4j-jpl/pom.xml @@ -58,11 +58,6 @@ junit-jupiter-engine test - - org.junit.vintage - junit-vintage-engine - test - diff --git a/log4j-jpl/src/test/java/org/apache/logging/log4j/jpl/Log4jSystemLoggerTest.java b/log4j-jpl/src/test/java/org/apache/logging/log4j/jpl/Log4jSystemLoggerTest.java index 85cadb84e5f..cac01a7f154 100644 --- a/log4j-jpl/src/test/java/org/apache/logging/log4j/jpl/Log4jSystemLoggerTest.java +++ b/log4j-jpl/src/test/java/org/apache/logging/log4j/jpl/Log4jSystemLoggerTest.java @@ -16,13 +16,13 @@ */ package org.apache.logging.log4j.jpl; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.instanceOf; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertThat; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertSame; import java.lang.System.Logger; import java.util.List; @@ -30,9 +30,9 @@ import org.apache.logging.log4j.core.LogEvent; import org.apache.logging.log4j.core.impl.Log4jLogEvent; import org.apache.logging.log4j.core.test.appender.ListAppender; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class Log4jSystemLoggerTest { @@ -41,7 +41,7 @@ public class Log4jSystemLoggerTest { protected ListAppender eventAppender; protected ListAppender stringAppender; - @Before + @BeforeEach public void setUp() throws Exception { logger = System.getLogger(LOGGER_NAME); assertThat(logger, instanceOf(Log4jSystemLogger.class)); @@ -51,7 +51,7 @@ public void setUp() throws Exception { assertNotNull(stringAppender); } - @After + @AfterEach public void tearDown() throws Exception { if (eventAppender != null) { eventAppender.clear();