public void FindMethodOK() { //create an instance of the class we want to create ClsAddress AnAddress = new ClsAddress(); //boolean variable to store the result of the validation Boolean Found = false; //create some test data to use with the method Int32 AddressNo = 1; //invoke the method Found = AnAddress.Find(AddressNo); //test to see that the result is correct Assert.IsTrue(Found); }
public void TestActiveFound() { //create an instance of the class we want to create ClsAddress AnAddress = new ClsAddress(); //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 AddressNo = 21; //invoke the method Found = AnAddress.Find(AddressNo); //check the property if (AnAddress.Active != true) { OK = false; } //test to see that the result is correct Assert.IsTrue(OK); }