예제 #1
0
 public void FindMethodOK()
 {
     //create an instance of the class we want to create
     clsConsultant AConsultant = new clsConsultant();
     //boolean variable to store the result of the vaidation
     Boolean Found = false;
     //create some test data to use with the method
     Int32 ConsultantNo = 2;
     //invoke the method
     Found = AConsultant.Find(ConsultantNo);
     //test to see that the result is correct
     Assert.IsTrue(Found);
 }
예제 #2
0
        public void TestHoursOfWorkFound()
        {
            //create an instance of the class we want to create
            clsConsultant AConsultant = new clsConsultant();
            //boolean variable to store the result of the search
            Boolean Found = false;
            //boolean variable to record ifdata is OK (assume it is)
            Boolean OK = true;
            //create some test data to use with the method
            Int32 ConsultantNo = 2;
            //invoke the method
            Found = AConsultant.Find(ConsultantNo);
            //check the Consultant No
            if (AConsultant.HoursOfWork != 128)
            {

                OK = false;
            }
            //test to see that the result is correct
            Assert.IsTrue(OK);
        }
예제 #3
0
 public void TestTelNoFound()
 {
     //create an instance of the class we want to create
     clsConsultant AConsultant = new clsConsultant();
     //boolean varibale to store the result of the validation
     Boolean Found = false;
     //boolean variable to store the result of the search
     Boolean OK = true;
     //create some test data to use with the method
     Int32 ConsultantNo = 1;
     //invoke the method
     Found = AConsultant.Find(ConsultantNo);
     //check the ConsultantNo
     if (AConsultant.TelephoneNo != "07548389201")
     {
         OK = false;
     }
     //test to see that the result is correct
     Assert.IsTrue(OK);
 }
예제 #4
0
 public void TestEmploymentDateFound()
 {
     //create an instance of the class we want to create
     clsConsultant AConsultant = new clsConsultant();
     //boolean varibale to store the result of the validation
     Boolean Found = false;
     //boolean variable to store the result of the search
     Boolean OK = true;
     //create some test data to use with the method
     Int32 ConsultantNo = 1;
     //invoke the method
     Found = AConsultant.Find(ConsultantNo);
     //check the ConsultantNo
     if (AConsultant.EmploymentDate != Convert.ToDateTime("12/12/2014"))
     {
         OK = false;
     }
     //test to see that the result is correct
     Assert.IsTrue(OK);
 }