Example #1
0
 public void CustAddressLine1Mid()
 {
     //create an instance of the class we want to create
     clsCustomer ACustomer = new clsCustomer();
     //Boolean variable to store the result of the validation
     Boolean OK = false;
     //create some test data to use with the method
     String FirstName = "Peter";
     String LastName = "Anderson";
     String AddressLine1 = "";
     AddressLine1 = AddressLine1.PadRight(25, 'a');
     String AddressLine2 = "Test";
     String Town = "Test";
     String PostCode = "LE3 0QT";
     String EmailAddress = "*****@*****.**";
     String PhoneNo = "07123123123";
     String UserName = "******";
     String Password = "******";
     //invoke the mothod
     OK = ACustomer.Valid(FirstName, LastName, AddressLine1, PhoneNo, AddressLine2, Town,
                          PostCode, EmailAddress, UserName, Password);
     //test to see if the result is correct
     Assert.IsTrue(OK);
 }