예제 #1
0
 public void CreatePromotionTest_validPromotionFormat_buyGetDiscountPromotion_returnsQuantityPromotion() {
     PromotionModel model = new PromotionModel(new string[0]);
     Promotion promotion = model.CreatePromotion("Apple,BuyGetDiscountPromo,2:[email protected]");
     Assert.IsTrue(promotion is BuyGetDiscountPromotion);
 }
예제 #2
0
 public void CreatePromotionTest_invalidPromotionFormat_notRecognizedPromotionType_exceptionExpected() {
     PromotionModel model = new PromotionModel(new string[0]);
     model.CreatePromotion("Apple,Unknown,[email protected]");
 }
예제 #3
0
 public void CreatePromotionTest_validPromotionFormat_quantityPromotion_returnsQuantityPromotion() {
     PromotionModel model = new PromotionModel(new string[0]);
     Promotion promotion = model.CreatePromotion("Apple,QtyPromoPrice,[email protected]");
     Assert.IsTrue(promotion is QuantityPricePromotion);
 }
예제 #4
0
 public void CreatePromotionTest_invalidPromotionFormat_invalidNumberOfParameters_exceptionExpected() {
     PromotionModel model = new PromotionModel(new string[0]);
     model.CreatePromotion("Apple Something Missing");
 }