use of com.karuslabs.commons.command.completion.Completion in project Karus-Commons by Pante.
the class CommandTest method complete_completions.
@Test
void complete_completions() {
Arguments arguments = new Arguments("argument");
Completion completion = when(mock(Completion.class).complete(sender, "argument")).thenReturn(singletonList("a")).getMock();
command.getCompletions().put(0, completion);
assertEquals(singletonList("a"), command.complete(sender, arguments));
verify(completion).complete(sender, "argument");
}
Aggregations