예제 #1
0
        public void FindMethodOK()
        {
            clsReview AReview = new clsReview();

            Boolean Found = false;

            Int32 ReviewID = 9;

            Found = AReview.Find(ReviewID);

            Assert.IsTrue(Found);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
        }
예제 #5
0
        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);
        }
예제 #6
0
        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);
        }
예제 #7
0
        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);
        }
예제 #8
0
    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);
        }
    }
예제 #9
0
        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);
        }