AsyncMediator.Test.MediatorTests.CommandMissing_ShouldThrowEx C# (CSharp) Method

CommandMissing_ShouldThrowEx() private method

private CommandMissing_ShouldThrowEx ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task
        public async Task CommandMissing_ShouldThrowEx()
        {
            var handlerFactory = new MessageHandlerRegistry();
            var mediator = new Mediator(handlerFactory.MultiInstanceFactory, handlerFactory.SingleInstanceFactory);

            handlerFactory.AddHandlersForEvent(new List<IEventHandler<FakeEvent>>
            {
                _autoSubstitute.SubstituteFor<HandlerWithoutAdditionalEvents>()
            });

            await mediator.Send(new CommandMissing { Id = 1 });
        }