Esempio n. 1
0
        public void InvoiceHtmlStringWithEmptyOrder()
        {
            var testInvoice = new PriceLogic.Invoice.Invoice(123, new List <OrderItem>());

            var expected = "<table><tr> <td width=100px>Total price: 0$ </td> </tr></table>";

            Assert.AreEqual(testInvoice.GenerateInvoiceHtmlString().Value, expected);
        }
Esempio n. 2
0
        public void InvoiceHtmlStringWithNullOrder()
        {
            var testInvoice = new PriceLogic.Invoice.Invoice(123, null);

            Assert.Throws <NullReferenceException>(() => testInvoice.GenerateInvoiceHtmlString());
        }