Exemplo n.º 1
0
        public void CalculateInvoiceTotalWithOnlySimpleProducts(decimal itemPrice)
        {
            var invoice = _invoiceBuilder
                          .WithProduct(pb => pb.WithPrice(itemPrice))
                          .WithDueDate(RegularDueDate)
                          .Build();

            invoice.InvoiceTotal.Should().Be(itemPrice);
        }
Exemplo n.º 2
0
        public void CalculateInvoiceTotalWithOnlySimpleProducts(decimal itemPrice)
        {
            var invoice = _invoiceBuilder
                          .WithProduct(pb => pb.WithPrice(itemPrice))
                          .WithDueDate(DateTime.Today)
                          .Build();

            Assert.Equal(itemPrice, invoice.InvoiceTotal);
        }
        public void CalculateInvoiceTotalWithOnlySimpleProducts(int itemPrice)
        {
            var decimalItemPrice = Convert.ToDecimal(itemPrice);

            var invoice = _invoiceBuilder
                          .WithProduct(pb => pb.WithPrice(decimalItemPrice))
                          .WithDueDate(RegularDueDate)
                          .Build();

            Assert.AreEqual(decimalItemPrice, invoice.InvoiceTotal);
        }