An awaitable verification result returns itself from `Within` and `WithCancellation` and overwrites its timeout or token, so a caller that only wants to bound a single wait, like `aweXpect.Mockolate` with the token of its evaluation, could only do so by permanently replacing what the user configured on the result. As the configured token cannot be read either, there was no way to combine it with another one from the outside.
The new overload links the given token with the configured timeout and token for this call only and leaves the result unchanged.
A cancellation of the given token throws an `OperationCanceledException` with that token, while the configured timeout and token still throw a `MockVerificationTimeoutException`. This lets the caller tell its own cancellation apart from a limit configured on the result, and bound a single wait in time by canceling the given token after a delay instead of calling `Within`.
Adding the member to `IAsyncVerificationResult` is a breaking change for external implementations of the interface, which are not expected, as the only way to get one is from a `VerificationResult<TVerify>`.
An awaitable verification result returns itself from
WithinandWithCancellationand overwrites its timeout or token, so a caller that only wants to bound a single wait, likeaweXpect.Mockolatewith the token of its evaluation, could only do so by permanently replacing what the user configured on the result. As the configured token cannot be read either, there was no way to combine it with another one from the outside.The new overload links the given token with the configured timeout and token for this call only and leaves the result unchanged.
A cancellation of the given token throws an
OperationCanceledExceptionwith that token, while the configured timeout and token still throw aMockVerificationTimeoutException. This lets the caller tell its own cancellation apart from a limit configured on the result, and bound a single wait in time by canceling the given token after a delay instead of callingWithin.Adding the member to
IAsyncVerificationResultis a breaking change for external implementations of the interface, which are not expected, as the only way to get one is from aVerificationResult<TVerify>.