assertEquals( expected, new HashSet<>( rules.getRules() ) );
}
public void testMultipleRuleStrings()
{
Assembler a = new RuleSetAssembler();
String ruleStringA = "[(?a P ?b) -> (?a Q ?b)]";
String ruleStringB = "[(?a R ?b) -> (?a S ?b)]";
Resource root = resourceInModel
( "x rdf:type ja:RuleSet"
+ "; x ja:rule '" + ruleStringA.replaceAll( " ", "\\\\s" ) + "'"
+ "; x ja:rule '" + ruleStringB.replaceAll( " ", "\\\\s" ) + "'"
);
RuleSet rules = (RuleSet) a.open( root );
Set<Rule> expected = new HashSet<>( Rule.parseRules( ruleStringA ) );
expected.addAll( Rule.parseRules( ruleStringB ) );
assertEquals( expected, new HashSet<>( rules.getRules() ) );
}