Beispiel #1
0
        public void BasicWildcardBothShouldBeTrue()
        {
            var processor = new PathExclusion();

            processor.AddExclusion("*/scripts/*");
            var result = processor.IsExcluded("/test/scripts/test.jpg");

            result.Should().BeTrue();
        }
Beispiel #2
0
        public void BasicWildcardEndShouldBeFalse()
        {
            var processor = new PathExclusion();

            processor.AddExclusion("/test/*");
            var result = processor.IsExcluded("/yolo/test.png");

            result.Should().BeFalse();
        }
Beispiel #3
0
        public void BasicCaseSensitiveTestShouldBeTrue()
        {
            var processor = new PathExclusion();

            processor.AddExclusion("/Test");
            var result = processor.IsExcluded("/test");

            result.Should().BeTrue();
        }
Beispiel #4
0
        public void BasicTestShouldBeFalse()
        {
            var processor = new PathExclusion();

            processor.AddExclusion("/asdf");
            var result = processor.IsExcluded("/test");

            result.Should().BeFalse();
        }
Beispiel #5
0
        public void BasicWildcardMiddleShouldBeFalse()
        {
            var processor = new PathExclusion();

            processor.AddExclusion("/Project/*.jpg");
            var result = processor.IsExcluded("/Project/test.png");

            result.Should().BeFalse();
        }