Migrate to JUnit5
This commit is contained in:
@ -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>
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.iluwatar.command;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user