public void ReadSingleInputFile()
 {
     var writer = new StreamWriter(@"C:\temp\input_1.txt");
     writer.Write("input\r\ntest\r\none\r\n");
     writer.Close();
     var reader = new InputReader();
     var readerString = reader.readFile(@"C:\temp\input_1.txt");
     Assert.AreEqual("input\r\ntest\r\none\r\n", readerString);
     File.Delete(@"C:\temp\input_1.txt");
 }
Ejemplo n.º 2
0
 static void Main(string[] args)
 {
     // iterate through arguments
     for (int i = 0; i < args.Length; i++)
     {
         if (File.Exists(args[i])) // Checks to see if the file really exists
         {
             InputReader reader = new InputReader();
             TextParser parser = new TextParser();
             OutputPrinter printer = new OutputPrinter();
             printer.printOutputList(parser.ParseSortedList(reader.readFile(args[i])), args[i].ToString());
         }
     }
 }