diff --git a/gclc.system/src/test/java/net/bigeon/gclc/system/ExecSystemCommandTest.java b/gclc.system/src/test/java/net/bigeon/gclc/system/ExecSystemCommandTest.java index 42efcc2..43b5cf1 100644 --- a/gclc.system/src/test/java/net/bigeon/gclc/system/ExecSystemCommandTest.java +++ b/gclc.system/src/test/java/net/bigeon/gclc/system/ExecSystemCommandTest.java @@ -33,11 +33,11 @@ package net.bigeon.gclc.system; * knowledge of the CeCILL license and that you accept its terms. * #L% */ -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.fail; -import org.junit.Test; +import org.junit.jupiter.api.Test; import net.bigeon.gclc.exception.CommandRunException; import net.bigeon.gclc.manager.ConsoleInput; @@ -51,10 +51,10 @@ public class ExecSystemCommandTest { @Test public void testExecSystemCommand() { final ExecSystemCommand cmd = new ExecSystemCommand("test"); - assertEquals("Name should be preserved", "test", cmd.getCommandName()); - assertNotNull("tip should be defined", cmd.tip()); - assertNotNull("usage should be defined", cmd.usagePattern()); - assertNotNull("usage should be defined", cmd.usageDetail()); + assertEquals("test", cmd.getCommandName(), "Name should be preserved"); + assertNotNull(cmd.tip(), "tip should be defined"); + assertNotNull(cmd.usagePattern(), "usage should be defined"); + assertNotNull(cmd.usageDetail(), "usage should be detailed"); } /** Test the execution of the command. diff --git a/gclc.system/src/test/java/net/bigeon/gclc/system/ForwardingRunnableTest.java b/gclc.system/src/test/java/net/bigeon/gclc/system/ForwardingRunnableTest.java index 0ed846a..4b73abf 100644 --- a/gclc.system/src/test/java/net/bigeon/gclc/system/ForwardingRunnableTest.java +++ b/gclc.system/src/test/java/net/bigeon/gclc/system/ForwardingRunnableTest.java @@ -3,13 +3,13 @@ */ package net.bigeon.gclc.system; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.mockito.Mockito; import net.bigeon.gclc.exception.CommandRunException; @@ -27,8 +27,8 @@ public class ForwardingRunnableTest { // Runnable should close immediatly. runnable.run(); - assertTrue("Error should be a CommandRunException", - runnable.getError() instanceof CommandRunException); + assertInstanceOf(CommandRunException.class, runnable.getError(), + "Error should be a CommandRunException"); } @Test @@ -39,6 +39,6 @@ public class ForwardingRunnableTest { is); // Runnable should close immediatly. runnable.run(); - assertTrue("Error should be an IO", runnable.getError() instanceof IOException); + assertInstanceOf(IOException.class, runnable.getError(), "Error should be an IO"); } }