use of commands.model.Command in project KaellyBot by Kaysoro.
the class CommandPatternTest method testGuildCommand.
public void testGuildCommand() {
Command cmd = new GuildCommand();
Pattern pattern = Pattern.compile("^" + Constants.prefixCommand + cmd.getName() + cmd.getPattern() + "$");
assertTrue(pattern.matcher(Constants.prefixCommand + "guild La Feuille Verte").find());
assertTrue(pattern.matcher(Constants.prefixCommand + "guild La-Feuil' [Verte]").find());
assertTrue(pattern.matcher(Constants.prefixCommand + "guild La Feuille Verte -serv Furye").find());
assertTrue(pattern.matcher(Constants.prefixCommand + "guild La-Feuil' [Verte] -serv Furye").find());
assertFalse(pattern.matcher(Constants.prefixCommand + "guild").find());
}
use of commands.model.Command in project KaellyBot by Kaysoro.
the class CommandPatternTest method testAboutCommand.
public void testAboutCommand() {
Command cmd = new AboutCommand();
Pattern pattern = Pattern.compile("^" + Constants.prefixCommand + cmd.getName() + cmd.getPattern() + "$");
assertTrue(pattern.matcher(Constants.prefixCommand + "about").find());
}
use of commands.model.Command in project KaellyBot by Kaysoro.
the class CommandPatternTest method testResourceCommand.
public void testResourceCommand() {
Command cmd = new ResourceCommand();
Pattern pattern = Pattern.compile("^" + Constants.prefixCommand + cmd.getName() + cmd.getPattern() + "$");
assertTrue(pattern.matcher(Constants.prefixCommand + "resource test").find());
assertTrue(pattern.matcher(Constants.prefixCommand + "resource tést test").find());
assertTrue(pattern.matcher(Constants.prefixCommand + "resource -more tést test").find());
assertFalse(pattern.matcher(Constants.prefixCommand + "resource").find());
}
use of commands.model.Command in project KaellyBot by Kaysoro.
the class CommandPatternTest method testMonsterCommand.
public void testMonsterCommand() {
Command cmd = new MonsterCommand();
Pattern pattern = Pattern.compile("^" + Constants.prefixCommand + cmd.getName() + cmd.getPattern() + "$");
assertTrue(pattern.matcher(Constants.prefixCommand + "monster test").find());
assertTrue(pattern.matcher(Constants.prefixCommand + "monster tést test").find());
assertTrue(pattern.matcher(Constants.prefixCommand + "monster -more tést test").find());
assertFalse(pattern.matcher(Constants.prefixCommand + "monster").find());
}
use of commands.model.Command in project KaellyBot by Kaysoro.
the class CommandPatternTest method testLangCommand.
public void testLangCommand() {
Command cmd = new LanguageCommand();
Pattern pattern = Pattern.compile("^" + Constants.prefixCommand + cmd.getName() + cmd.getPattern() + "$");
assertTrue(pattern.matcher(Constants.prefixCommand + "lang FR").find());
assertTrue(pattern.matcher(Constants.prefixCommand + "lang -channel FR").find());
assertTrue(pattern.matcher(Constants.prefixCommand + "lang").find());
}
Aggregations