Migrate to JUnit5

This commit is contained in:
Artur Mogozov
2017-12-31 16:29:48 +09:00
parent a20e54d0a7
commit 6694d742a3
408 changed files with 2656 additions and 2165 deletions

View File

@ -33,8 +33,13 @@
<artifactId>event-aggregator</artifactId>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>

View File

@ -22,7 +22,7 @@
*/
package com.iluwatar.event.aggregator;
import org.junit.Test;
import org.junit.jupiter.api.Test;
/**
*

View File

@ -22,6 +22,8 @@
*/
package com.iluwatar.event.aggregator;
import org.junit.jupiter.api.Test;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
@ -32,7 +34,6 @@ import static org.mockito.Mockito.verifyZeroInteractions;
import java.util.Objects;
import java.util.function.Function;
import java.util.function.Supplier;
import org.junit.Test;
/**
* Date: 12/12/15 - 10:58 PM

View File

@ -22,10 +22,10 @@
*/
package com.iluwatar.event.aggregator;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
/**
* Date: 12/12/15 - 2:52 PM

View File

@ -25,15 +25,15 @@ package com.iluwatar.event.aggregator;
import ch.qos.logback.classic.Logger;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.AppenderBase;
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;
import org.slf4j.LoggerFactory;
import java.util.LinkedList;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* Date: 12/12/15 - 3:04 PM
@ -44,12 +44,12 @@ public class KingJoffreyTest {
private InMemoryAppender appender;
@Before
@BeforeEach
public void setUp() {
appender = new InMemoryAppender(KingJoffrey.class);
}
@After
@AfterEach
public void tearDown() {
appender.stop();
}

View File

@ -22,7 +22,7 @@
*/
package com.iluwatar.event.aggregator;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;

View File

@ -22,10 +22,10 @@
*/
package com.iluwatar.event.aggregator;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
/**
* Date: 12/12/15 - 2:12 PM