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); }
public void CreatePromotionTest_invalidPromotionFormat_notRecognizedPromotionType_exceptionExpected() { PromotionModel model = new PromotionModel(new string[0]); model.CreatePromotion("Apple,Unknown,[email protected]"); }
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); }
public void CreatePromotionTest_invalidPromotionFormat_invalidNumberOfParameters_exceptionExpected() { PromotionModel model = new PromotionModel(new string[0]); model.CreatePromotion("Apple Something Missing"); }