예제 #1
0
        private void InitData()
        {
            Model = new AboutWindowModel();

            Model.Username = UserFunctions.GetFQDN();
            Model.AppBuild = AppFunctions.GetAppBuild();
        }
예제 #2
0
        public void FqdnCannotContainSpecialChars()
        {
            string result = UserFunctions.GetFQDN();

            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("_"));

            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(">"));
        }
예제 #3
0
 public void FqdnCannotStartWithDot()
 {
     Assert.IsFalse(UserFunctions.GetFQDN().StartsWith("."));
 }
예제 #4
0
 public void FqdnMinLength()
 {
     Assert.IsTrue(UserFunctions.GetFQDN().Length > 0);
 }
예제 #5
0
 public void FqdnCannotBeNull()
 {
     Assert.AreNotEqual(null, UserFunctions.GetFQDN());
 }
예제 #6
0
 public void FqdnCannotBeEmpty()
 {
     Assert.AreNotEqual("", UserFunctions.GetFQDN());
 }
예제 #7
0
파일: LoginVM.cs 프로젝트: KohrAhr/XTask
 private void InitData()
 {
     Model          = new LoginModel();
     Model.Domain   = UserFunctions.GetDomainOrPcName();
     Model.Username = UserFunctions.GetFQDN();
 }