Exemplo n.º 1
0
        public void FindMethodOK()
        {
            //create an insatnce of nthe class we want to create
            clsMaintenance anMaintenance = new clsMaintenance();
            //boolean variable to store the seslut of the vaildation
            Boolean Found = false;
            //create some test data to use with the method
            Int32 MaintenanceID = 12;

            //invoke the method
            Found = anMaintenance.Find(MaintenanceID);
            //test to see that the result is correct
            Assert.IsTrue(Found);
        }
Exemplo n.º 2
0
        public void TestRepairFound()
        {
            //create an instance of the class
            clsMaintenance anMaintenance = new clsMaintenance();
            //boolean varialbe to store the result
            Boolean Found = false;
            //boolean variable to record if data is ok
            Boolean Ok = true;
            //create some test data to use with method
            Int32 MaintenanceID = 12;

            //invoke the method
            Found = anMaintenance.Find(MaintenanceID);
            //check the maintenance
            if (anMaintenance.Repair != true)
            {
                Ok = false;
            }
            //test to see that the resuts is correct
            Assert.IsTrue(Ok);
        }