Beispiel #1
0
        public void GetRuleSetWithIncorrectNameReturnsNull()
        {
            RuleMSX rmsx           = new RuleMSX();
            string  newRuleSetName = "NewRuleSet";

            rmsx.CreateRuleSet(newRuleSetName);
            RuleSet rs = rmsx.GetRuleSet("SomeOtherName");

            Assert.IsNull(rs);
        }
Beispiel #2
0
        public void GetRuleSetByNameReturnsCorrectRuleSet()
        {
            RuleMSX rmsx           = new RuleMSX();
            string  newRuleSetName = "NewRuleSet";

            rmsx.CreateRuleSet(newRuleSetName);
            RuleSet rs = rmsx.GetRuleSet(newRuleSetName);

            Assert.That(rs.GetName(), Is.EqualTo(newRuleSetName));
        }
Beispiel #3
0
        public void PurgeConflictDataSets(DataSet conflictDs)
        {
            RuleSet rs = rmsx.GetRuleSet("AutoRouteFromIOI");

            foreach (DataSet ds in rmsx.GetDataSets())
            {
                if (ds.GetDataPoint("orderNumber").GetValue().ToString() == conflictDs.GetDataPoint("orderNumber").GetValue().ToString())
                {
                    log("Purging DataSet: " + ds.GetName() + " - matches order");
                    rs.PurgeDataSet(ds);
                }

                if (ds.GetDataPoint("ioiid").GetValue().ToString() == conflictDs.GetDataPoint("ioiid").GetValue().ToString())
                {
                    log("Purging DataSet: " + ds.GetName() + " - matches ioi");
                    rs.PurgeDataSet(ds);
                }
            }
        }