170 package com.realtime.crossfire.jxclient.commands;
174 import java.util.Arrays;
175 import java.util.Collection;
176 import org.jetbrains.annotations.NotNull;
177 import org.junit.Assert;
178 import org.junit.Test;
227 check(
";;;", commands);
245 check(
"cmd;cmd;cm;cmd;cmd2", commands,
new CommandExec(cmd,
""),
new CommandExec(cmd,
""),
new CommandExec(
null,
"cm"),
new CommandExec(cmd,
""),
new CommandExec(
null,
"cmd2"));
298 check(
"bind cmd;cmd bind", commands,
new CommandExec(bind,
"cmd;cmd bind"));
300 check(
"bind cmd;cmd bind;bind cmd", commands,
new CommandExec(bind,
"cmd;cmd bind;bind cmd"));
302 check(
"bind cmd ; cmd bind ; bind cmd", commands,
new CommandExec(bind,
"cmd ; cmd bind ; bind cmd"));
312 private static void check(@NotNull
final CharSequence command, @NotNull
final Commands commands, @NotNull
final CommandExec... commandList) {
314 Assert.assertEquals(Arrays.asList(commandList), expandedCommands);