Use directive configuring in resolve reference tests

This commit is contained in:
Nikolay Krasko
2013-07-10 21:29:24 +04:00
parent 68bd7405ff
commit 970586bfdd
7 changed files with 35 additions and 16 deletions
@@ -74,8 +74,12 @@ public final class InTextDirectivesUtils {
if (strings.isEmpty()) {
return null;
}
assert strings.size() == 1 : "There is more than one string with given prefixes " +
Arrays.toString(prefixes) + ". Use findListWithPrefixes() instead.";
if (strings.size() != 1) {
throw new IllegalStateException("There is more than one string with given prefixes " +
Arrays.toString(prefixes) + ". Use findListWithPrefixes() instead.");
}
return strings.get(0);
}