Ejemplo n.º 1
0
        public void GetDataSetsReturnsEmptyDataSetList()
        {
            // GetDataSets() should return an empty DataSet list on newly created RuleMSX object
            RuleMSX        rmsx     = new RuleMSX();
            List <DataSet> dataSets = rmsx.GetDataSets();

            Assert.That(dataSets.Count, Is.EqualTo(0));
        }
Ejemplo n.º 2
0
        public void InstantiateRuleMSXEmptyConstGivesEmptyRuleandDataSets()
        {
            // New instance of RuleMSX should have empty RuleSet and DataSet collections
            RuleMSX rmsx = new RuleMSX();

            Assert.That(rmsx.GetRuleSets().Count, Is.EqualTo(0));
            Assert.That(rmsx.GetDataSets().Count, Is.EqualTo(0));
        }
Ejemplo n.º 3
0
        public void GetDataSetsReturnsDataSetCollection()
        {
            RuleMSX rmsx           = new RuleMSX();
            string  newDataSetName = "NewDataSet";

            rmsx.CreateDataSet(newDataSetName);
            List <DataSet> dsl = rmsx.GetDataSets();
            DataSet        ds  = dsl[0];

            Assert.That(ds.GetName(), Is.EqualTo(newDataSetName));
        }
Ejemplo n.º 4
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);
                }
            }
        }