Changed the Runnable to a Command

This commit is contained in:
Nathan Adams
2014-09-24 14:05:12 +02:00
parent 81ed5f0521
commit 8da6087618
11 changed files with 47 additions and 28 deletions
@@ -1,5 +1,6 @@
package net.minecraft.commands.builder;
import net.minecraft.commands.Command;
import net.minecraft.commands.arguments.CommandArgumentType;
import net.minecraft.commands.tree.ArgumentCommandNode;
import org.junit.Before;
@@ -15,7 +16,8 @@ import static org.junit.Assert.assertThat;
public class RequiredArgumentBuilderTest {
@Mock CommandArgumentType<Integer> type;
RequiredArgumentBuilder<Integer> builder;
@Mock Runnable executor;
@Mock
Command command;
@Before
public void setUp() throws Exception {
@@ -32,11 +34,11 @@ public class RequiredArgumentBuilderTest {
@Test
public void testBuildWithExecutor() throws Exception {
ArgumentCommandNode<Integer> node = builder.executes(executor).build();
ArgumentCommandNode<Integer> node = builder.executes(command).build();
assertThat(node.getName(), is("foo"));
assertThat(node.getType(), is(type));
assertThat(node.getExecutor(), is(executor));
assertThat(node.getCommand(), is(command));
}
@Test