use of io.github.nucleuspowered.nucleus.argumentparsers.IfConditionElseArgument in project Nucleus by NucleusPowered.
the class IfConditionElseArgumentTests method process.
private boolean process(BiPredicate<CommandSource, CommandContext> cond) throws Exception {
// Get the element
CommandSource source = Mockito.mock(CommandSource.class);
CommandArgs args = new CommandArgs("", Lists.newArrayList());
CommandContext context = new CommandContext();
new IfConditionElseArgument(new TrueArgument(), new FalseArgument(), cond).parse(source, args, context);
return context.<Boolean>getOne("key").orElseThrow(NullPointerException::new);
}
Aggregations