public void FindMethodOk() { //create an instance of the class we want to create clsProject AProject = new clsProject(); //boolean variable to store the result of the search Boolean Found = false; //create some test data to use with the method int ProjectID = 2; //invoke the method Found = AProject.Find(ProjectID); //test to see that the result is correct Assert.IsTrue(Found); }
public void TestAppointmentID() { //create an instance of the class we want to create clsProject AProject = new clsProject(); //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 int AProjectID = 2; //invoke the method Found = AProject.Find(AProjectID); //check the AppointmentID if (AProject.AppointmentID != 11) { OK = false; } //test to see that the result is correct Assert.IsTrue(OK); }
public void TestProjectName() { //create an instance of the class we want to create clsProject AProject = new clsProject(); //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 int AProjectID = 2; //invoke the method Found = AProject.Find(AProjectID); //check the ProjectID if (AProject.ProjectName != "Website Creation") { OK = false; } //test to see if the result is correct Assert.IsTrue(OK); }
public void TestEstimatedCompletionDateFound() { //create an instance of the class we want to create clsProject AProject = new clsProject(); //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 int AProjectID = 2; //invoke the method Found = AProject.Find(AProjectID); //check the EstimatedCompletionDate if (AProject.EstimatedCompletionDate != Convert.ToDateTime("19/06/2012")) { OK = false; } //test to see that the result is correct Assert.IsTrue(OK); }