public void Run()
        {
            var runs = Substitute.For<IDynamicRuns>();
            runs.MinimumPeriodInSeconds.Returns(1);
            runs.MaximumPeriodInSeconds.Returns(100);
            runs.Run().Returns(Task.FromResult(false));

            var task = new BackoffRunner(runs);
            task.Run();

            var min = runs.Received().MinimumPeriodInSeconds;
            var max = runs.Received().MaximumPeriodInSeconds;
            runs.Received().Run();
        }
Exemplo n.º 2
0
        public void Run()
        {
            var runs = Substitute.For <IDynamicRuns>();

            runs.MinimumPeriodInSeconds.Returns(1);
            runs.MaximumPeriodInSeconds.Returns(100);
            runs.Run().Returns(Task.FromResult(false));

            var task = new BackoffRunner(runs);

            task.Run();

            var min = runs.Received().MinimumPeriodInSeconds;
            var max = runs.Received().MaximumPeriodInSeconds;

            runs.Received().Run();
        }