コード例 #1
0
        public void ScenarioATesting()
        {
            var orders = new List <Order>();

            order = new Order
            {
                Id                       = 1,
                OrderId                  = 1,
                SkuCode                  = "C",
                Qty                      = 1,
                DiscountPercentage       = Constant.ProductCDDiscount,
                ProductMinCountPromotion = Constant.ProductMinCountPromotionForCD,
                PromotionPriceTypeEnum   = EnumHelper.PromotionPriceTypeEnum.Combination,
                UnitPrice                = Constant.ProductCPrice
            };

            orders.Add(order);

            var promotionEngine = new PromotionEngine();

            var expected = promotionEngine.CalculatePromotion(orders);
            var actual   = 100D;

            Assert.AreEqual(actual, expected);
        }