Beispiel #1
0
        public void ShouldNotProvdeAnySpecialPrice_WhenItemIsNotOnSale()
        {
            Dictionary <string, int> saleRules    = new Dictionary <string, int>();
            PricingRules             pricingRules = new PricingRules(saleRules);

            pricingRules.LookupPrice("A", 1).Equals(null);
        }
Beispiel #2
0
        public void ShouldProvideSpecialPrice_WhenItemIsOnSale_AndNumberOfUnitsMatchSpecialPriceRule(string sku, int units, int specialPrice)
        {
            Dictionary <string, int> saleRules = new Dictionary <string, int>();

            saleRules.Add(String.Format("{0}:{1}", sku, units), specialPrice);
            PricingRules pricingRules = new PricingRules(saleRules);

            pricingRules.LookupPrice(sku, units).Equals(specialPrice);
        }
Beispiel #3
0
        public void ShouldNotProvideSpecialPrice_WhenItemIsOnSale_AndNumberOfUnitsDoNotMatchSpecialPriceRule()
        {
            Dictionary <string, int> saleRules = new Dictionary <string, int>();

            saleRules.Add("A:3", 130);
            PricingRules pricingRules = new PricingRules(saleRules);

            pricingRules.LookupPrice("A", 1).Equals(null);
        }