Method NotRaisedAnyAsync
- Namespace
- Xunit
- Assembly
- xunit.v3.assert.dll
NotRaisedAnyAsync(Action<Action>, Action<Action>, Func<Task>)
Verifies that an event is not raised.
public static Task NotRaisedAnyAsync(Action<Action> attach, Action<Action> detach, Func<Task> testCode)
Parameters
attachAction<Action>Code to attach the event handler
detachAction<Action>Code to detach the event handler
testCodeFunc<Task>A delegate to the code to be tested
Returns
Exceptions
Thrown when an unexpected event was raised.
NotRaisedAnyAsync<T>(Action<Action<T>>, Action<Action<T>>, Func<Task>)
Verifies that an event with the exact or a derived event args is not raised.
public static Task NotRaisedAnyAsync<T>(Action<Action<T>> attach, Action<Action<T>> detach, Func<Task> testCode)
Parameters
attachAction<Action<T>>Code to attach the event handler
detachAction<Action<T>>Code to detach the event handler
testCodeFunc<Task>A delegate to the code to be tested
Returns
Type Parameters
TThe type of the event arguments to expect
Exceptions
Thrown when an unexpected event was raised.
NotRaisedAnyAsync<T>(Action<EventHandler<T>>, Action<EventHandler<T>>, Func<Task>)
Verifies that an event with the exact or a derived event args is not raised.
public static Task NotRaisedAnyAsync<T>(Action<EventHandler<T>> attach, Action<EventHandler<T>> detach, Func<Task> testCode)
Parameters
attachAction<EventHandler<T>>Code to attach the event handler
detachAction<EventHandler<T>>Code to detach the event handler
testCodeFunc<Task>A delegate to the code to be tested
Returns
Type Parameters
TThe type of the event arguments to expect
Exceptions
Thrown when an unexpected event was raised.