Exemplo n.º 1
0
        public void FindMethodOk()
        {
            //creat an instance of clsBooking class
            clsBooking aBooking = new clsBooking();
            //boolean var to store the result of the validation
            Boolean Found = false;
            //create some test data to use with the method
            Int32 BookingID = 1;

            //invoke the method
            Found = aBooking.Find(BookingID);
            //test to see that two values are same
            Assert.IsTrue(Found);
        }
Exemplo n.º 2
0
        public void NumOfNightsFound()
        {
            //creat an instance of clsBooking class
            clsBooking aBooking = new clsBooking();
            //boolean var to store the result of the validation
            Boolean Found = false;
            //boolean var to record if data is ok
            Boolean Ok = true;
            //create some test data to use with the method
            Int32 BookingID = 1;

            //invoke the method
            Found = aBooking.Find(BookingID);
            //chechk the data is num
            if (aBooking.NumOfNights != 1)
            {
                Ok = false;
            }
            //test to see that two values are same
            Assert.IsTrue(Ok);
        }