Ejemplo n.º 1
0
        private static void ReportSpec(SpecSession session, TestRun testRun, string computerName, SpecLog log)
        {
            var begin     = session.Begin.Value;
            var beginTime = session.Begin.Time;

            var test       = testRun.AddUnitTest(begin.ClassName, begin.MethodName, $"{begin.ClassName}.{begin.MethodName}");
            var specResult = test.AddResult(begin.MethodName, computerName);

            var nodeResults = new Dictionary <int, UnitTestResult>();

            ReportNodes(begin, specResult, beginTime, nodeResults);
            ReportSuccess(session, nodeResults);
            ReportFailure(session, nodeResults, log);

            specResult.Outcome   = GetCombinedTestOutcome(nodeResults.Values);
            specResult.StartTime = beginTime;
            specResult.EndTime   = session.End.Time;

            ReportTestMessages(session, nodeResults, specResult, log);
        }