public void GetRuleSetWithIncorrectNameReturnsNull() { RuleMSX rmsx = new RuleMSX(); string newRuleSetName = "NewRuleSet"; rmsx.CreateRuleSet(newRuleSetName); RuleSet rs = rmsx.GetRuleSet("SomeOtherName"); Assert.IsNull(rs); }
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)); }
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); } } }