예제 #1
0
파일: Program.cs 프로젝트: gilind/workshop
        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();
        }
예제 #2
0
 public BusinessTests()
 {
     _manager = new FileManager();
 }
예제 #3
0
 // Commands, file and directory names are case insensitive. Cd, CD, Cd, cD does mean the same thing.
 public ParsingTests()
 {
     _manager = new FileManager();
 }