public void AddressMaxPlusOne() { //create an instance of the class we want to create clsConsultant AConsultant = new clsConsultant(); //boolean variable to store the result of the validation Boolean OK = false; //create some test data to use with the method string FirstName = "James"; string LastName = "mmmmmm"; string Address = "Flat2CBASTREETLEICERRFlat2CBASTREETLEICERRFlat2CBASTREETLEICE"; string Email = "*****@*****.**"; string DateAdded = DateTime.Now.Date.ToString(); string EmploymentHistory = "None"; //invoke the method OK = AConsultant.Valid(FirstName, LastName, Address, Email, EmploymentHistory, DateAdded); //test to see that the result is correct Assert.IsFalse(OK); }
public void LastNameMin() { //create an instance of the class we want to create clsConsultant AConsultant = new clsConsultant(); //boolean variable to store the result of the validation Boolean OK = false; //create some test data to use with the method string FirstName = "James"; //This should pass string LastName = "B"; string Address = "flat b 2, thml"; string Email = "*****@*****.**"; string DateAdded = DateTime.Now.Date.ToString(); string EmploymentHistory = "None"; //invoke the method OK = AConsultant.Valid(FirstName, LastName, Address, Email, EmploymentHistory, DateAdded); //test to see that the result is correct Assert.IsTrue(OK); }
public void FirstNameMaxPlusOne() { //create an instance of the class we want to create clsConsultant AConsultant = new clsConsultant(); //boolean variable to store the result of the validation Boolean OK = false; //create some test data to use with the method string FirstName = "abcdmjmjmghhkgkngnnabcdmjmjmghhkgkngnnamjnhgbnjsss"; //This should fail string LastName = "mmmmmm"; string Address = "flat b 2, thml"; string Email = "*****@*****.**"; string DateAdded = DateTime.Now.Date.ToString(); string EmploymentHistory = "None"; //invoke the method OK = AConsultant.Valid(FirstName, LastName, Address, Email, DateAdded, EmploymentHistory); //test to see that the result is correct Assert.IsFalse(OK); }
public void EmploymentMinPlusOne() { //create an instance of the class we want to create clsConsultant AConsultant = new clsConsultant(); //boolean variable to store the result of the validation Boolean OK = false; //create some test data to use with the method string FirstName = "James"; string LastName = "mmmmmm"; string Address = "FlatB2CTHYMEROADLESS"; string Email = "mmwen@xyz"; string DateAdded = DateTime.Now.Date.ToString(); string EmploymentHistory = "Fired"; //invoke the method OK = AConsultant.Valid(FirstName, LastName, Address, Email, EmploymentHistory, DateAdded); //test to see that the result is correct Assert.IsTrue(OK); }
public void DateAddedMinPlusOne() { //create an instance of the class we want to create clsConsultant AConsultant = new clsConsultant(); //boolean variable to store the result of the validation Boolean OK = false; //create some test data to use with the method string FirstName = "James"; string LastName = "mmmmmm"; string Address = "flat b 2, thml"; string Email = "*****@*****.**"; string EmploymentHistory = "None"; //create a variable to store the test date data DateTime TestDate; //set the date to todays date TestDate = DateTime.Now.Date; //change the date to tomorrow (+1) TestDate = TestDate.AddDays(1); //convert the date variable to string variable string DateAdded = TestDate.ToString(); //invoke the method OK = AConsultant.Valid(FirstName, LastName, Address, Email, DateAdded, EmploymentHistory); //test to see that the result is correct Assert.IsFalse(OK); }
public void ValidMethodOK() { //create an instance of the class we want to create clsConsultant AConsultant = new clsConsultant(); //boolean variable to store the result of the vaidation Boolean OK = false; //create some test data to use with the method string FirstName = "James"; string LastName = "James"; string Address = "Flat C, Colly road"; string Email = "*****@*****.**"; string EmploymentHistory = "Employed"; string DateAdded = DateTime.Now.Date.ToString(); //invoke the method OK = AConsultant.Valid(FirstName, LastName, Address, Email, EmploymentHistory, DateAdded); //test to see that the result is correct Assert.IsTrue(OK); }