예제 #1
0
 [InlineData("::1", "::1")] // Brackets are added to the host before the comparison
 public void HostDoesntMatch(string host, string pattern)
 {
     Assert.False(HostString.MatchesAny(host, new StringSegment[] { pattern }));
 }
예제 #2
0
 public void HostMatchThrowsForBadPort()
 {
     Assert.Throws <FormatException>(() => HostString.MatchesAny("example.com:1abc", new StringSegment[] { "example.com" }));
 }
예제 #3
0
 public void HostMatches(string host, string pattern)
 {
     Assert.True(HostString.MatchesAny(host, new StringSegment[] { pattern }));
 }