public async Task ShouldSetMessageOnContext() { var incommingEnvelopeContext = A.Fake <IncommingEnvelopeContext>(); var testee = new FinalIncommingEnvelopeStep(); await testee.InvokeAsync(incommingEnvelopeContext, null).ConfigureAwait(false); A.CallTo(() => incommingEnvelopeContext.SetMessage()).MustHaveHappened(); }
public async Task DoesNotCallNext() { var incommingEnvelopeContext = A.Fake <IncommingEnvelopeContext>(); var next = A.Fake <Func <Task> >(); var testee = new FinalIncommingEnvelopeStep(); await testee.InvokeAsync(incommingEnvelopeContext, next).ConfigureAwait(false); A.CallTo(() => next.Invoke()).MustNotHaveHappened(); }