コード例 #1
0
ファイル: TestAdapter.cs プロジェクト: plamikcho/xbrlpoc
        public void RuleML08LoadFacts()
        {
            IInferenceEngine ie = new IEImpl();
            ie.LoadRuleBase(new RuleML08DatalogAdapter(ruleFilesFolder + "discount.ruleml", FileAccess.Read));

            ie.Process();
            Assert.AreEqual(6, ie.FactsCount, "Initial process");

            ie.LoadFacts(new RuleML086DatalogAdapter(ruleFilesFolder + "facts.ruleml", FileAccess.Read));
            Assert.AreEqual(8, ie.FactsCount, "Loaded facts");

            ie.Process();
            Assert.AreEqual(10, ie.FactsCount, "Subsequent process");
        }
コード例 #2
0
ファイル: TestAdapter.cs プロジェクト: plamikcho/xbrlpoc
 public void RuleML086LoadFactsWithNoRuleBase()
 {
     IInferenceEngine ie = new IEImpl();
     ie.LoadFacts(new RuleML086DatalogAdapter(ruleFilesFolder + "facts.ruleml", FileAccess.Read));
     Assert.Fail("Should never reach me!");
 }