Beispiel #1
0
        public void Check_SetProductQuantity()
        {
            //Arrange
            Product     product     = new Product();
            Winkelwagen winkelwagen = new Winkelwagen(product.id);

            var winkelwagenDALStub   = new WinkelwagenDALStub();
            var winkelwagenContainer = new WinkelwagenContainer(winkelwagenDALStub);

            //Act

            Winkelwagen product1 = new Winkelwagen(product.id);

            product1.Prod.id     = 1;
            product1.hoeveelheid = 1;

            Winkelwagen product2 = new Winkelwagen(product.id);

            product2.Prod.id     = 1;
            product2.hoeveelheid = 1;

            winkelwagenContainer.SetProductQuantity(product, winkelwagen);

            var result   = product1.hoeveelheid;
            var expected = product2.hoeveelheid;

            //Assert
            Assert.Equal(expected, result);
        }
 public void SetQuantity(Product productID, Winkelwagen Quantity)
 {
     winkelwagenContainer.SetProductQuantity(productID, Quantity);
 }