diff options
| author | Ben Culkin <scorpress@gmail.com> | 2020-03-27 16:39:52 -0400 |
|---|---|---|
| committer | Ben Culkin <scorpress@gmail.com> | 2020-03-27 16:39:52 -0400 |
| commit | 373464d30d87bd8702fe27b920ed1406a0833ef3 (patch) | |
| tree | c357c0a4fdd8f3f6ea8eb812ddc853f263c6c550 /base/src/test/java/bjc/utils/cli/objects/CommandTest.java | |
| parent | e99f6c758c9e1ea5601e1076845912db5153e38c (diff) | |
Refactor test structure
Tests are now in a 'test' sub-package, so it is clear that they are
indeed test code, not just disjoint parts of the main code
Diffstat (limited to 'base/src/test/java/bjc/utils/cli/objects/CommandTest.java')
| -rw-r--r-- | base/src/test/java/bjc/utils/cli/objects/CommandTest.java | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/base/src/test/java/bjc/utils/cli/objects/CommandTest.java b/base/src/test/java/bjc/utils/cli/objects/CommandTest.java deleted file mode 100644 index 2bebaa9..0000000 --- a/base/src/test/java/bjc/utils/cli/objects/CommandTest.java +++ /dev/null @@ -1,52 +0,0 @@ -package bjc.utils.cli.objects; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; - -/** - * Test that CLI command objects work correctly. - * - * @author bjculkin - * - */ -public class CommandTest { - - /** - * Test basic things work right. - */ - @Test - public void testBasic() { - Command com = Command.fromString("a b c", 1, "console"); - - assertEquals("a b c", com.full); - assertEquals("a", com.name); - assertEquals("b c", com.remn); - - assertEquals("b", com.trimTo(' ')); - assertEquals("c", com.remn); - - com = Command.fromString("a b c", 1, "console"); - - assertEquals("a b c", com.full); - assertEquals("a", com.name); - assertEquals("b c", com.remn); - - assertEquals("b", com.trimTo(" ")); - assertEquals("c", com.remn); - } - - /** - * Test regex trimming works right. - */ - @Test - public void testRX() { - Command com = Command.fromString("a try1ZZZtry2ZZtry3", 1, "console"); - - assertEquals("try1", com.trimToRX("Z+")); - assertEquals("try2ZZtry3", com.remn); - - assertEquals("try2", com.trimToRX("Z+")); - assertEquals("try3", com.remn); - } -} |
