//used to test the find method of the class public void FindMethod() { //create an instance of the class clsLocation ALocation = new clsLocation(); //boolean variable to store the result of the validation Boolean Found = false; //create some test data to use with the method Int32 LocationID = 14; //invoke the method Found = ALocation.Find(LocationID); //test to see that the result is correct Assert.IsTrue(Found); }
public void TestPlaneIDFound() { //create an instance of the class clsLocation ALocation = new clsLocation(); //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 LocationID = 14; //imvoke the method Found = ALocation.Find(LocationID); //check the plane id if (ALocation.PlaneID != 1) { OK = false; } //test to see that the result is correct Assert.IsTrue(OK); }