use of org.candlepin.policy.js.RuleParseException in project candlepin by candlepin.
the class RulesVersionMatchingTest method ensureWorking.
@Test
public void ensureWorking() {
Rules rules = null;
try {
rules = new Rules(version);
if (!expectedToBeValid) {
throw new RuntimeException("Expected rule parsing to have failed.");
}
assertEquals(expectedVersion, rules.getVersion());
} catch (RuleParseException e) {
if (expectedToBeValid) {
throw e;
}
}
}
Aggregations