Skip to content

Commit

Permalink
let's be good citizen's and clear up after ourselves
Browse files Browse the repository at this point in the history
  • Loading branch information
smwhit committed May 12, 2010
1 parent be4d25d commit e251314
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions Reporting/TestExecutionReport/TestExecutionReportGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,22 @@ namespace TechTalk.SpecFlow.Reporting.TestExecutionReport
public class TestExecutionReportGenerator
{
public void GenerateNUnitXmlFromGallio(string xmlTestResult)
{
XmlTextReader xmlTextReader = new ResourceXmlReader(Assembly.GetExecutingAssembly(),
"TechTalk.SpecFlow.Reporting.TestExecutionReport.Gallio2NUnit.xslt");

XDocument doc = XDocument.Load(xmlTestResult);
var tranny = new XslCompiledTransform();
tranny.Load(xmlTextReader);
XmlReader reader = doc.CreateReader();
const string outputFileName = "TestResult.xml";
XmlWriter writer = XmlWriter.Create(outputFileName);

if (writer != null)
{
using (XmlTextReader xmlTextReader = new ResourceXmlReader(Assembly.GetExecutingAssembly(),
"TechTalk.SpecFlow.Reporting.TestExecutionReport.Gallio2NUnit.xslt"))
{
tranny.Transform(reader, writer);
writer.Close();
XDocument doc = XDocument.Load(xmlTestResult);
var tranny = new XslCompiledTransform();
tranny.Load(xmlTextReader);
XmlReader reader = doc.CreateReader();
const string outputFileName = "TestResult.xml";
XmlWriter writer = XmlWriter.Create(outputFileName);

if (writer != null)
{
tranny.Transform(reader, writer);
writer.Close();
}
}
}
}
Expand Down

0 comments on commit e251314

Please sign in to comment.