private static void ExecuteFiles(IFileReader fileReader, string[] files) { FileManager manager = new FileManager(); manager.Printed += Manager_Printed; for (int fileIndex = 0; fileIndex < files.Length; fileIndex++) { try { string fileName = files[fileIndex]; System.Console.WriteLine("file: " + fileName + ":"); System.Console.WriteLine("-------------------------------------------------------------------"); StringCollection comands = fileReader.Read(fileName); StringCollectionToConsole(comands); System.Console.WriteLine(); manager.Reset(); manager.ExecuteBatch(comands); System.Console.WriteLine(manager); System.Console.WriteLine(); } catch (Exception ex) { System.Console.WriteLine(manager); System.Console.WriteLine(ex.Message); System.Console.WriteLine(); } } Pause(); }
public BusinessTests() { _manager = new FileManager(); }
// Commands, file and directory names are case insensitive. Cd, CD, Cd, cD does mean the same thing. public ParsingTests() { _manager = new FileManager(); }