Exemplo n.º 1
0
        public void UpdateProduct()
        {
            Product product;

            using (var db = new ShoppingContext())
            {
                var service = new Repository.Repository(db);
                product = service.GetProduct(1);
            }
            using (var db = new ShoppingContext())
            {
                product.Name = "Ravioles";
                var service = new Repository.Repository(db);
                int i       = service.UpdateProduct(product);

                Assert.IsTrue(i > 0);
            }
        }