Exemple #1
0
 public Orders(DGobject dg)
     : base(dg.Device)
 {
     DG = new DGobject();
     DG = dg;
     MX = new MenuXml();
     OL = new OrderXml(DG);
     //Инициализируем меню
     MX.MenuXmlToList(ComReader.GetMenu());
     Theme = "custom";
 }
 public void TestMethodMenuToList()
 {
     var xml = new MenuXml();
     var menu = xml.MenuXmlToList(DG.Menu);
     var count = menu.Children.Count();
     Assert.AreEqual(count, 738);
     var list = xml.CurrentNode;
     var id = menu.Children.Single(z => z.Id == "c0ef7dd4-0532-11e1-be54-001517f481cc");
     Assert.IsNotNull(id);
     var node = menu.Children.Count(z => z.IdFather == "96a3dce7-11b6-11e0-8ea0-20cf308e5b25");
     Assert.AreEqual(node, 5);
     var modific1 = menu.Children.Count(z => z.Modifikators.Count == 1);
     var modific2 = menu.Children.Count(z => z.Modifikators.Count == 2);
     var modific3 = menu.Children.Count(z => z.Modifikators.Count == 3);
     Assert.AreEqual(modific1 + modific2 + modific3, 601);
 }