public void ShouldBeIncluded(string pathTemplate) { var path = pathTemplate.Replace("{sep}", $"{Path.DirectorySeparatorChar}"); var actual = DirectoryExclusions.PathIsExcluded(path); Assert.That(actual, Is.False); }
public void ShouldBeExcluded(string pathTemplate) { var path = pathTemplate.Replace("{sep}", $"{Path.DirectorySeparatorChar}", StringComparison.OrdinalIgnoreCase); var actual = DirectoryExclusions.PathIsExcluded(path); Assert.That(actual, Is.True); }
public void ShouldBeExcluded(string pathTemplate) { if (string.IsNullOrWhiteSpace(pathTemplate)) { throw new ArgumentNullException(nameof(pathTemplate)); } string path = ExpandTemplate(pathTemplate); var exclusions = new DirectoryExclusions(); var actual = exclusions.PathIsExcluded(path); Assert.That(actual, Is.True); }