public void ProductCuttingUpdateErrorTest() { List <string> errors = new List <string>(); // TODO: Initialize to an appropriate value int invalid_ProductCutting_id = BLProductCutting.ReadAllProductCutting(ref errors).Count + 1; BLProductCutting.UpdateProductCutting(-1, "Louis", ref errors); Assert.AreEqual(1, errors.Count); AsynchLog.LogNow(errors); BLProductCutting.UpdateProductCutting(invalid_ProductCutting_id, "Louis", ref errors); Assert.AreEqual(2, errors.Count); AsynchLog.LogNow(errors); }
public void UpdateProductCuttingTest() { Random rand = new Random(); String updateString = "Tall " + rand.Next(1000); List <string> errors = new List <string>(); // TODO: Initialize to an appropriate value List <string> errorsExpected = new List <string>(); // TODO: Initialize to an appropriate value int result = BLProductCutting.UpdateProductCutting(1, updateString, ref errors); AsynchLog.LogNow(errors); ProductCuttingInfo ProductCutting = BLProductCutting.ReadProductCutting(1, ref errors); AsynchLog.LogNow(errors); Assert.AreEqual(1, result); Assert.AreEqual(ProductCutting.product_cutting_id, 1); Assert.AreEqual(ProductCutting.product_cutting_name, updateString); }
public int UpdateProductCutting(int ProductCuttingID, string ProductCuttingName, ref List <string> errors) { return(BLProductCutting.UpdateProductCutting(ProductCuttingID, ProductCuttingName, ref errors)); }