public void FindMethodOK() { clsReview AReview = new clsReview(); Boolean Found = false; Int32 ReviewID = 9; Found = AReview.Find(ReviewID); Assert.IsTrue(Found); }
public void ProductRatingFound() { clsReview AReview = new clsReview(); Boolean Found = false; Boolean OK = true; Int32 ReviewID = 9; Found = AReview.Find(ReviewID); if (AReview.ProductRating != 5) { OK = false; } Assert.IsTrue(OK); }
public void VerifiedCustomerFound() { clsReview AReview = new clsReview(); Boolean Found = false; Boolean OK = true; Int32 ReviewID = 9; Found = AReview.Find(ReviewID); if (AReview.VerifiedCustomer != false) { OK = false; } Assert.IsTrue(OK); }
public void ReviewFound() { clsReview AReview = new clsReview(); Boolean Found = false; Boolean OK = true; Int32 ReviewID = 9; Found = AReview.Find(ReviewID); if (AReview.Review != "P") { OK = false; } Assert.IsTrue(OK); }
public void CustomerIDFound() { clsReview AReview = new clsReview(); Boolean Found = false; Boolean OK = true; Int32 ReviewID = 9; Found = AReview.Find(ReviewID); if (AReview.CustomerID != 5) { OK = false; } Assert.IsTrue(OK); }
public void ReviewDateFound() { clsReview AReview = new clsReview(); Boolean Found = false; Boolean OK = true; Int32 ReviewID = 9; Found = AReview.Find(ReviewID); if (AReview.ReviewDate != Convert.ToDateTime("17/05/2020")) { OK = false; } Assert.IsTrue(OK); }
public void TestReviewNoFound() { clsReview AnReview = new clsReview(); Boolean Found = false; Boolean OK = true; Int32 ReviewNo = 33; Found = AnReview.Find(ReviewNo); if (AnReview.ReviewNo != 33) { OK = false; } //test to see that the result is correct Assert.IsTrue(OK); }
protected void btnFind_Click(object sender, EventArgs e) { clsReview AReview = new clsReview(); Int32 ReviewID; Boolean Found = false; ReviewID = Convert.ToInt32(txtReviewID.Text); Found = AReview.Find(ReviewID); if (Found == true) { txtReviewID.Text = AReview.ReviewID.ToString(); txtProductID.Text = AReview.ProductID.ToString(); txtCustomerID.Text = AReview.CustomerID.ToString(); txtReviewDate.Text = AReview.ReviewDate.ToString(); txtProductRating.Text = AReview.ProductRating.ToString(); txtReview.Text = AReview.Review; Yes.Checked = Convert.ToBoolean(AReview.VerifiedCustomer); } }
public void TestDateAddedFound() { clsReview AnReview = new clsReview(); Boolean Found = false; Boolean OK = true; Int32 ReviewNo = 33; Found = AnReview.Find(ReviewNo); if (AnReview.DateAdded != Convert.ToDateTime("06/06/2018")) { OK = false; } //test to see that the result is correct Assert.IsTrue(OK); }