Пример #1
0
 public void TestRegistryProduct()
 {
     //Arange
     work.RegistryProduct("Log", "0000", "dsf", 100, 10);
     //Act
     BLL.Managment.ProductsManagment products = new BLL.Managment.ProductsManagment();
     products.SaveChanges();
     products.Load();
     // Assert
     Assert.AreEqual("Log", products.GetList().ElementAt(products.GetList().Count - 1).Name);
 }
Пример #2
0
        public void TestRemoveProduct()
        {
            //Arange
            BLL.Managment.ProductsManagment products = new BLL.Managment.ProductsManagment();
            Product product = new Product("", "Oksi", "Buba", "dfdsf", 100, 50);

            products.Insert(product);
            products.SaveChanges();
            products.Load();
            //Act
            products.Delete(product);
            // Assert
            if (products.GetList().Count != 0)
            {
                Assert.AreNotEqual(product, products.GetList().ElementAt(products.GetList().Count - 1));
            }
        }