public override string WriteResultsToFile(Jargon jargon) { if (results == null) { return(string.Empty); } string ret = GetResultsFilePath(); if (string.IsNullOrEmpty(ret)) { return(string.Empty); } OutputWriter formatter; switch (jargon) { case Jargon.NUnitV2: formatter = new NUnit2XmlOutputWriter(DateTime.UtcNow); break; case Jargon.NUnitV3: formatter = new NUnit3XmlOutputWriter(DateTime.UtcNow); break; default: throw new InvalidOperationException($"Jargon {jargon} is not supported by this runner."); } formatter.WriteResultFile(results, ret); return(ret); }
public override void WriteResultsToFile(TextWriter writer) { if (results == null) { return; } var resultsXml = new NUnit2XmlOutputWriter(DateTime.UtcNow); resultsXml.WriteResultFile(results, writer); }
public override string WriteResultsToFile() { if (results == null) { return(string.Empty); } string ret = GetResultsFilePath(); if (string.IsNullOrEmpty(ret)) { return(string.Empty); } var resultsXml = new NUnit2XmlOutputWriter(DateTime.UtcNow); resultsXml.WriteResultFile(results, ret); return(ret); }
public override void WriteResultsToFile(TextWriter writer, Jargon jargon) { if (results == null) { return; } OutputWriter formatter; switch (jargon) { case Jargon.NUnitV2: formatter = new NUnit2XmlOutputWriter(DateTime.UtcNow); break; case Jargon.NUnitV3: formatter = new NUnit3XmlOutputWriter(DateTime.UtcNow); break; default: throw new InvalidOperationException($"Jargon {jargon} is not supported by this runner."); } formatter.WriteResultFile(results, writer); }