Implemented merging of CommandNode children
This commit is contained in:
@@ -9,9 +9,14 @@ import static net.minecraft.commands.builder.LiteralArgumentBuilder.literal;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
public class RootCommandNodeTest {
|
||||
public class RootCommandNodeTest extends AbstractCommandNodeTest {
|
||||
RootCommandNode node;
|
||||
|
||||
@Override
|
||||
protected CommandNode getCommandNode() {
|
||||
return node;
|
||||
}
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
node = new RootCommandNode();
|
||||
@@ -22,6 +27,11 @@ public class RootCommandNodeTest {
|
||||
assertThat(node.parse("foo bar baz", new CommandContextBuilder()), is("foo bar baz"));
|
||||
}
|
||||
|
||||
@Test(expected = UnsupportedOperationException.class)
|
||||
public void testAddChildNoRoot() throws Exception {
|
||||
node.addChild(new RootCommandNode());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEquals() throws Exception {
|
||||
new EqualsTester()
|
||||
|
||||
Reference in New Issue
Block a user