示例#1
0
        public void UserNameCannotContainSpecialChars()
        {
            string result = UserFunctions.GetUsername();

            Assert.IsFalse(result.Contains("\""));
            Assert.IsFalse(result.Contains("/"));
            Assert.IsFalse(result.Contains(@"\"));
            Assert.IsFalse(result.Contains("["));
            Assert.IsFalse(result.Contains("]"));
            Assert.IsFalse(result.Contains(":"));
            Assert.IsFalse(result.Contains(";"));
            Assert.IsFalse(result.Contains("|"));
            Assert.IsFalse(result.Contains("="));
            Assert.IsFalse(result.Contains(","));
            Assert.IsFalse(result.Contains("+"));
            Assert.IsFalse(result.Contains("*"));
            Assert.IsFalse(result.Contains("?"));
            Assert.IsFalse(result.Contains("<"));
            Assert.IsFalse(result.Contains(">"));
        }
示例#2
0
 public void UserNameMinLength()
 {
     Assert.IsTrue(UserFunctions.GetUsername().Length > 0);
 }
示例#3
0
 public void UserNameCannotBeNull()
 {
     Assert.AreNotEqual(null, UserFunctions.GetUsername());
 }
示例#4
0
 public void UserNameMaxLength()
 {
     Assert.IsTrue(UserFunctions.GetUsername().Length < 16);
 }
示例#5
0
 public void UserNameCannotBeEmpty()
 {
     Assert.AreNotEqual("", UserFunctions.GetUsername());
 }