public async Task Should_throw_argument_exception_for_send_when_request_is_null() { var container = new Container(cfg => { cfg.Scan(scanner => { scanner.AssemblyContainingType(typeof(NullPing)); scanner.IncludeNamespaceContainingType <Ping>(); scanner.WithDefaultConventions(); scanner.AddAllTypesOf(typeof(IRequestHandler <,>)); }); }); var mediator = new Mediator(container.GetInstance); NullPing request = null; await Should.ThrowAsync <ArgumentNullException>(async() => await mediator.Send(request)); }
public async Task Should_throw_argument_exception_for_send_when_request_is_null() { NullPing request = null; await Should.ThrowAsync <ArgumentNullException>(async() => await Mediator.Send(request)); }