public void TestLoopFilesByDir() { var path = @"C:\Smajobb\Misc\Test code\ReplaceIsNull\ReplaceIsNull"; var iter = new SimpleFileExtractor("*.cs"); var files = iter.ExtractFiles(path); Assert.AreEqual(10, files.Length); }
public override string[] ExtractFiles(string path) { var sortFileFinder = new SimpleFileExtractor(Constants.FileExecuteOrderFileName); var sortFilePath = sortFileFinder.ExtractFiles(path). ToList().FirstOrDefault(); Console.WriteLine(sortFilePath != null ? $"Sort file found ({sortFilePath})" : "No sort file found"); _sortFileStream = sortFilePath != null ? new FileIOStream(sortFilePath) : null; var sorter = new FileNameSorter(_sortFileStream, Constants.OutputFilename); var extractor = new SimpleFileExtractor(DefaultPattern); var files = extractor.ExtractFiles(path); return(sorter.SortFiles(files)); }