예제 #1
0
        public void Printout_IfTestCaseOneEntered_TestCaseOneShouldOutput()
        {
            //Arrange
            _businessLogic = new BusinessLogic(_rounding);

            //Act
            var receiptText         = _businessLogic.Printout(_receiptsInputs.FirstTextCase());
            var totalReceiptTaxes   = _businessLogic.TotalReceiptTaxesSummation;
            var productPriceWithTax = _businessLogic.ProductPriceWithTaxSummation;


            //Assert
            Assert.That(totalReceiptTaxes, Is.EqualTo(1.5M));
            Assert.That(productPriceWithTax, Is.EqualTo(29.83M));



            foreach (var product in _receiptsInputs.FirstTextCase())
            {
                Assert.That(receiptText.ToString(), Does.Contain(product.ProductName));
            }
        }
예제 #2
0
        public void Print()
        {
            var inputs = new ReceiptsInputs();

            Console.Write(_businessLogic.Printout(inputs.FirstTextCase()));
        }