Skip to content

PollExpectationExtensions

Namespace: E2E.NUnit

public static class PollExpectationExtensions

NUnit constraints for Expect.Poll, in place of the upstream value matchers.

Inheritance: object

View source

ToMatchAsync<T>(PollExpectation<T>, IResolveConstraint, CancellationToken)

Section titled “ToMatchAsync<T>(PollExpectation<T>, IResolveConstraint, CancellationToken)”
public static Task ToMatchAsync<T>(this PollExpectation<T> poll, IResolveConstraint constraint, CancellationToken cancellationToken = default)

Re-reads the value until <code class=“paramref”>constraint</code> holds, such as Is.GreaterThan(3) or Has.Count.EqualTo(2).

Type parameters

Name Description
T

Parameters

Name Type Description
poll PollExpectation&lt;T&gt;
constraint IResolveConstraint
cancellationToken CancellationToken

Returns: Task

View source