public void ThrowIfQueryProcessorNotRegistered(Query query) { var emitter = new DependencyCollection() .AddEmitter() .BuildProvider() .GetRequired <IEmitter>(); emitter.Awaiting(e => e.Ask(query, CancellationToken)) .Should().Throw <KeyNotFoundException>(); emitter.Awaiting(e => e.Ask <Query, Boo>(query, CancellationToken)) .Should().Throw <KeyNotFoundException>(); }
public void ThrowIfCommandProcessorNotRegistered(Command command) { var emitter = new DependencyCollection() .AddEmitter() .BuildProvider() .GetRequired <IEmitter>(); emitter.Awaiting(e => e.Execute(command, CancellationToken)) .Should().Throw <KeyNotFoundException>(); emitter.Awaiting(e => e.Send(command, CancellationToken)) .Should().Throw <KeyNotFoundException>(); }