private async Task <CommandBusResult> Execute(ICommandPipeline pipeline, ICommand cmd) { InMemoryCommandBus sut = GetSut(pipeline); CommandBusResult result = await sut.EnqueueAsync(cmd); return(result); }
private Task <CommandBusResult> Execute(ICommandPipeline pipeline, ICommand command) { InMemoryCommandBus bus = GetSut(pipeline); bus.WithCondition(i => { var temp = i as SampleCommand; return(temp.Value == 42); }); return(bus.EnqueueAsync(command)); }
private async Task <CommandBusResult> Execute() { CommandBusResult result = await sut.EnqueueAsync(new SampleCommand()); return(result); }