public void When_state_exists_It_returns_immediately()
        {
            var toTry          = new CountTriesAction(options);
            var retryInterval1 = TimeSpan.FromMilliseconds(10);
            var until          = new AlwaysSucceedsPredicateQuery(true, TimeSpan.Zero, retryInterval1);

            retryUntilTimeoutRobustWrapper.TryUntil(toTry, until, TimeSpan.FromMilliseconds(20), retryInterval1);

            Assert.That(toTry.Tries, Is.EqualTo(1));
        }
Ejemplo n.º 2
0
        public void When_state_exists_It_returns_immediately()
        {
            var tries = 0;

            Action      toTry = () => tries++;
            Func <bool> until = () => true;

            retryUntilTimeoutRobustWrapper.TryUntil(toTry, until, TimeSpan.FromMilliseconds(20));

            Assert.That(tries, Is.EqualTo(1));
        }