Pattern.compile("^(?:expectedResult:)?\"([^\"]+)\" (.*)", Pattern.CASE_INSENSITIVE)
};
for (Pattern pattern : patterns) {
Matcher matcher = pattern.matcher(body);
if (matcher.matches() && matcher.groupCount() == 2) {
SqlPrecondition p = new SqlPrecondition();
p.setExpectedResult(matcher.group(1));
p.setSql(matcher.group(2));
return p;
}
}
throw new ChangeLogParseException("Could not parse a SqlCheck precondition from '" + body + "'.");
}