예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
        }
예제 #5
0
        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);
        }
예제 #6
0
        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);
        }
예제 #7
0
        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);
        }
예제 #8
0
        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);
        }