Пример #1
0
        /// <summary>
        /// Test that when the EndPromo called, the <c>Product</c> properties are re-initialised with the given price
        /// with the given <c>IPromotionPricingRule</c> properties
        /// is null
        /// </summary>
        public void TestEndPromoReinitialisedProductWithGivenPrice( )
        {
            var product   = new StockKeepingUnit("A", 5);
            var promoRule = new SpecialPricingRule("Test", 40, 0, 0);

            product.AppyPromotionRule(promoRule);

            // Now end the promo
            product.EndPromo(6);

            Assert.AreEqual(6, product.Price);
            Assert.IsFalse(product.IsPromoProduct);
            Assert.IsTrue(product.Name.Equals("A"));
            Assert.IsNull(product.CurrentPromoPricingRule);
        }