Exemple #1
0
        public void StaffNameLessOne()
        {
            //create an instance of the staffname
            clsStaff AStaff = new clsStaff();
            //boolean variable to store the results of the validation
            Boolean Ok = false;
            //some string test data to assign the property
            string StaffNameValid = "";
            string BriefValid = "i am jefferson";
            string GenderValid = "man";
            string MobilesphoneValid = "07833324651";
            string PositionValid = "manager";

            //invoke the method 
            Ok = AStaff.Valid(StaffNameValid, BriefValid, GenderValid, MobilesphoneValid, PositionValid);
            //test to see that results is correct
            Assert.IsFalse(Ok);

        }
Exemple #2
0
        public void StaffmobilesphoneExtremeMax()
        {
            //create an instance of the Staffmobilesphone
            clsStaff AStaff = new clsStaff();
            //boolean variable to store the results of the validation
            Boolean Ok = false;
            //some string test data to assign the property
            string StaffNameValid = "Jefferson";
            string BriefValid = "i am jefferson";
            string GenderValid = "man";
            string MobilesphoneValid = "";
            //pad the string with a characters
            MobilesphoneValid = MobilesphoneValid.PadRight(12, '0');
            string PositionValid = "manager";
            //invoke the method 
            Ok = AStaff.Valid(StaffNameValid, BriefValid, GenderValid, MobilesphoneValid, PositionValid);
            //test to see that results is correct
            Assert.IsFalse(Ok);

        }