public async Task Should_clear_all_consumers() { consumer1.Setup(x => x.ClearAsync()).Returns(TaskHelper.Done).Verifiable(); consumer2.Setup(x => x.ClearAsync()).Returns(TaskHelper.Done).Verifiable(); var sut = new CompoundEventConsumer("consumer-name", consumer1.Object, consumer2.Object); await sut.ClearAsync(); consumer1.VerifyAll(); consumer2.VerifyAll(); }
public async Task Should_clear_all_consumers() { A.CallTo(() => consumer1.ClearAsync()). Returns(TaskHelper.Done); A.CallTo(() => consumer2.ClearAsync()) .Returns(TaskHelper.Done); var sut = new CompoundEventConsumer("consumer-name", consumer1, consumer2); await sut.ClearAsync(); A.CallTo(() => consumer1.ClearAsync()).MustHaveHappened(); A.CallTo(() => consumer2.ClearAsync()).MustHaveHappened(); }