public void ValidMethodOK() { clsReviews AnReviews = new clsReviews(); String Error = ""; Error = AnReviews.Valid(ReviewedProduct, ReviewText, DateAdded, ReviewerName); Assert.AreEqual(Error, ""); }
public void ReviewedProductMaxPlusOne() { clsReviews AnReviews = new clsReviews(); String Error = ""; string ReviewedProduct = ""; Error = AnReviews.Valid(ReviewedProduct, ReviewText, DateAdded, ReviewerName); Assert.AreNotEqual(Error, ""); }
public void DateAddedInvalidData() { clsReviews AnReviews = new clsReviews(); String Error = ""; string DateAdded = "This is not a date!"; Error = AnReviews.Valid(ReviewedProduct, ReviewText, DateAdded, ReviewerName); Assert.AreNotEqual(Error, ""); }
public void ReviewedProductMid() { clsReviews AnReviews = new clsReviews(); String Error = ""; string ReviewedProduct = ""; ReviewedProduct = ReviewedProduct.PadRight(25, 'a'); Error = AnReviews.Valid(ReviewedProduct, ReviewText, DateAdded, ReviewerName); Assert.AreEqual(Error, ""); }
public void DateAddedMin() { clsReviews AnReviews = new clsReviews(); String Error = ""; DateTime TestDate; TestDate = DateTime.Now.Date; string DateAdded = TestDate.ToString(); Error = AnReviews.Valid(ReviewedProduct, ReviewText, DateAdded, ReviewerName); Assert.AreEqual(Error, ""); }
public void DateAddedExtremeMax() { clsReviews AnReviews = new clsReviews(); String Error = ""; DateTime TestDate; TestDate = DateTime.Now.Date; TestDate = TestDate.AddYears(100); string DateAdded = TestDate.ToString(); Error = AnReviews.Valid(ReviewedProduct, ReviewText, DateAdded, ReviewerName); Assert.AreNotEqual(Error, ""); }
public void ValidMethodOK() { //create an instance of the class we want to create clsReviews AReviews = new clsReviews(); //boolean variable to store the result of the validation Boolean Ok = false; //create some data to use with the method string Title = "haha"; string MainReview = "great"; string Score = "3.3"; //invoke the method Ok = AReviews.Valid(Title, MainReview, Score); //test tto see that the reuslt is correct Assert.IsTrue(Ok); }
public void EmailExtremeMin() { //create a new instance of the class we want to create clsReviews TestItem = new clsReviews();; //string variable to store result of validation string AllOK = ""; //create some test data to assign to property string Email = ""; string Exp = " loved it thanks "; string Improveexp = " no mate loved it thanks ! "; //invoke method AllOK = TestItem.Valid(Email, Exp, Improveexp); //test to see if it exists Assert.AreNotEqual(AllOK, ""); }
public void ImproveexpExtremeMax() { //create a new instance of the class we want to create clsReviews TestItem = new clsReviews();; //string variable to store result of validation string AllOK = ""; //create some test data to assign to property string Email = " [email protected]"; string Exp = " loved it thanks "; string Improveexp = " Samsung6532562147858325444125111111111111111111111111111111 "; //invoke method AllOK = TestItem.Valid(Email, Exp, Improveexp); //test to see if it exists Assert.AreNotEqual(AllOK, ""); }
public void ImproveexpMaxPlus1() { //create a new instance of the class we want to create clsReviews TestItem = new clsReviews();; //string variable to store result of validation string AllOK = ""; //create some test data to assign to property string Email = " [email protected]"; string Exp = " loved it thanks "; string Improveexp = " Abcdefhjklmnjhsaqweaa "; //invoke method AllOK = TestItem.Valid(Email, Exp, Improveexp); //test to see if it exists Assert.AreEqual(AllOK, ""); }