Exemplo n.º 1
0
 /// <summary>
 /// Wait until the provided <paramref name="statePredicate"/> action returns true,
 /// or the <paramref name="timeout"/> is reached (default is one second).
 ///
 /// The <paramref name="statePredicate"/> is evaluated initially, and then each time
 /// the renderer in the test context renders.
 /// </summary>
 /// <param name="statePredicate">The predicate to invoke after each render, which returns true when the desired state has been reached.</param>
 /// <param name="timeout">The maximum time to wait for the desired state.</param>
 /// <exception cref="WaitForStateFailedException">Thrown if the <paramref name="statePredicate"/> throw an exception during invocation, or if the timeout has been reached. See the inner exception for details.</exception>
 protected void WaitForState(Func <bool> statePredicate, TimeSpan?timeout = null)
 => RenderWaitingHelperExtensions.WaitForState(this, statePredicate, timeout);
Exemplo n.º 2
0
 /// <summary>
 /// Wait until the provided <paramref name="assertion"/> action passes (i.e. does not throw an
 /// assertion exception), or the <paramref name="timeout"/> is reached (default is one second).
 ///
 /// The <paramref name="assertion"/> is attempted initially, and then each time
 /// the renderer in the test context renders.
 /// </summary>
 /// <param name="assertion">The verification or assertion to perform.</param>
 /// <param name="timeout">The maximum time to attempt the verification.</param>
 /// <exception cref="WaitForAssertionFailedException">Thrown if the timeout has been reached. See the inner exception to see the captured assertion exception.</exception>
 protected void WaitForAssertion(Action assertion, TimeSpan?timeout = null)
 => RenderWaitingHelperExtensions.WaitForAssertion(this, assertion, timeout);
Exemplo n.º 3
0
 protected void WaitForNextRender(Action?renderTrigger = null, TimeSpan?timeout = null)
 => RenderWaitingHelperExtensions.WaitForNextRender(this, renderTrigger, timeout);