Tests.TryUntilNoExceptionTest.TestTryUntilNoExceptionSuccessFirstTime C# (CSharp) Method

TestTryUntilNoExceptionSuccessFirstTime() private method

private TestTryUntilNoExceptionSuccessFirstTime ( ) : void
return void
        public void TestTryUntilNoExceptionSuccessFirstTime()
        {
            var times = 0;
            var generator = new Generator(times);
            bool result = false;
            Expect(RetryHelperTest.CountTime(() =>
                result = _target.Try(() => generator.Next()).Until(t => t)),
                EqualTo(RetryHelperTest.Interval * times).Within(RetryHelperTest.Tolerance));
            Expect(generator.TriedTimes, EqualTo(times + 1));
            Expect(result, True);
        }