Example #1
0
        public void WhenTheRegexIsNotMatchedReturnFalse()
        {
            const string filePath = @"path\to\file";
            var          regex    = new Regex(@"^((ht|f)tp(s?)\:)");

            var exclusion = new RegexExclusion(regex);

            Assert.IsFalse(exclusion.Exclude(filePath));
        }
Example #2
0
        public void WhenTheRegexIsMatchedReturnTrue()
        {
            const string filePath = @"http://local/image.png";
            var          regex    = new Regex(@"^((ht|f)tp(s?)\:)");

            var exclusion = new RegexExclusion(regex);

            Assert.IsTrue(exclusion.Exclude(filePath));
        }