public async Task Event_is_raised_with_given_correlationId([Frozen] IBus bus, [Frozen] Message message, NybusDispatcher sut, FirstTestEvent testEvent, IDictionary <string, string> headers) { await sut.RaiseEventAsync(testEvent, headers); Mock.Get(bus).Verify(p => p.RaiseEventAsync(testEvent, message.Headers.CorrelationId, It.IsAny <IDictionary <string, string> >()), Times.Once); }
public async Task Command_is_invoked_with_given_correlationId([Frozen] IBus bus, [Frozen] Message message, NybusDispatcher sut, FirstTestCommand testCommand, IDictionary <string, string> headers) { await sut.InvokeCommandAsync(testCommand, headers); Mock.Get(bus).Verify(p => p.InvokeCommandAsync(testCommand, message.Headers.CorrelationId, It.IsAny <IDictionary <string, string> >()), Times.Once); }