public void Should_NotThrowAsync_OnWait_WithHandledException([ValueSource(nameof(WaitWithHandledExceptionAsync))] Func <Func <bool>, IList <Type>, Task> action) { var i = 0; var exception = new AssertionException("Failure during conditional wait in handled exception"); Assert.DoesNotThrowAsync(() => action(() => { return(++i == 2 ? true : throw exception); }, new[] { exception.GetType() } ), nameof(Should_NotThrow_OnWait_WithHandledException)); }