public void FindMethodOk() { //create an instance of the class we want to create clsManager AManager = new clsManager(); //boolen variable to store the result of the validation Boolean Found = false; //create some test data to use with the method Int32 ManagerID = 22; //invoke the method Found = AManager.Find(ManagerID); //test to see that the result is correct Assert.IsTrue(Found); }
public void TestManagerIDFound() { //create an instance of the class we want to create clsManager AManager = new clsManager(); //boolean variable to store the result of the search Boolean Found = false; //boolean variable to record if data is OK (assume it is) Boolean OK = true; //create some test data to use with the method Int32 ManagerID = 22; //invoke the method Found = AManager.Find(ManagerID); //check the manager id if (AManager.ManagerID != 22) { OK = false; } //test to see that the result is correct Assert.IsTrue(OK); }