public void ShouldReportPassFailSkipCounts() { using (var console = new RedirectedConsole()) { var listener = new ConsoleListener(); var assembly = typeof(ConsoleListener).Assembly; var version = assembly.GetName().Version; var assemblyResult = new AssemblyResult(assembly.Location); var conventionResult = new ConventionResult("Fake Convention"); var classResult = new ClassResult("Fake Class"); assemblyResult.Add(conventionResult); conventionResult.Add(classResult); classResult.Add(CaseResult.Passed("A", TimeSpan.Zero)); classResult.Add(CaseResult.Failed("B", TimeSpan.Zero, new ExceptionInfo(new Exception(), new AssertionLibraryFilter()))); classResult.Add(CaseResult.Failed("C", TimeSpan.Zero, new ExceptionInfo(new Exception(), new AssertionLibraryFilter()))); classResult.Add(CaseResult.Skipped("D", "Reason")); classResult.Add(CaseResult.Skipped("E", "Reason")); classResult.Add(CaseResult.Skipped("F", "Reason")); listener.AssemblyCompleted(assembly, assemblyResult); console.Lines().ShouldEqual(string.Format("1 passed, 2 failed, 3 skipped, took {0} seconds (Fixie {1}).", 0.ToString("N2", CultureInfo.CurrentCulture), version)); } }
public void ShouldReportPassFailSkipCounts() { using (var console = new RedirectedConsole()) { var listener = new ConsoleListener(); var assembly = typeof(ConsoleListener).Assembly; var version = assembly.GetName().Version; var assemblyResult = new AssemblyResult(assembly.Location); var conventionResult = new ConventionResult("Fake Convention"); var classResult = new ClassResult("Fake Class"); assemblyResult.Add(conventionResult); conventionResult.Add(classResult); classResult.Add(CaseResult.Passed("A", TimeSpan.Zero)); classResult.Add(CaseResult.Failed("B", TimeSpan.Zero, "Message", "Stack Trace", "Exception Type")); classResult.Add(CaseResult.Failed("C", TimeSpan.Zero, "Message", "Stack Trace", "Exception Type")); classResult.Add(CaseResult.Skipped("D", "Reason")); classResult.Add(CaseResult.Skipped("E", "Reason")); classResult.Add(CaseResult.Skipped("F", "Reason")); listener.AssemblyCompleted(assembly, assemblyResult); console.Lines().ShouldEqual("1 passed, 2 failed, 3 skipped, took 0.00 seconds (Fixie " + version + ")."); } }
public void ShouldReportPassFailSkipCounts() { using (var console = new RedirectedConsole()) { var listener = new ConsoleListener(); var assembly = typeof(ConsoleListener).Assembly; var version = assembly.GetName().Version; listener.AssemblyCompleted(assembly, new AssemblyResult(1, 2, 3)); console.Lines().ShouldEqual("1 passed, 2 failed, 3 skipped (Fixie " + version + ")."); } }