public void ItPrintsADiscountReceiptTotal()
        {
            var receipt = new Receipt
            {
                ItemPrices = new List <ItemPrice>
                {
                    new ItemPrice {
                        Name = "Apple", Price = 0.5M, Promotion = new BuyOneGetOneFree()
                    }
                },
                ScannedItems = new List <ScannedItem>
                {
                    new ScannedItem()
                    {
                        Name = "Apple"
                    },
                    new ScannedItem()
                    {
                        Name = "Apple"
                    }
                }
            };
            var receiptPrinter = new ReceiptPrinter(receipt);

            Assert.AreEqual("Total: $0.50", receiptPrinter.PrintTotal());
        }
        public void ItPrintsAnEmptyReceiptTotal()
        {
            var receipt        = new Receipt();
            var receiptPrinter = new ReceiptPrinter(receipt);

            Assert.AreEqual("Total: $0.00", receiptPrinter.PrintTotal());
        }
        public void ItPrintsABasicReceiptTotal()
        {
            var receipt = new Receipt
            {
                ItemPrices = new List <ItemPrice>
                {
                    new ItemPrice {
                        Name = "Apple", Price = 1
                    }
                },
                ScannedItems = new List <ScannedItem>
                {
                    new ScannedItem()
                    {
                        Name = "Apple"
                    }
                }
            };
            var receiptPrinter = new ReceiptPrinter(receipt);

            Assert.AreEqual("Total: $1.00", receiptPrinter.PrintTotal());
        }
 public void ItPrintsAnEmptyReceiptTotal()
 {
     var receipt = new Receipt();
     var receiptPrinter = new ReceiptPrinter(receipt);
     Assert.AreEqual("Total: $0.00", receiptPrinter.PrintTotal());
 }
 public void ItPrintsADiscountReceiptTotal()
 {
     var receipt = new Receipt
     {
         ItemPrices = new List<ItemPrice>
         {
             new ItemPrice { Name = "Apple", Price = 0.5M, Promotion = new BuyOneGetOneFree()}
         },
         ScannedItems = new List<ScannedItem>
         {
             new ScannedItem() { Name="Apple" },
             new ScannedItem() { Name="Apple" }
         }
     };
     var receiptPrinter = new ReceiptPrinter(receipt);
     Assert.AreEqual("Total: $0.50", receiptPrinter.PrintTotal());
 }
 public void ItPrintsABasicReceiptTotal()
 {
     var receipt = new Receipt
     {
         ItemPrices = new List<ItemPrice>
         {
             new ItemPrice { Name = "Apple", Price = 1}
         },
         ScannedItems = new List<ScannedItem>
         {
             new ScannedItem() { Name="Apple" }
         }
     };
     var receiptPrinter = new ReceiptPrinter(receipt);
     Assert.AreEqual("Total: $1.00", receiptPrinter.PrintTotal());
 }