use of org.candlepin.policy.js.entitlement.EntitlementRules.Rule in project candlepin by candlepin.
the class EnforcerTest method shouldParseValidMapping.
@Test
public void shouldParseValidMapping() {
Rule func1rule = new EntitlementRules.Rule("func1", 1, new HashSet<String>() {
{
add("attr1");
add("attr2");
add("attr3");
}
});
assertEquals(func1rule, ((EntitlementRules) enforcer).parseRule("func1:1:attr1:attr2:attr3"));
assertEquals(new EntitlementRules.Rule("func3", 3, new HashSet<String>() {
{
add("attr4");
}
}), ((EntitlementRules) enforcer).parseRule("func3:3:attr4"));
}
Aggregations