public void FastRecursiveDirectoryListing() { using (var a = TemporaryFile.CreateDirectory(Path.Combine(Path.GetTempPath(), "a"))) using (var aa = TemporaryFile.CreateDirectory(Path.Combine(a.Path, "aa"))) using (var ab = TemporaryFile.CreateDirectory(Path.Combine(a.Path, "ab"))) using (var aaa = TemporaryFile.CreateDirectory(Path.Combine(aa.Path, "aaa"))) { var directories = DirectorySearcher.GetDirectoriesFast(a.Path); Assert.That(directories.Select(dir => dir.FullName), Is.EquivalentTo(new[] { ab.Path, aaa.Path })); } }