@Test public void singleRuleTest(){ ActivityPartRuleRequest request = new ActivityPartRuleRequest(); List<Rule> ruleList = Lists.newArrayList(); StartTimeRule startTimeRule = new StartTimeRule(System.currentTimeMillis()+100000000); ruleList.add(startTimeRule); Result<String> result = activityRuleEngine.validate(request, ruleList); Assert.assertTrue(result.isSuccess()); System.out.println(result.getModel()); }
public Result<String> validate(final ActivityPartRuleRequest request, List<Rule> rules) { return (new CheckerProcess<Rule>() { public Result _process(Rule rule) { return ActivityRuleEngine.this.getChecker(rule).validate(rule, request); } }).processSingleRule(rules); }
ActivityRuleEngine extends CheckerEngine<Rule, RuleChecker> { public Result<String> validate(final ActivityPartRuleRequest request, List<Rule> rules) { return (new CheckerProcess<Rule>() { public Result _process(Rule rule) { return ActivityRuleEngine.this.getChecker(rule).validate(rule, request); } }).processSingleRule(rules); } }
ActivityRuleEngine extends CheckerEngine<Rule, RuleChecker> { public Result<String> validate(final ActivityPartRuleRequest request, List<Rule> rules) { return (new CheckerProcess<Rule>() { public Result _process(Rule rule) { return ActivityRuleEngine.this.getChecker(rule).validate(rule, request); } }).processSingleRule(rules); }  }
ActivityRuleEngine extends CheckerEngine<Rule, RuleChecker> { public Result<String> validate(final ActivityPartRuleRequest request, List<Rule> rules) { return (new CheckerProcess<Rule>() { public Result _process(Rule rule) { return ActivityRuleEngine.this.getChecker(rule).validate(rule, request); } }).processSingleRule(rules); }  Result<String> validate(final ActivityPartRuleRequest request, List<Rule> rules); }
ActivityRuleEngine extends CheckerEngine<Rule, RuleChecker> { public Result<String> validate(final ActivityPartRuleRequest request, List<Rule> rules) { return (new CheckerProcess<Rule>() { public Result _process(Rule rule) { return ActivityRuleEngine.this.getChecker(rule).validate(rule, request); } }).processSingleRule(rules); }  Result<String> validate(final ActivityPartRuleRequest request, List<Rule> rules);  }