示例#1
0
        public void CalculateInvoice_ArgumentIsOk_ReturnsInvoice()
        {
            // arrange
            var invoiceItems = testData.Select(x => new OrderItemModel()
            {
                ItemId   = x.ItemId,
                Quantity = 1001
            });

            // act
            string actualResult = orderProcessor.CalculateInvoice(invoiceItems);

            // assert
            actualResult.Should().NotBeNullOrWhiteSpace();
            actualResult.Should().Contain("1001");
            foreach (var dataItem in testData)
            {
                actualResult.Should().Contain(dataItem.Name);
            }
        }