Commands can be parsed, in a very limited way.

This commit is contained in:
Nathan Adams
2014-09-18 11:48:03 +02:00
parent 2b267a26f6
commit a32243b704
11 changed files with 163 additions and 17 deletions
@@ -0,0 +1,26 @@
package net.minecraft.commands.tree;
import net.minecraft.commands.exceptions.IllegalCommandArgumentException;
import org.junit.Before;
import org.junit.Test;
import static net.minecraft.commands.builder.CommandBuilder.command;
public class LiteralCommandNodeTest {
LiteralCommandNode node;
@Before
public void setUp() throws Exception {
node = command("foo").build();
}
@Test
public void testParse() throws Exception {
node.parse("foo");
}
@Test(expected = IllegalCommandArgumentException.class)
public void testParseInvalid() throws Exception {
node.parse("bar");
}
}