public async Task ReturningFalseCancelsTimerWithoutCancellationToken()
{
// Arrange
Mock<IAsynchronousDelay> delay = new Mock<IAsynchronousDelay>();
AsynchronousIntervalTimer timer = new AsynchronousIntervalTimer(delay.Object, TimeSpan.FromMilliseconds(PretendDelayInMilliseconds), false);
int repeatCount = 0;
// Act
await timer.ExecuteAsync(() =>
{
repeatCount++;
return Task.FromResult(false);
});
// Assert
Assert.AreEqual(1, repeatCount);
}