InterfaceIAction<TContainer>
Exposes options for configuring what happens when an arranged void member is called.
Definition
Namespace:Telerik.JustMock.Expectations.Abstraction
Assembly:Telerik.JustMock.dll
Type Parameters:
TContainer
Syntax:
public interface IAction<TContainer> : IDoInstead<TContainer>, IThrows<TContainer>, IAssertable, IMustBeCalled, ISetupBehavior, IOccurrence, IOrder, IPrerequisite, IDisposable
Derived Classes:
Inherited Members
Methods
DoNothing()
Leaves the arranged void call without additional behavior.
Declaration
IAssertable DoNothing()
Returns
The current expectation so that you can continue the arrangement. Reference to IAssertable
Remarks
Use this method when you want the call to succeed without throwing or running custom logic. Loose mocks already behave this way by default.
Raises(Action, EventArgs)
Raises the specified event when the arranged call occurs.
Declaration
TContainer Raises(Action eventExpression, EventArgs args)
Parameters
eventExpression
Expression that identifies the event to raise.
args
Event arguments to pass to the handler.
Returns
TContainer
The current expectation so that you can continue the arrangement.
Exceptions
Thrown when JustMock cannot resolve the event expression.
Raises(Action, params object[])
Raises the specified event when the arranged call occurs.
Declaration
TContainer Raises(Action eventExpression, params object[] args)
Parameters
eventExpression
Expression that identifies the event to raise.
args
object[]
Arguments to pass to the event handler delegate.
Returns
TContainer
The current expectation so that you can continue the arrangement.
Exceptions
Thrown when JustMock cannot resolve the event expression.
Raises<T1, T2, T3, T4>(Action, Func<T1, T2, T3, T4, EventArgs>)
Raises the specified event when the arranged call occurs.
Declaration
TContainer Raises<T1, T2, T3, T4>(Action eventExpression, Func<T1, T2, T3, T4, EventArgs> func)
Parameters
eventExpression
Expression that identifies the event to raise.
func
Func<T1, T2, T3, T4, EventArgs>
Function that creates the event arguments from the arranged call arguments.
Returns
TContainer
The current expectation so that you can continue the arrangement.
Exceptions
Thrown when JustMock cannot resolve the event expression.
Raises<T1, T2, T3>(Action, Func<T1, T2, T3, EventArgs>)
Raises the specified event when the arranged call occurs.
Declaration
TContainer Raises<T1, T2, T3>(Action eventExpression, Func<T1, T2, T3, EventArgs> func)
Parameters
eventExpression
Expression that identifies the event to raise.
func
Function that creates the event arguments from the arranged call arguments.
Returns
TContainer
The current expectation so that you can continue the arrangement.
Exceptions
Thrown when JustMock cannot resolve the event expression.
Raises<T1, T2>(Action, Func<T1, T2, EventArgs>)
Raises the specified event when the arranged call occurs.
Declaration
TContainer Raises<T1, T2>(Action eventExpression, Func<T1, T2, EventArgs> func)
Parameters
eventExpression
Expression that identifies the event to raise.
func
Function that creates the event arguments from the arranged call arguments.
Returns
TContainer
The current expectation so that you can continue the arrangement.
Exceptions
Thrown when JustMock cannot resolve the event expression.
Raises<T1>(Action, Func<T1, EventArgs>)
Raises the specified event when the arranged call occurs.
Declaration
TContainer Raises<T1>(Action eventExpression, Func<T1, EventArgs> func)
Parameters
eventExpression
Expression that identifies the event to raise.
func
Function that creates the event arguments from the arranged call arguments.
Returns
TContainer
The current expectation so that you can continue the arrangement.
Exceptions
Thrown when JustMock cannot resolve the event expression.