Skip to main content

Behaviour

Describes the possible expectations for code that runs: delegates, tasks, events and callbacks.

PageExpectations
DelegatesThrows, ThrowsExactly, DoesNotThrow, the thrown exception, ExecutesIn, Eventually
Tasksthe delegate expectations for a running Task or ValueTask, the result of a Task<T>
EventsTriggered, DidNotTrigger, TriggeredPropertyChanged, TriggeredPropertyChangedFor
CallbacksSignaled, DidNotSignal on a Signaler

Many of these expectations wait: for a delegate or a task to complete, for callbacks to be signaled, or with Within(…) for events to be triggered. Time and cancellation describes how long they wait, how WithTimeout(…) and WithCancellation(…) limit it, and how a timeout or a cancellation is reported.