public void AllIncludedIfNoConfigurationValuesAreSet()
 {
     this.mockConfig.Setup(x => x.AppSettings).Returns(new NameValueCollection());
     var candidate = new IgnoreDirectoriesFileFilter(this.mockConfig.Object).IncludeFile(TestLocalPath);
     Assert.IsTrue(candidate);
     candidate = new IgnoreDirectoriesFileFilter(this.mockConfig.Object).IncludeFile(TestUncPath);
     Assert.IsTrue(candidate);
 }
 private void TestIncludeFile(IEnumerable<string> directories, bool matchCase, bool includeFile)
 {
     var message = string.Empty;
     if (directories.Any())
     {
         message = directories.Aggregate((a, b) => a + "," + b);
     }
     this.mockConfig.Setup(x => x.AppSettings).Returns(new NameValueCollection { { "IgnoreDirectoriesFilterList", message }, { "IgnoreDirectoriesFilterMatchCase", matchCase ? "true" : "false" } });
     var candidate = new IgnoreDirectoriesFileFilter(this.mockConfig.Object).IncludeFile(TestLocalPath);
     Assert.AreEqual(candidate, includeFile, "localPath :" + message);
     candidate = new IgnoreDirectoriesFileFilter(this.mockConfig.Object).IncludeFile(TestUncPath);
     Assert.AreEqual(candidate, includeFile, "Unc Path :" + message);
 }
 public void DefaultIsCaseInsensitive()
 {
     this.mockConfig.Setup(x => x.AppSettings).Returns(new NameValueCollection { { "IgnoreDirectoriesFilterList", "Dev,Filedrop,multiple,all,incorrect,case" } });
     var candidate = new IgnoreDirectoriesFileFilter(this.mockConfig.Object).IncludeFile(TestLocalPath);
     Assert.IsFalse(candidate);
 }