public virtual IEnumerable <string> GetDirectories(string path) { return(Paths.GroupBy(f => Path.GetDirectoryName(f.Key)) .SelectMany(g => IFileSystemExtensions.GetDirectories(g.Key)) .Where(f => Path.GetDirectoryName(f) != null && !String.IsNullOrEmpty(f) && Path.GetDirectoryName(f).Equals(path, StringComparison.OrdinalIgnoreCase)) .Distinct()); }
public void Setup() { fakeFileSystem = A.Fake <IFileSystem>(); fakeFileSystemExtensions = A.Fake <IFileSystemExtensions>(); underTest = new FileSyncLogic(fakeFileSystem); }