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

@ -34,13 +34,13 @@
<artifactId>command</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.mockito</groupId>
<artifactId>mockito-core</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

View File

@ -22,7 +22,7 @@
*/
package com.iluwatar.command;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import java.io.IOException;

View File

@ -22,9 +22,9 @@
*/
package com.iluwatar.command;
import static org.junit.Assert.assertEquals;
import org.junit.jupiter.api.Test;
import org.junit.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* The Command pattern is a behavioral design pattern in which an object is used to encapsulate all
@ -85,9 +85,9 @@ public class CommandTest {
*/
private void verifyGoblin(Goblin goblin, String expectedName, Size expectedSize,
Visibility expectedVisibility) {
assertEquals("Goblin's name must be same as expectedName", expectedName, goblin.toString());
assertEquals("Goblin's size must be same as expectedSize", expectedSize, goblin.getSize());
assertEquals("Goblin's visibility must be same as expectedVisibility", expectedVisibility,
goblin.getVisibility());
assertEquals(expectedName, goblin.toString(), "Goblin's name must be same as expectedName");
assertEquals(expectedSize, goblin.getSize(), "Goblin's size must be same as expectedSize");
assertEquals(expectedVisibility, goblin.getVisibility(),
"Goblin's visibility must be same as expectedVisibility");
}
}