private static void WriteXmlReport(TestReportCollection testReports, string xmlReportOutputPath, XmlReportType xmlReportType)
{
if (!string.IsNullOrEmpty(xmlReportOutputPath))
{
IXmlReport xmlReport = null;
switch (xmlReportType)
{
case XmlReportType.TFS:
xmlReport = new Core.Reporting.Providers.TFS.TFS2010.XmlReport(testReports);
break;
case XmlReportType.StatLight:
xmlReport = new XmlReport(testReports);
break;
default:
throw new StatLightException("Unknown XmlReportType chosen Name=[{0}], Value=[{1}]".FormatWith(xmlReportType.ToString(), (int)xmlReportType));
}
xmlReport.WriteXmlReport(xmlReportOutputPath);
"*********************************"
.WrapConsoleMessageWithColor(Settings.Default.ConsoleColorInformatoin, true);
"Wrote XML report to:{0}{1}"
.FormatWith(Environment.NewLine, new FileInfo(xmlReportOutputPath).FullName)
.WrapConsoleMessageWithColor(Settings.Default.ConsoleColorWarning, true);
"*********************************"
.WrapConsoleMessageWithColor(Settings.Default.ConsoleColorInformatoin, true);
}
}