Added a 'source' for commands that may be passed around in the context
This commit is contained in:
@@ -15,7 +15,7 @@ import static org.mockito.Mockito.mock;
|
||||
|
||||
public class ArgumentCommandNodeTest extends AbstractCommandNodeTest {
|
||||
ArgumentCommandNode node;
|
||||
CommandContextBuilder contextBuilder;
|
||||
CommandContextBuilder<Object> contextBuilder;
|
||||
|
||||
@Override
|
||||
protected CommandNode getCommandNode() {
|
||||
@@ -25,7 +25,7 @@ public class ArgumentCommandNodeTest extends AbstractCommandNodeTest {
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
node = argument("foo", integer()).build();
|
||||
contextBuilder = new CommandContextBuilder();
|
||||
contextBuilder = new CommandContextBuilder<Object>(new Object());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -14,7 +14,7 @@ import static org.mockito.Mockito.mock;
|
||||
|
||||
public class LiteralCommandNodeTest extends AbstractCommandNodeTest {
|
||||
LiteralCommandNode node;
|
||||
CommandContextBuilder contextBuilder;
|
||||
CommandContextBuilder<Object> contextBuilder;
|
||||
|
||||
@Override
|
||||
protected CommandNode getCommandNode() {
|
||||
@@ -24,7 +24,7 @@ public class LiteralCommandNodeTest extends AbstractCommandNodeTest {
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
node = literal("foo").build();
|
||||
contextBuilder = new CommandContextBuilder();
|
||||
contextBuilder = new CommandContextBuilder<Object>(new Object());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -24,7 +24,7 @@ public class RootCommandNodeTest extends AbstractCommandNodeTest {
|
||||
|
||||
@Test
|
||||
public void testParse() throws Exception {
|
||||
assertThat(node.parse("foo bar baz", new CommandContextBuilder()), is("foo bar baz"));
|
||||
assertThat(node.parse("foo bar baz", new CommandContextBuilder<Object>(new Object())), is("foo bar baz"));
|
||||
}
|
||||
|
||||
@Test(expected = UnsupportedOperationException.class)
|
||||
|
||||
Reference in New Issue
Block a user