Exemplo n.º 1
0
        public void Write(TestResultSet testResults)
        {
            using (ConsoleColor.Green())
            {
                output.WriteResults("PASSED", testResults.Passed);
            }

            using (ConsoleColor.Yellow())
            {
                output.WriteResults("NOT RUN", testResults.NotExecuted);
            }

            using (ConsoleColor.Red())
            {
                output.WriteResults("FAILED", testResults.Failed);
            }

            output.WriteLine($"\nSUMMARY:");

            using (ConsoleColor.Green())
            {
                output.Write($"Passed: {testResults.Passed.Count()}, ");
            }

            using (ConsoleColor.Red())
            {
                output.Write($"Failed: {testResults.Failed.Count()}, ");
            }

            using (ConsoleColor.Yellow())
            {
                output.WriteLine($"Not run: {testResults.NotExecuted.Count()}");
            }
        }