示例#1
0
        public void TestValidUserMasks()
        {
            var valid = new string[]
            {
            };

            foreach (var host in valid)
            {
                Assert.Equal(host, SourceTextParser.Parse(host));
                Assert.Equal(host, HostNameTextParser.Parse(host));
            }
        }
示例#2
0
        public void TestValidHostNames()
        {
            var valid = new string[]
            {
                "domain",
                "domain.tld",
                "sub.domain.tld",
                "p90.also.valid",
                "also.with-dash.tld"
            };

            foreach (var host in valid)
            {
                Assert.Equal(host, SourceTextParser.Parse(host));
                Assert.Equal(host, HostNameTextParser.Parse(host));
            }
        }