public async Task CreateInvoiceWithMultipleItemsAndQuantitiesTest_MultipleInvoiceLines_InvoiceLineCountIsSameAsSupplied()
        {
            var invoice = new Invoice
            {
                LineItems = new List <InvoiceLine>()
            };

            await _invoiceOperations.AddInvoiceLines(invoice, InvoiceLinesRepo.InvoiceLines);

            var expectedInvoiceLinesCount = InvoiceLinesRepo.InvoiceLines.Count;
            var actualInvoiceLinesCount   = invoice.LineItems.Count;

            Assert.AreEqual(expectedInvoiceLinesCount, actualInvoiceLinesCount);
        }
예제 #2
0
        public async Task AddInvoiceLinesTest_AddOneInvoiceLine_CostAreEqual()
        {
            var invoice = new Invoice
            {
                LineItems = new List <InvoiceLine>()
            };

            await _invoiceOperations.AddInvoiceLines(invoice, new List <InvoiceLine>
            {
                InvoiceLinesRepo.InvoiceLines.First()
            });

            var expectedCost = InvoiceLinesRepo.InvoiceLines.First().Cost;
            var actualCost   = invoice.LineItems.First().Cost;

            Assert.AreEqual(expectedCost, actualCost);
        }