Exemplo n.º 1
0
        public void UpdateCategory()
        {
            Category category;

            using (var db = new ShoppingContext())
            {
                var service = new Repository.Repository(db);
                category = service.GetCategory(1, "Pastas");
            }
            using (var db = new ShoppingContext())
            {
                category.Name = "Carnes";
                var service = new Repository.Repository(db);
                int i       = service.UpdateCategority(category);

                Assert.IsTrue(i > 0);
            }
        }