public void InstanceOK() { //Create an instance of the class we want to create clsAdminStaff AStaffAdmin = new clsAdminStaff(); //test to see that it exists Assert.IsNotNull(AStaffAdmin); }
public void MobileNumberPropertyOK() { //instance of the class clsAdminStaff TestMobileNumber = new clsAdminStaff(); //create some test data to assign to the property string SomeData = "07701343822"; //assign the data to the property TestMobileNumber.Mobilenumber = SomeData; //test to see that the two values are the same Assert.AreEqual(TestMobileNumber.Mobilenumber, SomeData); }
public void EmailAddressPropertyOK() { //create an instance of the class we want to create clsAdminStaff TestEmailAddress = new clsAdminStaff(); //create some test data to assign to the property string SomeData = "*****@*****.**"; //assign the data to the property TestEmailAddress.Emailaddress = SomeData; //test to see that the two values are the same Assert.AreEqual(TestEmailAddress.Emailaddress, SomeData); }
public void LastNamePropertyOK() { //create an instance of the class we want to create clsAdminStaff TestLastName = new clsAdminStaff(); //create some test data to assign to the property string SomeData = "Smith"; //assign the data to the property TestLastName.Lastname = SomeData; //test to see that the two values are the same Assert.AreEqual(TestLastName.Lastname, SomeData); }
public void FirstNameMinLessOne() { //create an instance of the class we want to create clsAdminStaff AStaffAdmin = new clsAdminStaff(); //declare a variable to store the result of the validation Boolean Ok; //create some test data string FirstName = "an"; string LastName = "neee"; string EmailAddress = "*****@*****.**"; string MobileNumber = "77882226121"; //invoke the method Ok = AStaffAdmin.Valid(EmailAddress, FirstName, LastName, MobileNumber); //test to see if the valid method works Assert.IsFalse(Ok); }
public void MobileMax() { //create an instance of the class we want to create clsAdminStaff AStaff = new clsAdminStaff(); //declare a variable to store the result of the validation Boolean Ok; //create some test data string FirstName = "aneeka"; string LastName = "neee"; string EmailAddress = "*****@*****.**"; string MobileNumber = "02345678346"; //invoke the method Ok = AStaff.Valid(EmailAddress, FirstName, LastName, MobileNumber); //test to see if the valid method works Assert.IsTrue(Ok); }
public void EmailAddressExtremeMax() { //create an instance of the class we want to create clsAdminStaff AStaffAdmin = new clsAdminStaff(); //declare a variable to store the result of the validation Boolean Ok; //create some test data string FirstName = "aneeka"; string LastName = "neee"; string EmailAddress = "ghyhujknmkihgfdfcvgghjjnbhyttreedfghjkik";//@hotmail.com string MobileNumber = "77882226121"; //invoke the method Ok = AStaffAdmin.Valid(EmailAddress, FirstName, LastName, MobileNumber); //test to see if the valid method works Assert.IsFalse(Ok); }
public void EmailAddressMax() { //create an instance of the class we want to create clsAdminStaff AStaffAdmin = new clsAdminStaff(); //declare a variable to store the result of the validation Boolean Ok; //create some test data string FirstName = "aneeka"; string LastName = "neee"; string EmailAddress = "ertyudfghjcvbnmujyhtgfredcvgbh";//@hotmail.com string MobileNumber = "77882226121"; //invoke the method Ok = AStaffAdmin.Valid(EmailAddress, FirstName, LastName, MobileNumber); //test to see if the valid method works Assert.IsTrue(Ok); }