public void MessageHasBeenCalledOnce() { Act(); Thread.Sleep(5.Seconds()); Assert.That(_sampleHandler.NumberOfTimesIHaveBeenCalled(), Is.EqualTo(1)); }
public void BothHandlersAreTriggered() { Act(); Thread.Sleep(5.Seconds()); Assert.That(_handler1.NumberOfTimesIHaveBeenCalled(), Is.EqualTo(1)); Assert.That(_handler2.NumberOfTimesIHaveBeenCalled(), Is.EqualTo(1)); }
public async Task MessageHasBeenCalledOnce() { await Act(); await Task.Delay(5.Seconds()); _sampleHandler.NumberOfTimesIHaveBeenCalled().ShouldBe(1); }
public async Task BothHandlersAreTriggered() { await Act(); await Task.Delay(5.Seconds()); _handler1.NumberOfTimesIHaveBeenCalled().ShouldBe(1); _handler2.NumberOfTimesIHaveBeenCalled().ShouldBe(1); }