public void FindMethodOK() { //create an instance of the class we want to create clsAdmin AAdmin = new clsAdmin(); //boolean variable to store the result of the value Boolean Found = false; //create some test data to use with the emthod int AdminNo = 1; //invoke the method Found = AAdmin.Find(AdminNo); //test to see the result is correct Assert.IsTrue(Found); }
public void TestActiveFound() { //create an instance of the class we want to create clsAdmin AAdmin = new clsAdmin(); //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 AdminNo = 1; //invoke the method Found = AAdmin.Find(AdminNo); //check the property if (AAdmin.Active != true) { OK = false; } //test to see that the result is correct Assert.IsTrue(OK); }
public void TestAdminEmailFound() { //create an instance of the class we want to create clsAdmin AAdmin = new clsAdmin(); //boolean variable to store the result of the search Boolean Found = false; //boolean variable to record if data is OK Boolean OK = true; //create some test data to use with the method Int32 AdminNo = p1234; //invoke the method Found = AAdmin.Find(AdminNo); //check the address no if (AAdmin.AdminEmail != "AdminEmail") { OK = false; } //test to see that the result is correct Assert.IsTrue(OK); }