Interface
IAction<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:

cs-api-definition
public interface IAction<TContainer> : IDoInstead<TContainer>, IThrows<TContainer>, IAssertable, IMustBeCalled, ISetupBehavior, IOccurrence, IOrder, IPrerequisite, IDisposable

Derived Classes: ActionExpectationCollectionExpectation<TReturn>CommonExpectation<TContainer>FuncExpectation<TReturn>

Inherited Members IDoInstead<TContainer>.DoInstead(Action)IDoInstead<TContainer>.DoInstead(Delegate)IDoInstead<TContainer>.DoInstead<T1>(Action<T1>)IDoInstead<TContainer>.DoInstead<T1, T2>(Action<T1, T2>)IDoInstead<TContainer>.DoInstead<T1, T2, T3>(Action<T1, T2, T3>)IDoInstead<TContainer>.DoInstead<T1, T2, T3, T4>(Action<T1, T2, T3, T4>)IDoInstead<TContainer>.DoInstead<T1, T2, T3, T4, T5>(Action<T1, T2, T3, T4, T5>)IDoInstead<TContainer>.DoInstead<T1, T2, T3, T4, T5, T6>(Action<T1, T2, T3, T4, T5, T6>)IDoInstead<TContainer>.DoInstead<T1, T2, T3, T4, T5, T6, T7>(Action<T1, T2, T3, T4, T5, T6, T7>)IDoInstead<TContainer>.DoInstead<T1, T2, T3, T4, T5, T6, T7, T8>(Action<T1, T2, T3, T4, T5, T6, T7, T8>)IDoInstead<TContainer>.DoInstead<T1, T2, T3, T4, T5, T6, T7, T8, T9>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9>)IDoInstead<TContainer>.DoInstead<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>)IDoInstead<TContainer>.DoInstead<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>)IDoInstead<TContainer>.DoInstead<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>)IDoInstead<TContainer>.DoInstead<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>)IDoInstead<TContainer>.DoInstead<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>)IDoInstead<TContainer>.DoInstead<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>)IDoInstead<TContainer>.DoInstead<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>)IThrows<TContainer>.Throws(Exception)IThrows<TContainer>.Throws<T>()IThrows<TContainer>.Throws<T>(params object[])IThrows<TContainer>.ThrowsAsync(Exception)IThrows<TContainer>.ThrowsAsync<T>()IThrows<TContainer>.ThrowsAsync<T>(params object[])IAssertable.CallOriginal()IMustBeCalled.MustBeCalled(string)ISetupBehavior.InSequence()ISetupBehavior.OnAllThreads()IOccurrence.Occurs(int, string)IOccurrence.OccursAtLeast(int, string)IOccurrence.OccursAtMost(int, string)IOccurrence.OccursOnce(string)IOccurrence.OccursNever(string)IOrder.InOrder(string)IPrerequisite.AfterAll(params IPrerequisite[])IPrerequisite.IsMetIDisposable.Dispose()

Methods

DoNothing()

Leaves the arranged void call without additional behavior.

Declaration

cs-api-definition
IAssertable DoNothing()

Returns

IAssertable

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

cs-api-definition
TContainer Raises(Action eventExpression, EventArgs args)

Parameters

eventExpression

Action

Expression that identifies the event to raise.

args

EventArgs

Event arguments to pass to the handler.

Returns

TContainer

The current expectation so that you can continue the arrangement.

Exceptions

InvalidOperationException

Thrown when JustMock cannot resolve the event expression.

Raises(Action, params object[])

Raises the specified event when the arranged call occurs.

Declaration

cs-api-definition
TContainer Raises(Action eventExpression, params object[] args)

Parameters

eventExpression

Action

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

InvalidOperationException

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

cs-api-definition
TContainer Raises<T1, T2, T3, T4>(Action eventExpression, Func<T1, T2, T3, T4, EventArgs> func)

Parameters

eventExpression

Action

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

InvalidOperationException

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

cs-api-definition
TContainer Raises<T1, T2, T3>(Action eventExpression, Func<T1, T2, T3, EventArgs> func)

Parameters

eventExpression

Action

Expression that identifies the event to raise.

func

Func<T1, T2, T3, 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

InvalidOperationException

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

cs-api-definition
TContainer Raises<T1, T2>(Action eventExpression, Func<T1, T2, EventArgs> func)

Parameters

eventExpression

Action

Expression that identifies the event to raise.

func

Func<T1, T2, 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

InvalidOperationException

Thrown when JustMock cannot resolve the event expression.

Raises<T1>(Action, Func<T1, EventArgs>)

Raises the specified event when the arranged call occurs.

Declaration

cs-api-definition
TContainer Raises<T1>(Action eventExpression, Func<T1, EventArgs> func)

Parameters

eventExpression

Action

Expression that identifies the event to raise.

func

Func<T1, 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

InvalidOperationException

Thrown when JustMock cannot resolve the event expression.