Exemplo n.º 1
0
 public void GetPromotionForItem_itemInLookup_returnsPromotion() {
     PromotionModel model = new PromotionModel(new string[] { "Apple,QtyPromoPrice,[email protected]" });
     Item item = new Item("Apple");
     Promotion promotion = model.GetPromotionForItem(item);
     Assert.IsNotNull(promotion);
     Assert.IsTrue(promotion is QuantityPricePromotion);
 }
Exemplo n.º 2
0
 public void GetPromotionForItem_itemNotInLookup_returnsNull() {
     PromotionModel model = new PromotionModel(new string[] { "Apple,QtyPromoPrice,[email protected]" });
     Item item = new Item("Bananas");
     Promotion promotion = model.GetPromotionForItem(item);
     Assert.IsNull(promotion);            
 }