public void FindMethodOK() { //create an instance of the class we want to create clsAdministrator AnAdministrator = new clsAdministrator(); //boolean variable to store the result of the validation Boolean Found = false; //create some test data to use with the method int AdministratorID = 10; //invoke the method Found = AnAdministrator.Find(AdministratorID); //test to see that the result is correct Assert.IsTrue(Found); }
public void TestPhoneIDFound() { //create an instance of the class we want to create clsAdministrator AnAdministrator = new clsAdministrator(); //boolean variable to store the result of the validation 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 int AdministratorID = 10; //invoke the method Found = AnAdministrator.Find(AdministratorID); //check the administrator id if (AnAdministrator.PhoneID != 3) { OK = false; } //test to see that the result is correct Assert.IsTrue(Found); }