Пример #1
0
        /// <summary>
        /// Creates the message bus to be used for test execution. By default, it inspects
        /// the options for the <see cref="TestOptionsNames.Execution.SynchronousMessageReporting"/>
        /// flag, and if present, creates a message bus that ensures all messages are delivered
        /// on the same thread.
        /// </summary>
        /// <returns>The message bus.</returns>
        protected virtual IMessageBus CreateMessageBus()
        {
            if (ExecutionOptions.SynchronousMessageReportingOrDefault())
            {
                return(new SynchronousMessageBus(ExecutionMessageSink));
            }

            return(new MessageBus(ExecutionMessageSink, ExecutionOptions.StopOnTestFailOrDefault()));
        }