Skip to content

Commit

Permalink
#9: Update to JUnit 5
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-wehnert committed Mar 17, 2022
1 parent 3b89a3d commit 7735038
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ dependencies {
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.17.2'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.17.2'

testImplementation 'junit:junit:4.12'
testImplementation 'org.junit.jupiter:junit-jupiter:5.7.1'
}

test {
useJUnitPlatform()
systemProperty 'log4j.configurationFile', 'src/test/resources/log4j2.xml'
}

22 changes: 9 additions & 13 deletions src/test/java/doip/logging/TestLogging.java
Original file line number Diff line number Diff line change
@@ -1,32 +1,28 @@
package doip.logging;
import static org.junit.Assert.*;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import doip.logging.LogManager;
import doip.logging.Logger;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

public class TestLogging {

private static Logger logger = LogManager.getLogger(TestLogging.class);

@BeforeClass
@BeforeAll
public static void setUpBeforeClass() throws Exception {
}

@AfterClass
@AfterAll
public static void tearDownAfterClass() throws Exception {
}

@Before
@BeforeEach
public void setUp() throws Exception {
}

@After
@AfterEach
public void tearDown() throws Exception {
}

Expand Down

0 comments on commit 7735038

Please sign in to comment.