Changed tests to ensure exceptions are of right type & right details

This commit is contained in:
Nathan Adams
2014-10-03 12:45:19 +02:00
parent ef4199e824
commit b3703db535
4 changed files with 72 additions and 17 deletions
@@ -30,7 +30,7 @@ public class LiteralCommandNode extends CommandNode {
String expected = literal + (command.length() > literal.length() ? CommandDispatcher.ARGUMENT_SEPARATOR : "");
if (!command.startsWith(expected)) {
throw ERROR_INCORRECT_LITERAL.create(expected);
throw ERROR_INCORRECT_LITERAL.create(literal);
}
int start = expected.length();