コード例 #1
0
        public void RuleMSXStopShouldReturnTrueWithActiveRuleSet()
        {
            RuleMSX rmsx           = new RuleMSX();
            string  newRuleSetName = "NewRuleSet";
            string  newDataSetName = "NewDataSet";
            string  newRuleName    = "Rule1";
            RuleSet rs             = rmsx.createRuleSet(newRuleSetName);
            Rule    r  = new Rule(newRuleName, new GenericBoolRule(true));
            DataSet ds = rmsx.createDataSet(newDataSetName);

            rs.AddRule(r);
            rs.Execute(ds);
            Assert.That(rmsx.Stop(), Is.EqualTo(true));
        }
コード例 #2
0
        public void RuleMSXStopShouldReturnTrueWithUnexecutedRuleSet()
        {
            RuleMSX rmsx           = new RuleMSX();
            string  newRuleSetName = "NewRuleSet";
            string  newDataSetName = "NewDataSet";
            string  newRuleName    = "Rule1";
            RuleSet rs             = rmsx.createRuleSet(newRuleSetName);
            Rule    r  = new Rule(newRuleName, new GenericBoolRule(true));
            DataSet ds = rmsx.createDataSet(newDataSetName);

            rs.AddRule(r);
            // We are deliberately not executing the ruleset...
            //rs.Execute(ds);
            Assert.That(rmsx.Stop(), Is.EqualTo(true));
        }
コード例 #3
0
        public void RuleMSXStopShouldReturnTrueWithNoRuleSets()
        {
            RuleMSX rmsx = new RuleMSX();

            Assert.That(rmsx.Stop(), Is.EqualTo(true));
        }