assertEquals("allow", ruleset.getMatchingRule("(org,archive,)/classified/index.html", captureDate, postReleaseDate, null).getPolicy());
}
public void testGroup() {
ruleset = new RuleSet();
ruleset.add(new Rule("robots", "("));
ruleset.add(new Rule("allow", "(org,archive,", "archivists"));
ruleset.add(new Rule("block", "(org,archive,)/classified/"));
ruleset.add(new Rule("allow", "(org,archive,)/classified/", "admins"));
assertEquals("robots", ruleset.getMatchingRule("(org,archive,www,)/index.html", new Date(), new Date(), "dinosaurs").getPolicy());
assertEquals("allow", ruleset.getMatchingRule("(org,archive,www,)/index.html", new Date(), new Date(), "archivists").getPolicy());
assertEquals("allow", ruleset.getMatchingRule("(org,archive,)/classified/presto", new Date(), new Date(), "admins").getPolicy());
assertEquals("block", ruleset.getMatchingRule("(org,archive,)/classified/presto", new Date(), new Date(), "public").getPolicy());