Tests.TryUntilNoExceptionTest.TestTryUntilNoExceptionOfTypeHavingOtherException C# (CSharp) Method

TestTryUntilNoExceptionOfTypeHavingOtherException() private method

private TestTryUntilNoExceptionOfTypeHavingOtherException ( ) : void
return void
        public void TestTryUntilNoExceptionOfTypeHavingOtherException()
        {
            var times = 10;
            var generator = new Generator(times, true);
            generator.RandomExceptionType = true;
            bool result = false;
            Expect(() =>
                result = _target.Try(() => generator.Next()).UntilNoException<ApplicationException>(),
                Throws.TypeOf<InvalidOperationException>());
            Expect(result, False);
        }