BRLRuleModel extends RuleModel { @Override public List<String> getAllLHSVariables() { return getLHSVariables(true, true); } BRLRuleModel();  BRLRuleModel(final GuidedDecisionTable52 dtable); @Override List<String> getLHSBoundFacts(); @Override FactPattern getLHSBoundFact(final String var); @Override SingleFieldConstraint getLHSBoundField(final String var); @Override String getLHSBindingType(final String var); @Override FactPattern getLHSParentFactPatternForBinding(final String var); @Override List<String> getAllVariables(); @Override List<String> getAllLHSVariables(); @Override List<String> getLHSPatternVariables(); @Override List<String> getLHSVariables(final boolean includePatterns,
                                        final boolean includeFields); @Override List<String> getAllRHSVariables(); @Override boolean isBoundFactUsed(final String binding); @Override List<String> getBoundVariablesInScope(final BaseSingleFieldConstraint con); @Override boolean isVariableNameUsed(String s); @Override List<String> getRHSBoundFacts(); @Override ActionInsertFact getRHSBoundFact(final String var);  }
@Test public void getAllLHSVariables() { final Pattern52 p = whenThereIsAPattern("Applicant", "$a1"); whenPatternHasAField(p, "field1", DataType.TYPE_STRING, "$f1"); final BRLConditionColumn brl1 = whenThereIsABRLFactPattern("Applicant", "$a2"); whenBRLFactPatternHasAField(brl1, "field1", DataType.TYPE_STRING, "$f2"); final BRLConditionColumn brl2 = whenThereIsABRLFromCompositeFactPattern("Applicant", "$a3"); whenBRLFromCompositeFactPatternHasAField(brl2, "field1", DataType.TYPE_STRING, "$f3"); assertLHSBindings("$a1", "$a2", "$a3", "$f1", "$f2", "$f3"); }
@Test public void checkGetAllLHSVariables() { whenThereIsADecisionTableWithPatternsAndBRLCondition(); assertThereAreBindings(() -> rm.getAllLHSVariables(), "$p1", "$p2", "$p3", "$p4", "$f1", "$f2"); }