public void FindMethodOK() { //create an instance of the class we want to create clsDestination AnDestination = new clsDestination(); //Boolean variable to store the result of the validation Boolean Found = false; //create some test data to use with the method Int32 DestinationID = 131; //invoke the method Found = AnDestination.Find(DestinationID); //test to see that the result is correct Assert.IsTrue(Found); }
public void DestinationFindMethodOK() { // create an instance of the class we want to create clsDestination ADestination = new clsDestination(); // boolean variable to store the result of the validation Boolean Found = false; // create test data to assign to the property Int32 DestinationID = 5; // execute the method Found = ADestination.Find(DestinationID); // test to see that the result is correct Assert.IsTrue(Found); }
public void TestDropoffTimeFound() { //create an instance of the class we want to create clsDestination AnDestination = new clsDestination(); //Boolean variable to store the result of the validation Boolean Found = false; //boolean variable to record if data is OK (assume that it is) Boolean OK = true; //create some test data to use with the method Int32 DestinationID = 131; //invoke the method Found = AnDestination.Find(DestinationID); //check the DropoffTime property if (AnDestination.DropoffTime != Convert.ToDateTime("23/03/2019 22:30:00")) { OK = false; } //test to see that the result is correct Assert.IsTrue(OK); }
public void TestEndPointTownFound() { //create an instance of the class we want to create clsDestination AnDestination = new clsDestination(); //Boolean variable to store the result of the validation Boolean Found = false; //boolean variable to record if data is OK (Assume that it is) Boolean OK = true; //create some test data to use with the method Int32 DestinationID = 131; //invoke the method Found = AnDestination.Find(DestinationID); //check the EndPointTown property if (AnDestination.EndPointTown != "Nwoott Town") { OK = false; } //test to see that the result is correct Assert.IsTrue(OK); }
public void TestPricePerPersonFound() { // create an instance of the class we want to create clsDestination ADestination = new clsDestination(); // boolean variable to store the result of the validation Boolean Found = false; // boolean to record if data is ok Boolean OK = true; // create test data to use with the method Int32 DestinationID = 5; // execute the method Found = ADestination.Find(DestinationID); // check the property if (ADestination.PricePerPerson != 200) { OK = false; } // test to see that the result is correct Assert.IsTrue(OK); }