示例#1
0
        public void GenerateReceiptLine_ShouldFormatReceiptLineCorrectly(int quantity, string productName, decimal shelfPrice, string expectedResult)
        {
            // Arrange
            var product  = new Product();
            var cartItem = new CartItem(product)
            {
                Quantity = quantity, ShelfPrice = shelfPrice
            };

            cartItem.Product.ProductName = productName;

            // Act
            string actualResult = cartItem.GenerateReceiptLine();

            // Assert
            Assert.Equal(expectedResult, actualResult);
        }