Esempio n. 1
0
        public void TotalItemCost_Success(double itemOnePrice, double itemTwoPrice, int itemOneQty, int itemTwoQty, double expectedResult)
        {
            //Arrange
            _sut = new BusinessCore.Areas.ShoppingBasket.Models.ShoppingBasket
            {
                Items = new List <IItem>
                {
                    new Item {
                        PricePerItem = itemOnePrice, Qty = itemOneQty
                    },
                    new Item {
                        PricePerItem = itemTwoPrice, Qty = itemTwoQty
                    }
                }
            };

            //Act
            var result = _sut.TotalItemsCost();

            //Assert
            result.Should().Be(expectedResult);
        }