Пример #1
0
        public virtual void TestUserNameOkAfterResettingPattern()
        {
            StringParam.Domain oldDomain  = UserParam.GetUserPatternDomain();
            string             newPattern = "^[A-Za-z0-9_][A-Za-z0-9._-]*[$]?$";

            UserParam.SetUserPattern(newPattern);
            UserParam userParam = new UserParam("1x");

            NUnit.Framework.Assert.IsNotNull(userParam.GetValue());
            userParam = new UserParam("123");
            NUnit.Framework.Assert.IsNotNull(userParam.GetValue());
            UserParam.SetUserPatternDomain(oldDomain);
        }
Пример #2
0
        public virtual void UserNameMinLength()
        {
            UserParam userParam = new UserParam("a");

            NUnit.Framework.Assert.IsNotNull(userParam.GetValue());
        }
Пример #3
0
        public virtual void UserNameValidDollarSign()
        {
            UserParam userParam = new UserParam("a$");

            NUnit.Framework.Assert.IsNotNull(userParam.GetValue());
        }
Пример #4
0
        public virtual void UserNameEmpty()
        {
            UserParam userParam = new UserParam(string.Empty);

            NUnit.Framework.Assert.IsNull(userParam.GetValue());
        }