Esempio n. 1
0
        public void TotalPriceIsEqualTo7_25_IfItemsScannedInOrderABCD()
        {
            //Arrange
            var pointOfSaleTerminal = new PointOfSaleTerminal(_productService, _priceCalculator);

            pointOfSaleTerminal.Reset();

            pointOfSaleTerminal.Scan("A");
            pointOfSaleTerminal.Scan("B");
            pointOfSaleTerminal.Scan("C");
            pointOfSaleTerminal.Scan("D");

            //Act
            var price = pointOfSaleTerminal.CalculateTotal();

            //Assert
            Assert.AreEqual(7.25m, price);
        }
 public void EmptyIsCalculatedToZero()
 {
     _terminal.SetPricing(Enumerable.Empty <Price>());
     Assert.AreEqual(_terminal.CalculateTotal(), 0);
 }