Пример #1
0
 void Processing()
 {
     Connected("N/A");
     using (var fs = new BlockingFileStream(Path)
     {
         Listener = this
     }) {
         using (var reader = new StreamReader(fs)) {
             string line;
             while ((line = reader.ReadLine()) != null)
             {
                 OutputWriter.WriteLine(line);
                 if (line.StartsWith("[Runner executing:", StringComparison.Ordinal))
                 {
                     Log.WriteLine("Tests have started executing");
                 }
                 else if (!XmlOutput && line.StartsWith("Tests run: ", StringComparison.Ordinal))
                 {
                     Log.WriteLine("Tests have finished executing");
                     Finished();
                     return;
                 }
                 else if (XmlOutput && line == "<!-- the end -->")
                 {
                     Log.WriteLine("Tests have finished executing");
                     Finished();
                     return;
                 }
             }
         }
     }
 }
Пример #2
0
 private void Processing()
 {
     Connected("N/A");
     using (var fs = new BlockingFileStream(Path, this))
     {
         using (var reader = new StreamReader(fs))
         {
             string line;
             while ((line = reader.ReadLine()) != null)
             {
                 TestLog.WriteLine(line);
                 if (line.StartsWith("[Runner executing:", StringComparison.Ordinal))
                 {
                     Log.WriteLine("Tests have started executing");
                 }
                 else if (!_xmlOutput && line.StartsWith("Tests run: ", StringComparison.Ordinal))
                 {
                     Log.WriteLine("Tests have finished executing");
                     break;
                 }
                 else if (_xmlOutput && line == "<!-- the end -->")
                 {
                     Log.WriteLine("Tests have finished executing");
                     break;
                 }
             }
         }
     }
     TestLog.Flush();
     Finished();
 }