Exemplo n.º 1
0
        public void Total_AMacbook_TotalPriceForAMacbook()
        {
            //Arrange
            var item1 = new MacBookPro();

            //Act
            _checkOut.Scan(item1);

            //Assert
            Assert.AreEqual(macbookProPrice, _checkOut.Total());
        }
Exemplo n.º 2
0
        public void Total_AVgaAdapterWithAMacbook_TotalPriceExcludeVgaAdapter()
        {
            //Arrange
            var item1 = new Vga();
            var item2 = new MacBookPro();

            //Act
            _checkOut.Scan(item1);
            _checkOut.Scan(item2);

            //Assert
            Assert.AreEqual(macbookProPrice, _checkOut.Total());
        }
Exemplo n.º 3
0
        public void Total_AMacbookWithVgaAdapterAndIpad_VgaAdapterPriceIsExcluded()
        {
            //Arrange
            var item1 = new MacBookPro();
            var item2 = new Vga();
            var item3 = new Ipad();

            //Act
            _checkOut.Scan(item1);
            _checkOut.Scan(item2);
            _checkOut.Scan(item3);

            //Assert
            Assert.AreEqual(1949.98, _checkOut.Total());
        }
Exemplo n.º 4
0
        public void Total_TwoMacbookWithThreeVgaAdapter_TotalPriceIncludeAVgaAdapter()
        {
            //Arrange
            var item1 = new MacBookPro();
            var item2 = new MacBookPro();
            var item3 = new Vga();
            var item4 = new Vga();
            var item5 = new Vga();

            //Act
            _checkOut.Scan(item1);
            _checkOut.Scan(item2);
            _checkOut.Scan(item3);
            _checkOut.Scan(item4);
            _checkOut.Scan(item5);

            //Assert
            Assert.AreEqual(macbookProPrice * 2 + vgaAdapterPrice, _checkOut.Total());
        }