public TestReportDocGenerator(IDocumentGenerator documentGenerator, TestResults testResults)
 {
     this.dg = documentGenerator;
     this.testResults = testResults;
 }
 public static void SaveTestResults(TestResults testResults, string fileName)
 {
     DataContractSerializer dcs = new DataContractSerializer(typeof(TestResults));
     XmlWriterSettings settings = new XmlWriterSettings() { Indent = true };
     using (XmlWriter writer = XmlWriter.Create(fileName, settings))
     {
         writer.WriteStartDocument();
         dcs.WriteObject(writer, testResults);
     }
 }