public void NoInvalidDirectoryPathCharacters()
        {
            char[] ch   = Path.GetInvalidPathChars();
            string name = new string(ch);

            Assert.IsFalse(WebReference.IsValidReferenceName(name));
        }
Ejemplo n.º 2
0
        bool ValidateNamespace()
        {
            if (String.IsNullOrEmpty(defaultNameSpace))
            {
                ServiceDescriptionMessage = "No namespace specified.";
                return(false);
            }

            if (!WebReference.IsValidNamespace(defaultNameSpace) || !WebReference.IsValidReferenceName(defaultNameSpace))
            {
                ServiceDescriptionMessage = "Namespace contains invalid characters.";
            }
            return(true);
        }
 public void ValidReferenceName()
 {
     Assert.IsTrue(WebReference.IsValidReferenceName("a"));
 }
 public void ReferenceNameCannotContainABackslash()
 {
     Assert.IsFalse(WebReference.IsValidReferenceName("ab\\c"));
 }
 public void EmptyStringIsNotAValidReferenceName()
 {
     Assert.IsFalse(WebReference.IsValidReferenceName(String.Empty));
 }