AccidentalFish.ApplicationSupport.Core.Tests.Unit.Policies.Implementation.AsynchronousIntervalTimerTests.DelayOnExecuteWaitsForIntervalBeforeFirstTaskWithoutCancellationToken C# (CSharp) Метод

DelayOnExecuteWaitsForIntervalBeforeFirstTaskWithoutCancellationToken() приватный Метод

        public async Task DelayOnExecuteWaitsForIntervalBeforeFirstTaskWithoutCancellationToken()
        {
            // Arrange
            Mock<IAsynchronousDelay> delay = new Mock<IAsynchronousDelay>();
            AsynchronousIntervalTimer timer = new AsynchronousIntervalTimer(delay.Object, TimeSpan.FromMilliseconds(PretendDelayInMilliseconds), true);

            // Act
            await timer.ExecuteAsync(() => Task.FromResult(false));

            // Assert
            delay.Verify(x => x.Delay(TimeSpan.FromMilliseconds(PretendDelayInMilliseconds)));
        }
    }