Beispiel #1
0
        public void CarRepairFindMethodOK()
        {
            //create instance
            clsCarRepairs AnCarRepair = new clsCarRepairs();
            //Create a boolean variable to store the result of validation.
            Boolean Found = false;
            //Create some test data to use with the method.
            Int32 CarRepairID = 1028;

            //Invoke the method.
            Found = AnCarRepair.Find(CarRepairID);
            //Test to see that the result is correct.
            Assert.IsTrue(Found);
        }
Beispiel #2
0
        public void TestPartRequiredFound()
        {
            //create instance
            clsCarRepairs AnCarRepair = new clsCarRepairs();
            //boolean variable to store the result of search
            Boolean Found = false;
            //boolean variable to record if data is okay (assume it is).
            Boolean OK = true;
            //Create some test data to use with the method.
            Int32 CarRepairID = 1028;

            //Invoke the method.
            Found = AnCarRepair.Find(CarRepairID);
            //Check the PartRequired
            if (AnCarRepair.PartRequired != "Test Part")
            {
                OK = false;
            }
            //test to see if the result is correct.
            Assert.IsTrue(OK);
        }
Beispiel #3
0
        public void TestDeadlineDateFound()
        {
            //create instance
            clsCarRepairs AnCarRepair = new clsCarRepairs();
            //boolean variable to store the result of search
            Boolean Found = false;
            //boolean variable to record if data is okay (assume it is).
            Boolean OK = true;
            //Create some test data to use with the method.
            Int32 CarRepairID = 1028;

            //Invoke the method.
            Found = AnCarRepair.Find(CarRepairID);
            //Check the DeadlineDate
            if (AnCarRepair.DeadlineDate != Convert.ToDateTime("05/05/2017"))
            {
                OK = false;
            }
            //test to see if the result is correct.
            Assert.IsTrue(OK);
        }