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