예제 #1
0
        public void CreateInvoice(string inputFilePath, string outPutFilePath)
        {
            var job = _jobsFileRepository.ReadJobFromFile(inputFilePath);

            var invoice = _invoiceStrategy.CalculateInvoice(job);

            _jobsFileRepository.WriteInvoiceToFile(outPutFilePath, invoice);
        }
예제 #2
0
        public void SingleItemJob()
        {
            // Arrange
            var job = Job.Create(
                false,
                new List <PrintItem>
            {
                PrintItem.Create("Test", 200m, false)
            });

            // Act
            var invoice = _invoiceStrategy.CalculateInvoice(job);

            // Assert
            Assert.That(invoice.Total, Is.EqualTo(236));
            AssertPrintItemIsCorrect(invoice.InvoiceItems[0], "Test", 214);
        }