Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public void DifferentPathIsNotMatched()
        {
            var rules = new[] { new PathExpiryRule()
                                {
                                    Path = "/example/"
                                } };
            var matcher = new PathRuleMatcher(rules);

            var result = matcher.MatchRule("/different/");

            Assert.IsNull(result);
        }
Ejemplo n.º 3
0
        public void PathWithTrailingSlashIsMatchedWithoutTrailingSlashInRule()
        {
            var rules = new[] { new PathExpiryRule()
                                {
                                    Path = "/example"
                                } };
            var matcher = new PathRuleMatcher(rules);

            var result = matcher.MatchRule("/example/");

            Assert.IsNotNull(result);
        }