public void ShouldNotProvdeAnySpecialPrice_WhenItemIsNotOnSale() { Dictionary <string, int> saleRules = new Dictionary <string, int>(); PricingRules pricingRules = new PricingRules(saleRules); pricingRules.LookupPrice("A", 1).Equals(null); }
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); }
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); }