public void AcceptsAnything(string value, bool caseSensitive)
        {
            var segment = new GlobParser().ParseSingleSegment <WildcardMultiSegment>("**");

            var match = segment.Match(value, caseSensitive);

            Assert.That(match.Success, Is.True);
        }
Exemplo n.º 2
0
        public void AcceptsMatchingCaseSensitivePathSegment()
        {
            var segment = new GlobParser().ParseSingleSegment <WildcardSegment>("dir*ory");

            var match = segment.Match("directory", true);

            Assert.That(match.Success, Is.True);
        }
Exemplo n.º 3
0
        public void RejectsNonMatchingCaseSensitivePathSegment()
        {
            var segment = new GlobParser().ParseSingleSegment <FixedSegment>("directory");

            var match = segment.Match("DIRectoRy", true);

            Assert.That(match.Success, Is.False);
        }
Exemplo n.º 4
0
        public void RejectsNonMatchingCaseInsensitivePathSegment()
        {
            var segment = new GlobParser().ParseSingleSegment <WildcardSegment>("dir*ory");

            var match = segment.Match("something", false);

            Assert.That(match.Success, Is.False);
        }
Exemplo n.º 5
0
        public void AcceptsMatchingCaseInsensitivePathSegment()
        {
            var segment = new GlobParser().ParseSingleSegment <FixedSegment>("directory");

            var match = segment.Match("DIRectoRy", false);

            Assert.That(match.Success, Is.True);
        }