public void ChildPathIsNotMatchedWithoutWildcard() { var rules = new[] { new PathExpiryRule() { Path = "/example/", ApplyToDescendantPages = false } }; var matcher = new PathRuleMatcher(rules); var result = matcher.MatchRule("/example/child/"); Assert.IsNull(result); }
public void DifferentPathIsNotMatched() { var rules = new[] { new PathExpiryRule() { Path = "/example/" } }; var matcher = new PathRuleMatcher(rules); var result = matcher.MatchRule("/different/"); Assert.IsNull(result); }
public void PathWithTrailingSlashIsMatchedWithoutTrailingSlashInRule() { var rules = new[] { new PathExpiryRule() { Path = "/example" } }; var matcher = new PathRuleMatcher(rules); var result = matcher.MatchRule("/example/"); Assert.IsNotNull(result); }