Exemplo n.º 1
0
        public void OnFatalError(ExceptionResult exception)
        {
            string message;

            _server.TaskOutput(_runAssemblyTask, "Fatal error: " + exception.Message, TaskOutputType.STDOUT);
            _server.TaskException(_runAssemblyTask, ExceptionResultConverter.ConvertExceptions(exception, out message));
            _server.TaskFinished(_runAssemblyTask, message, TaskResult.Exception);

            _errors += 1;
        }
Exemplo n.º 2
0
        public void OnSpecificationEnd(SpecificationInfo specification, Result result)
        {
            var notify = CreateTaskNotificationFor(specification, _currentContext);

            NotifyRedirectedOutput(notify, specification);

            var    taskResult = TaskResult.Success;
            string message    = null;

            switch (result.Status)
            {
            case Status.Failing:
                _errors += 1;

                notify(task => _server.TaskException(task,
                                                     ExceptionResultConverter.ConvertExceptions(result.Exception, out message)));
                taskResult = TaskResult.Exception;
                break;

            case Status.Passing:
                _successes += 1;

                taskResult = TaskResult.Success;
                break;

            case Status.NotImplemented:
                notify(task => _server.TaskOutput(task, "Not implemented", TaskOutputType.STDOUT));
                message    = "Not implemented";
                taskResult = TaskResult.Inconclusive;
                break;

            case Status.Ignored:
                notify(task => _server.TaskOutput(task, "Ignored", TaskOutputType.STDOUT));
                taskResult = TaskResult.Skipped;
                break;
            }

            notify(task => _server.TaskFinished(task, message, taskResult));
        }