예제 #1
0
파일: BasketTests.cs 프로젝트: mkent92/Kata
        public void ShouldNotProvdeAnySpecialPrice_WhenItemIsNotOnSale()
        {
            Dictionary <string, int> saleRules    = new Dictionary <string, int>();
            PricingRules             pricingRules = new PricingRules(saleRules);

            pricingRules.LookupPrice("A", 1).Equals(null);
        }
예제 #2
0
파일: BasketTests.cs 프로젝트: mkent92/Kata
        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);
        }
예제 #3
0
파일: BasketTests.cs 프로젝트: mkent92/Kata
        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);
        }