@Test public void addingRulesToSpringRuleBookShouldAddTheRuleToTheDelegate() throws InvalidClassException { RuleBook<String> mockRuleBook = (RuleBook<String>)mock(CoRRuleBook.class); SpringRuleBook<String> ruleBook = new SpringRuleBook<>(mockRuleBook); Rule rule = RuleBuilder.create().build(); ruleBook.addRule(rule); Mockito.verify(mockRuleBook, times(1)).addRule(rule); }
@Override public void addRule(Rule rule) { _ruleBook.addRule(rule); }
SpringRuleBook implements RuleBook<T> { @Override public void addRule(Rule rule) { _ruleBook.addRule(rule); } }
SpringRuleBook implements RuleBook<T> { @Override public void addRule(Rule rule) { _ruleBook.addRule(rule); } SpringRuleBook(RuleBook<T> ruleBook); }
SpringRuleBook implements RuleBook<T> { @Override public void addRule(Rule rule) { _ruleBook.addRule(rule); } SpringRuleBook(RuleBook<T> ruleBook); @Override void addRule(Rule rule); void addRule(Object rule); @Override void run(NameValueReferableMap facts); @Override void setDefaultResult(T result); @Override Optional<Result<T>> getResult(); @Override boolean hasRules(); }
SpringRuleBook implements RuleBook<T> { @Override public void addRule(Rule rule) { _ruleBook.addRule(rule); } SpringRuleBook(RuleBook<T> ruleBook); @Override void addRule(Rule rule); void addRule(Object rule); @Override void run(NameValueReferableMap facts); @Override void setDefaultResult(T result); @Override Optional<Result<T>> getResult(); @Override boolean hasRules();  }