public void FindMethodOK() { //create an instance of the class we want to create clsComplaint AComplaint = new clsComplaint(); //boolean variable to store the result of the validation Boolean Found = false; //create some test data to use with the method Int32 ComplaintID = 1; //invoke the method Found = AComplaint.Find(ComplaintID); //test to see that the result is correct Assert.IsTrue(Found); }
public void TestActiveFound() { //create an instance of the class we want to create clsComplaint AComplaint = new clsComplaint(); //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 IssueSolved = 21; //invoke the method Found = AComplaint.Find(IssueSolved); //check the property if (AComplaint.IssueSolved != true) { OK = false; } //test to see that the result is correct Assert.IsTrue(OK); }
public void TestComplaintDateFound() { //create an instance of the class we want to create clsComplaint AComplaint = new clsComplaint(); //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 ComplaintDate = 21; //invoke the method Found = AComplaint.Find(ComplaintDate); //check the address no if (AComplaint.ComplaintDate != Convert.ToDateTime("16/09/2015")) { OK = false; } //test to see that the result is correct Assert.IsTrue(OK); }
public void TestComplaintDescriptionFound() { //create an instance of the class we want to create clsComplaint AComplaint = new clsComplaint(); //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 ComplaintIDs = 21; //invoke the method Found = AComplaint.Find(ComplaintIDs); //check the address no if (AComplaint.ComplaintDescription != "Damaged") { OK = false; } //test to see that the result is correct Assert.IsTrue(OK); }