public void WriteTo(ISessionWriter writer) { var prefix = string.IsNullOrEmpty(File) ? string.Empty : $"{File}({Line}:{Column}) "; writer.Write("{0}{1}.{2}:\n", prefix, Context, TestName); var sep = " -> "; if(!string.IsNullOrEmpty(ErrorsContext)) { writer.Info("given {0} ->\n", ErrorsContext); sep = string.Empty; } writer.Important("{1}{0}\n", Message, sep); StackFrames.ForEach(frame => writer.Write(" at {0}\n", frame)); }
public void WriteReport(ISessionWriter output) { output.Info("\n{0} tests found. {1} Passed. {2} Failed. ({3} Skipped)\n", Total, passed, Failed, Excluded); if (failures.Count > 0) { output.Write("\nFailures:\n"); failures.ForEach((n, failure) => { output.Write("{0}) ", 1 + n); failure.WriteTo(output); output.Write("\n"); }); } output.Info("Done in {0}.\n", timeTaken.Elapsed); }