public void GetChildFilesWithNullSearchPattern() { // Setup var fileSystem = new PathTree <string>(); var directory = new PathDirectory <string>(fileSystem, @"x:\mydirectory"); // Execute directory.Files(a_pattern: null); }
public void GetChildFilesBySearchPattern() { // Setup var fileSystem = new PathTree <string>(); fileSystem.CreateFile(@"x:\mydirectory\file1.dat", "Value"); fileSystem.CreateFile(@"x:\mydirectory\file2.dat", "Value"); fileSystem.CreateFile(@"x:\mydirectory\file3.css", "Value"); fileSystem.CreateFile(@"x:\mydirectory\otherdirectory\file4.dat", "Value"); var directory = new PathDirectory <string>(fileSystem, @"x:\mydirectory"); // Execute var filePaths = directory.Files("*.css"); // Assert Assert.AreEqual(1, filePaths.Count()); }
public void GetChildFilesWithNullSearchPattern() { // Setup var fileSystem = new PathTree<string>(); var directory = new PathDirectory<string>(fileSystem, @"x:\mydirectory"); // Execute directory.Files(a_pattern: null); }
public void GetChildFilesBySearchPattern() { // Setup var fileSystem = new PathTree<string>(); fileSystem.CreateFile(@"x:\mydirectory\file1.dat", "Value"); fileSystem.CreateFile(@"x:\mydirectory\file2.dat", "Value"); fileSystem.CreateFile(@"x:\mydirectory\file3.css", "Value"); fileSystem.CreateFile(@"x:\mydirectory\otherdirectory\file4.dat", "Value"); var directory = new PathDirectory<string>(fileSystem, @"x:\mydirectory"); // Execute var filePaths = directory.Files("*.css"); // Assert Assert.AreEqual(1, filePaths.Count()); }