public void When_a_query_throws_an_exception_first_time_It_retries()
        {
            var expectedResult = new object();
            var query = new ThrowsSecondTimeQuery<object>(expectedResult, new Options { Timeout = TimeSpan.FromMilliseconds(100), RetryInterval = TimeSpan.FromMilliseconds(10) });

            var actualReturnValue = new RetryUntilTimeoutTimingStrategy().Synchronise(query);

            Assert.That(query.Tries, Is.EqualTo(2));
            Assert.That(actualReturnValue, Is.SameAs(expectedResult));
        }
        public void When_an_action_throws_an_exception_first_time_It_retries()
        {
            var retryInterval = TimeSpan.FromMilliseconds(10);

            var result = new object();
            var query = new ThrowsSecondTimeQuery<object>(result,TimeSpan.FromMilliseconds(100),retryInterval);

            new RetryUntilTimeoutRobustWrapper().Robustly(query);

            Assert.That(query.Tries, Is.EqualTo(2));
        }
        public void When_a_query_throws_an_exception_first_time_It_retries()
        {
            var expectedResult = new object();
            var query = new ThrowsSecondTimeQuery<object>(expectedResult, TimeSpan.FromMilliseconds(100),TimeSpan.FromMilliseconds(10));

            var actualReturnValue = new RetryUntilTimeoutRobustWrapper().Robustly(query);

            Assert.That(query.Tries, Is.EqualTo(2));
            Assert.That(actualReturnValue, Is.SameAs(expectedResult));
        }
        public void When_an_action_throws_an_exception_first_time_It_retries()
        {
            var retryInterval = TimeSpan.FromMilliseconds(10);

            var result = new object();
            var query = new ThrowsSecondTimeQuery<object>(result,new Options{Timeout = TimeSpan.FromMilliseconds(100), RetryInterval = retryInterval});

            new RetryUntilTimeoutTimingStrategy().Synchronise(query);

            Assert.That(query.Tries, Is.EqualTo(2));
        }