Example #1
0
        public void PcNameCannotContainSpecialChars()
        {
            string result = UserFunctions.GetPcName();

            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(" "));
            Assert.IsFalse(result.Contains("_"));
        }
Example #2
0
 public void PcNameCannotStartWithDot()
 {
     Assert.IsFalse(UserFunctions.GetPcName().StartsWith("."));
 }
Example #3
0
 public void PcNameMinLength()
 {
     Assert.IsTrue(UserFunctions.GetPcName().Length > 0);
 }
Example #4
0
 public void PcNameMaxLength()
 {
     Assert.IsTrue(UserFunctions.GetPcName().Length < 16);
 }
Example #5
0
 public void PcNameCannotBeNull()
 {
     Assert.AreNotEqual(null, UserFunctions.GetPcName());
 }
Example #6
0
 public void PcNameCannotBeEmpty()
 {
     Assert.AreNotEqual("", UserFunctions.GetPcName());
 }