public void IsMatchWithCaseInsensitiveReturnsFalseForNearMatch() { // Arrange. const string Path = "/WebApp/Administration/Test.aspx?Param1=42&Param2=No"; const string Pattern = "/webapp/administration/test.aspx?param1=42¶m2=yes"; var matcher = new ExactPathMatcher(); // Act. var result = matcher.IsMatch(Path, Pattern, true); // Assert. Assert.False(result); }
public void IsMatchReturnsFalseForMissingQuery() { // Arrange. const string Path = "/WebApp/Administration/Test.aspx?Param1=42&Param2=No"; const string Pattern = "/WebApp/Administration/Test.aspx"; var matcher = new ExactPathMatcher(); // Act. var result = matcher.IsMatch(Path, Pattern, true); // Assert. Assert.False(result); }
public void IsMatchWithCaseSensitiveReturnsTrueForExactMatch() { // Arrange. const string Path = "/WebApp/Administration/Test.aspx?Param1=42&Param2=No"; const string Pattern = "/WebApp/Administration/Test.aspx?Param1=42&Param2=No"; var matcher = new ExactPathMatcher(); // Act. var result = matcher.IsMatch(Path, Pattern, false); // Assert. Assert.True(result); }