コード例 #1
0
        public void Given_FourMilk_WhenBuyThreeMilksGetOneFree_ReturnOnePointOneFive()
        {
            var testData = new List <Product>
            {
                new Product
                {
                    PriceInPounds = 1.15m,
                    DisplayName   = "Milk",
                    Quantity      = 4,
                    Id            = Product.MilkId
                }
            };

            var result = _offerService.BuyThreeMilksGetOneFree(testData);

            Assert.AreEqual(1.15m, result);
        }