Exemplo n.º 1
0
        public void UpdateProductCategory()
        {
            NorthwindDataStore  northwindDataStore = new NorthwindDataStore();
            List <CategoryInfo> categoryInfos      = northwindDataStore.GetCategoriesInfo();
            List <Product>      productsToChange   = categoryInfos.FirstOrDefault().Products.Skip(2).ToList();
            Category            newCategory        = categoryInfos.Last().Category;
            CategoryInfo        categoryInfo       = northwindDataStore.GetCategoryInfo(newCategory);

            northwindDataStore.UpdateProductsCategory(productsToChange, newCategory);
            Assert.AreNotEqual(categoryInfo.Products.Count, northwindDataStore.GetCategoryInfo(newCategory).Products.Count);
        }