Exemple #1
0
        public void FindMethodOK()
        {
            clsBook ABook  = new clsBook();
            bool    found  = false;
            int     BookID = 1;

            found = ABook.Find(BookID);
            Assert.IsTrue(found);
        }
Exemple #2
0
        public void TestAvailableOnlineFound()
        {
            clsBook ABook  = new clsBook();
            bool    found  = false;
            bool    ok     = true;
            int     BookID = 1;

            found = ABook.Find(BookID);
            if (ABook.AvailableOnline != true)
            {
                ok = false;
            }
            Assert.IsTrue(ok);
        }
Exemple #3
0
        public void TestPriceFound()
        {
            clsBook ABook  = new clsBook();
            bool    found  = false;
            bool    ok     = true;
            int     BookID = 1;

            found = ABook.Find(BookID);
            if (ABook.Price != 9.99F)
            {
                ok = false;
            }
            Assert.IsTrue(ok);
        }
Exemple #4
0
        public void TestStockFound()
        {
            clsBook ABook  = new clsBook();
            bool    found  = false;
            bool    ok     = true;
            int     BookID = 1;

            found = ABook.Find(BookID);
            if (ABook.Stock != 3)
            {
                ok = false;
            }
            Assert.IsTrue(ok);
        }
Exemple #5
0
        public void TestDateAddedFound()
        {
            clsBook ABook  = new clsBook();
            bool    found  = false;
            bool    ok     = true;
            int     BookID = 1;

            found = ABook.Find(BookID);
            if (ABook.DatePublished != Convert.ToDateTime("12/12/2012"))
            {
                ok = false;
            }
            Assert.IsTrue(ok);
        }
Exemple #6
0
        public void TestTitleFound()
        {
            clsBook ABook  = new clsBook();
            bool    found  = false;
            bool    ok     = true;
            int     BookID = 1;

            found = ABook.Find(BookID);
            if (ABook.Title != "Test")
            {
                ok = false;
            }
            Assert.IsTrue(ok);
        }