public void addProductToOfferTestNormalCase()
 {
     OfferController offercontroller = new OfferController();
     Response response = offercontroller.addProductToOffer(
         new Input("productId", "1"),
         new Input("productQuantity", "1")
         );
     Assert.AreEqual(response.State, ResponseState.SUCCESS);
 }
 public void addProductToOfferTestNonNumQuantity()
 {
     OfferController offercontroller = new OfferController();
     Response response = offercontroller.addProductToOffer(
         new Input("productId", "1"),
         new Input("productQuantity", "a")
         );
     Assert.AreEqual(response.State, ResponseState.FAIL);
     Assert.Greater(response.Errors.Count(error => error.ErrorMessage == "Quantity do not represent integer value."), 0);
 }
 public void addProductToOfferTestEmptyQuantity()
 {
     OfferController offercontroller = new OfferController();
     Response response = offercontroller.addProductToOffer(
         new Input("productId", "1"),
         new Input("productQuantity", "")
         );
     Assert.AreEqual(response.State, ResponseState.FAIL);
     Assert.Greater(response.Errors.Count(error => error.ErrorMessage == "Product quantity can't be empty."), 0);
 }