Ejemplo n.º 1
0
        public void RemoveProductFromCategory()
        {
            LinkedList <Product> expected = new LinkedList <Product>();

            expected.AddLast(new Product("P21", "Fraid Egg", 10, "yami"));
            var find = handler.GetAllCategoryProducts("C1");

            foreach (Product product in find)
            {
                Assert.AreEqual(product, expected.First.Value);
            }

            expected.RemoveLast();
            handler.RemoveProductFromCategory("C1", "P21");
            find = handler.GetAllCategoryProducts("C1");
            foreach (Product product in find)
            {
                Assert.AreEqual(product, expected.First.Value);
            }
        }