Example #1
0
        public void Check_RemoveProduct_From_List()
        {
            //Arrange

            Product     product     = new Product();
            Winkelwagen winkelwagen = new Winkelwagen(product.id);

            var winkelwagenDALStub      = new WinkelwagenDALStub();
            var winkelwagenContainer    = new WinkelwagenContainer(winkelwagenDALStub);
            List <Winkelwagen> products = new List <Winkelwagen>();

            // Act
            var winkelwagenList = winkelwagenContainer.GetList();

            Winkelwagen product1 = new Winkelwagen(product.id);
            Winkelwagen product2 = new Winkelwagen(product.id);

            winkelwagenList.Add(product1);
            winkelwagenList.Add(product2);

            winkelwagenContainer.RemoveProduct(product2);

            var result   = winkelwagenList.Count();
            var expected = 1;

            //Assert
            Assert.Equal(expected, result);
        }
        public void ProductRemove(int productID)
        {
            Product     product     = new Product();
            Winkelwagen winkelwagen = new Winkelwagen(product.id);

            winkelwagen.Prod.id = productID;
            winkelwagenContainer.RemoveProduct(winkelwagen);
        }