New to Telerik JustMock? Start a free 30-day trial

Interface used to arrange and call local functions.

Definition

Namespace:Telerik.JustMock.Expectations.Abstraction.Local.Function

Assembly:Telerik.JustMock.dll

Syntax:

C#
public interface IFunctionExpectation

Methods

Arranges a local function for mocking.

C#
ActionExpectation Arrange(object target, MethodInfo method, string localFunctionName, params object[] args)
Parameters:targetobject

Target instance

methodMethodInfo

Metadata for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Local function arguments

Returns:

ActionExpectation

Reference to setup actions calls

Arranges a local function for mocking.

C#
ActionExpectation Arrange(object target, string methodName, string localFunctionName, params object[] args)
Parameters:targetobject

Target instance

methodNamestring

Name of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Local function arguments

Returns:

ActionExpectation

Reference to setup actions calls

Arranges a local function for mocking.

C#
ActionExpectation Arrange(object target, string methodName, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters:targetobject

Target instance

methodNamestring

Name of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

argsobject[]

Local function arguments

Returns:

ActionExpectation

Reference to setup actions calls

Arranges a local function for mocking.

C#
ActionExpectation Arrange(object target, string methodName, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters:targetobject

Target instance

methodNamestring

Name of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

localFunctionGenericTypesType[]

Generic types of the local function specified by localFunctionName

argsobject[]

Local function arguments

Returns:

ActionExpectation

Reference to setup actions calls

Arranges a local function for mocking.

C#
ActionExpectation Arrange(object target, string methodName, Type[] methodParamTypes, string localFunctionName, params object[] args)
Parameters:targetobject

Target instance

methodNamestring

Name of the method where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Local function arguments

Returns:

ActionExpectation

Reference to setup actions calls

Arranges a local function for mocking.

C#
ActionExpectation Arrange(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters:targetobject

Target instance

methodNamestring

Name of the method where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

argsobject[]

Local function arguments

Returns:

ActionExpectation

Reference to setup actions calls

Arranges a local function for mocking.

C#
ActionExpectation Arrange(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters:targetobject

Target instance

methodNamestring

Name of the method where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

localFunctionGenericTypesType[]

Generic types of the local function specified by localFunctionName

argsobject[]

Local function arguments

Returns:

ActionExpectation

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
ActionExpectation Arrange(Type type, MethodInfo method, string localFunctionName, params object[] args)
Parameters:typeType

The type with static method containing local function

methodMethodInfo

Metadata of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Local function arguments

Returns:

ActionExpectation

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
ActionExpectation Arrange(Type type, string methodName, string localFunctionName, params object[] args)
Parameters:typeType

The type with static method containing local function

methodNamestring

Name of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Local function arguments

Returns:

ActionExpectation

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
ActionExpectation Arrange(Type type, string methodName, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters:typeType

The type with static method containing local function

methodNamestring

Name of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

argsobject[]

Local function arguments

Returns:

ActionExpectation

Arranges a local function inside static method for mocking.

C#
ActionExpectation Arrange(Type type, string methodName, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters:typeType

The type with static method containing local function

methodNamestring

Name of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

localFunctionGenericTypesType[]

Generic types of the local function specified by localFunctionName

argsobject[]

Local function arguments

Returns:

ActionExpectation

Arranges a local function inside static method for mocking.

C#
ActionExpectation Arrange(Type type, string methodName, Type[] methodParamTypes, string localFunctionName, params object[] args)
Parameters:typeType

The type with static method containing local function

methodNamestring

Name of the method where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Local function arguments

Returns:

ActionExpectation

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
ActionExpectation Arrange(Type type, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters:typeType

The type with static method containing local function

methodNamestring

Name of the method where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

argsobject[]

Local function arguments

Returns:

ActionExpectation

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
ActionExpectation Arrange(Type type, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters:typeType

The type with static method containing local function

methodNamestring

Name of the method where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

localFunctionGenericTypesType[]

Generic types of the local function specified by localFunctionName

argsobject[]

Local function arguments

Returns:

ActionExpectation

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
FuncExpectation<TReturn> Arrange<T, TReturn>(MethodInfo method, string localFunctionName, params object[] args)
Parameters:methodMethodInfo

Metadata of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Local function arguments

Returns:

FuncExpectation<TReturn>

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
FuncExpectation<TReturn> Arrange<T, TReturn>(string methodName, string localFunctionName, params object[] args)
Parameters:methodNamestring

Name of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Local function arguments

Returns:

FuncExpectation<TReturn>

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
FuncExpectation<TReturn> Arrange<T, TReturn>(string methodName, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters:methodNamestring

Name of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

argsobject[]

Local function arguments

Returns:

FuncExpectation<TReturn>

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
FuncExpectation<TReturn> Arrange<T, TReturn>(string methodName, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters:methodNamestring

Name of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

localFunctionGenericTypesType[]

Generic types of the local function specified by localFunctionName

argsobject[]

Local function arguments

Returns:

FuncExpectation<TReturn>

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
FuncExpectation<TReturn> Arrange<T, TReturn>(string methodName, Type[] methodParamTypes, string localFunctionName, params object[] args)
Parameters:methodNamestring

Name of the method where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Local function arguments

Returns:

FuncExpectation<TReturn>

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
FuncExpectation<TReturn> Arrange<T, TReturn>(string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters:methodNamestring

Name of the method where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

argsobject[]

Local function arguments

Returns:

FuncExpectation<TReturn>

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
FuncExpectation<TReturn> Arrange<T, TReturn>(string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters:methodNamestring

Name of the method where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

localFunctionGenericTypesType[]

Generic types of the local function specified by localFunctionName

argsobject[]

Local function arguments

Returns:

FuncExpectation<TReturn>

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
ActionExpectation Arrange<T>(MethodInfo method, string localFunctionName, params object[] args)
Parameters:methodMethodInfo

Metadata of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Local function arguments

Returns:

ActionExpectation

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
ActionExpectation Arrange<T>(string methodName, string localFunctionName, params object[] args)
Parameters:methodNamestring

Name of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Local function arguments

Returns:

ActionExpectation

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
ActionExpectation Arrange<T>(string methodName, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters:methodNamestring

Name of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

argsobject[]

Local function arguments

Returns:

ActionExpectation

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
ActionExpectation Arrange<T>(string methodName, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters:methodNamestring

Name of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

localFunctionGenericTypesType[]

Generic types of the local function specified by localFunctionName

argsobject[]

Local function arguments

Returns:

ActionExpectation

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
ActionExpectation Arrange<T>(string methodName, Type[] methodParamTypes, string localFunctionName, params object[] args)
Parameters:methodNamestring

Name of the method where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Local function arguments

Returns:

ActionExpectation

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
ActionExpectation Arrange<T>(string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters:methodNamestring

Name of the method where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

argsobject[]

Local function arguments

Returns:

ActionExpectation

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
ActionExpectation Arrange<T>(string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters:methodNamestring

Name of the method where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

localFunctionGenericTypesType[]

Generic types of the local function specified by localFunctionName

argsobject[]

Local function arguments

Returns:

ActionExpectation

Reference to setup actions calls

Arranges a local function for mocking.

C#
FuncExpectation<TReturn> Arrange<TReturn>(object target, MethodInfo method, string localFunctionName, params object[] args)
Parameters:targetobject

Target instance

methodMethodInfo

Metadata for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Local function arguments

Returns:

FuncExpectation<TReturn>

Reference to setup actions calls

Arranges a local function for mocking.

C#
FuncExpectation<TReturn> Arrange<TReturn>(object target, string methodName, string localFunctionName, params object[] args)
Parameters:targetobject

Target instance

methodNamestring

Name of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Local function arguments

Returns:

FuncExpectation<TReturn>

Reference to setup actions calls

Arranges a local function for mocking.

C#
FuncExpectation<TReturn> Arrange<TReturn>(object target, string methodName, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters:targetobject

Target instance

methodNamestring

Name of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

argsobject[]

Local function arguments

Returns:

FuncExpectation<TReturn>

Reference to setup actions calls

Arranges a local function for mocking.

C#
FuncExpectation<TReturn> Arrange<TReturn>(object target, string methodName, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters:targetobject

Target instance

methodNamestring

Name of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

localFunctionGenericTypesType[]

Generic types of the local function specified by localFunctionName

argsobject[]

Local function arguments

Returns:

FuncExpectation<TReturn>

Reference to setup actions calls

Arranges a local function for mocking.

C#
FuncExpectation<TReturn> Arrange<TReturn>(object target, string methodName, Type[] methodParamTypes, string localFunctionName, params object[] args)
Parameters:targetobject

Target instance

methodNamestring

Name of the method where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Local function arguments

Returns:

FuncExpectation<TReturn>

Reference to setup actions calls

Arranges a local function for mocking.

C#
FuncExpectation<TReturn> Arrange<TReturn>(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters:targetobject

Target instance

methodNamestring

Name of the method where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

argsobject[]

Local function arguments

Returns:

FuncExpectation<TReturn>

Reference to setup actions calls

Arranges a local function for mocking.

C#
FuncExpectation<TReturn> Arrange<TReturn>(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters:targetobject

Target instance

methodNamestring

Name of the method where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

localFunctionGenericTypesType[]

Generic types of the local function specified by localFunctionName

argsobject[]

Local function arguments

Returns:

FuncExpectation<TReturn>

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
FuncExpectation<TReturn> Arrange<TReturn>(Type type, MethodInfo method, string localFunctionName, params object[] args)
Parameters:typeType

The type with static method containing local function

methodMethodInfo

Metadata of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Local function arguments

Returns:

FuncExpectation<TReturn>

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
FuncExpectation<TReturn> Arrange<TReturn>(Type type, string methodName, string localFunctionName, params object[] args)
Parameters:typeType

The type with static method containing local function

methodNamestring

Name of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Local function arguments

Returns:

FuncExpectation<TReturn>

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
FuncExpectation<TReturn> Arrange<TReturn>(Type type, string methodName, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters:typeType

The type with static method containing local function

methodNamestring

Name of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

argsobject[]

Local function arguments

Returns:

FuncExpectation<TReturn>

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
FuncExpectation<TReturn> Arrange<TReturn>(Type type, string methodName, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters:typeType

The type with static method containing local function

methodNamestring

Name of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

localFunctionGenericTypesType[]

Generic types of the local function specified by localFunctionName

argsobject[]

Local function arguments

Returns:

FuncExpectation<TReturn>

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
FuncExpectation<TReturn> Arrange<TReturn>(Type type, string methodName, Type[] methodParamTypes, string localFunctionName, params object[] args)
Parameters:typeType

The type with static method containing local function

methodNamestring

Name of the method where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Local function arguments

Returns:

FuncExpectation<TReturn>

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
FuncExpectation<TReturn> Arrange<TReturn>(Type type, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters:typeType

The type with static method containing local function

methodNamestring

Name of the method where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

argsobject[]

Local function arguments

Returns:

FuncExpectation<TReturn>

Reference to setup actions calls

Arranges a local function inside static method for mocking.

C#
FuncExpectation<TReturn> Arrange<TReturn>(Type type, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters:typeType

The type with static method containing local function

methodNamestring

Name of the method where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

localFunctionGenericTypesType[]

Generic types of the local function specified by localFunctionName

argsobject[]

Local function arguments

Returns:

FuncExpectation<TReturn>

Reference to setup actions calls

Asserts the specified local function that it is called as expected.

C#
void Assert(object target, MethodInfo method, string localFunctionName, Occurs occurs, params object[] args)
Parameters:targetobject

Target mock

methodMethodInfo

Metadata for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

occursOccurs

Specifies the number of times a call should occur.

argsobject[]

Method arguments

Asserts the specified local function that it is called as expected.

C#
void Assert(object target, MethodInfo method, string localFunctionName, params object[] args)
Parameters:targetobject

Target mock

methodMethodInfo

Metadata for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Method arguments

Asserts the specified local function that it is called as expected.

C#
void Assert(object target, string methodName, string localFunctionName, Occurs occurs, params object[] args)
Parameters:targetobject

Target mock

methodNamestring

Name of the where the local function is nested

localFunctionNamestring

Name of the nested local function

occursOccurs

Specifies the number of times a call should occur.

argsobject[]

Method arguments

Asserts the specified local function that it is called as expected.

C#
void Assert(object target, string methodName, string localFunctionName, Occurs occurs, Type[] methodGenericTypes, params object[] args)
Parameters:targetobject

Target mock

methodNamestring

Name of the where the local function is nested

localFunctionNamestring

Name of the nested local function

occursOccurs

Specifies the number of times a call should occur.

methodGenericTypesType[]

Generic types of the method specified by methodName

argsobject[]

Method arguments

Asserts the specified local function that it is called as expected.

C#
void Assert(object target, string methodName, string localFunctionName, Occurs occurs, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters:targetobject

Target mock

methodNamestring

Name of the where the local function is nested

localFunctionNamestring

Name of the nested local function

occursOccurs

Specifies the number of times a call should occur.

methodGenericTypesType[]

Generic types of the method specified by methodName

localFunctionGenericTypesType[]

Generic types of the local function specified by localFunctionName

argsobject[]

Method arguments

Asserts the specified local function that it is called as expected.

C#
void Assert(object target, string methodName, string localFunctionName, params object[] args)
Parameters:targetobject

Target mock

methodNamestring

Name of the where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Method arguments

Asserts the specified local function that it is called as expected.

C#
void Assert(object target, string methodName, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters:targetobject

Target mock

methodNamestring

Name of the where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

argsobject[]

Method arguments

Asserts the specified local function that it is called as expected.

C#
void Assert(object target, string methodName, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters:targetobject

Target mock

methodNamestring

Name of the where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

localFunctionGenericTypesType[]

Generic types of the local function specified by localFunctionName

argsobject[]

Method arguments

Asserts the specified local function that it is called as expected.

C#
void Assert(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Occurs occurs, params object[] args)
Parameters:targetobject

Target mock

methodNamestring

Name of the where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

occursOccurs

Specifies the number of times a call should occur.

argsobject[]

Method arguments

Asserts the specified local function that it is called as expected.

C#
void Assert(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Occurs occurs, Type[] methodGenericTypes, params object[] args)
Parameters:targetobject

Target mock

methodNamestring

Name of the where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

occursOccurs

Specifies the number of times a call should occur.

methodGenericTypesType[]

Generic types of the method specified by methodName

argsobject[]

Method arguments

Asserts the specified local function that it is called as expected.

C#
void Assert(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Occurs occurs, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters:targetobject

Target mock

methodNamestring

Name of the where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

occursOccurs

Specifies the number of times a call should occur.

methodGenericTypesType[]

Generic types of the method specified by methodName

localFunctionGenericTypesType[]

Generic types of the local function specified by localFunctionName

argsobject[]

Method arguments

Asserts the specified local function that it is called as expected.

C#
void Assert(object target, string methodName, Type[] methodParamTypes, string localFunctionName, params object[] args)
Parameters:targetobject

Target mock

methodNamestring

Name of the where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Method arguments

Asserts the specified local function that it is called as expected.

C#
void Assert(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters:targetobject

Target mock

methodNamestring

Name of the where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

argsobject[]

Method arguments

Asserts the specified local function that it is called as expected.

C#
void Assert(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters:targetobject

Target mock

methodNamestring

Name of the where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

localFunctionGenericTypesType[]

Generic types of the local function specified by localFunctionName

argsobject[]

Method arguments

Setups a non-public method for mocking.

C#
object Call(object target, MethodInfo method, string localFunctionName, params object[] args)
Parameters:targetobject

Target instance

methodMethodInfo

Method to setup taken from reflection.

localFunctionNamestring

Name of the nested local function

argsobject[]

Method arguments

Returns:

object

Reference to setup actions calls

Calls the specified local function by name.

C#
object Call(object target, string methodName, string localFunctionName, params object[] args)
Parameters:targetobject

Target instance

methodNamestring

Name of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Local function arguments

Returns:

object

The value returned by the specified local function.

Calls the specified local function by name.

C#
object Call(object target, string methodName, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters:targetobject

Target instance

methodNamestring

Name of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

argsobject[]

Local function arguments

Returns:

object

The value returned by the specified local function.

Calls the specified local function by name.

C#
object Call(object target, string methodName, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters:targetobject

Target instance

methodNamestring

Name of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

localFunctionGenericTypesType[]

Generic types of the local function specified by localFunctionName

argsobject[]

Local function arguments

Returns:

object

The value returned by the specified local function.

Calls the specified local function by name.

C#
object Call(object target, string methodName, Type[] methodParamTypes, string localFunctionName, params object[] args)
Parameters:targetobject

Target instance

methodNamestring

Name of the method where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Local function arguments

Returns:

object

The value returned by the specified local function.

Calls the specified local function by name.

C#
object Call(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters:targetobject

Target instance

methodNamestring

Name of the method where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

argsobject[]

Local function arguments

Returns:

object

The value returned by the specified local function.

Calls the specified local function by name.

C#
object Call(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters:targetobject

Target instance

methodNamestring

Name of the method where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

localFunctionGenericTypesType[]

Generic types of the local function specified by localFunctionName

argsobject[]

Local function arguments

Returns:

object

The value returned by the specified local function.

Setups a non-public method for mocking.

C#
T Call<T>(object target, MethodInfo method, string localFunctionName, params object[] args)
Parameters:targetobject

Target instance

methodMethodInfo

Method to setup taken from reflection.

localFunctionNamestring

Name of the nested local function

argsobject[]

Method arguments

Returns:

T

Reference to setup actions calls

Calls the specified local function by name.

C#
T Call<T>(object target, string methodName, string localFunctionName, params object[] args)
Parameters:targetobject

Target instance

methodNamestring

Name of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Local function arguments

Returns:

T

The value returned by the specified local function.

Calls the specified local function by name.

C#
T Call<T>(object target, string methodName, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters:targetobject

Target instance

methodNamestring

Name of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

argsobject[]

Local function arguments

Returns:

T

The value returned by the specified local function.

Calls the specified local function by name.

C#
T Call<T>(object target, string methodName, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters:targetobject

Target instance

methodNamestring

Name of the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

localFunctionGenericTypesType[]

Generic types of the local function specified by localFunctionName

argsobject[]

Local function arguments

Returns:

T

The value returned by the specified local function.

Calls the specified local function by name.

C#
T Call<T>(object target, string methodName, Type[] methodParamTypes, string localFunctionName, params object[] args)
Parameters:targetobject

Target instance

methodNamestring

Name of the method where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

argsobject[]

Local function arguments

Returns:

T

The value returned by the specified local function.

Calls the specified local function by name.

C#
T Call<T>(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters:targetobject

Target instance

methodNamestring

Name of the method where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

argsobject[]

Local function arguments

Returns:

T

The value returned by the specified local function.

Calls the specified local function by name.

C#
T Call<T>(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters:targetobject

Target instance

methodNamestring

Name of the method where the local function is nested

methodParamTypesType[]

Types of the parameters for the method where the local function is nested

localFunctionNamestring

Name of the nested local function

methodGenericTypesType[]

Generic types of the method specified by methodName

localFunctionGenericTypesType[]

Generic types of the local function specified by localFunctionName

argsobject[]

Local function arguments

Returns:

T

The value returned by the specified local function.

In this article
DefinitionMethodsArrange(object, MethodInfo, string, params object[])Arrange(object, string, string, params object[])Arrange(object, string, string, Type[], params object[])Arrange(object, string, string, Type[], Type[], params object[])Arrange(object, string, Type[], string, params object[])Arrange(object, string, Type[], string, Type[], params object[])Arrange(object, string, Type[], string, Type[], Type[], params object[])Arrange(Type, MethodInfo, string, params object[])Arrange(Type, string, string, params object[])Arrange(Type, string, string, Type[], params object[])Arrange(Type, string, string, Type[], Type[], params object[])Arrange(Type, string, Type[], string, params object[])Arrange(Type, string, Type[], string, Type[], params object[])Arrange(Type, string, Type[], string, Type[], Type[], params object[])Arrange<T, TReturn>(MethodInfo, string, params object[])Arrange<T, TReturn>(string, string, params object[])Arrange<T, TReturn>(string, string, Type[], params object[])Arrange<T, TReturn>(string, string, Type[], Type[], params object[])Arrange<T, TReturn>(string, Type[], string, params object[])Arrange<T, TReturn>(string, Type[], string, Type[], params object[])Arrange<T, TReturn>(string, Type[], string, Type[], Type[], params object[])Arrange<T>(MethodInfo, string, params object[])Arrange<T>(string, string, params object[])Arrange<T>(string, string, Type[], params object[])Arrange<T>(string, string, Type[], Type[], params object[])Arrange<T>(string, Type[], string, params object[])Arrange<T>(string, Type[], string, Type[], params object[])Arrange<T>(string, Type[], string, Type[], Type[], params object[])Arrange<TReturn>(object, MethodInfo, string, params object[])Arrange<TReturn>(object, string, string, params object[])Arrange<TReturn>(object, string, string, Type[], params object[])Arrange<TReturn>(object, string, string, Type[], Type[], params object[])Arrange<TReturn>(object, string, Type[], string, params object[])Arrange<TReturn>(object, string, Type[], string, Type[], params object[])Arrange<TReturn>(object, string, Type[], string, Type[], Type[], params object[])Arrange<TReturn>(Type, MethodInfo, string, params object[])Arrange<TReturn>(Type, string, string, params object[])Arrange<TReturn>(Type, string, string, Type[], params object[])Arrange<TReturn>(Type, string, string, Type[], Type[], params object[])Arrange<TReturn>(Type, string, Type[], string, params object[])Arrange<TReturn>(Type, string, Type[], string, Type[], params object[])Arrange<TReturn>(Type, string, Type[], string, Type[], Type[], params object[])Assert(object, MethodInfo, string, Occurs, params object[])Assert(object, MethodInfo, string, params object[])Assert(object, string, string, Occurs, params object[])Assert(object, string, string, Occurs, Type[], params object[])Assert(object, string, string, Occurs, Type[], Type[], params object[])Assert(object, string, string, params object[])Assert(object, string, string, Type[], params object[])Assert(object, string, string, Type[], Type[], params object[])Assert(object, string, Type[], string, Occurs, params object[])Assert(object, string, Type[], string, Occurs, Type[], params object[])Assert(object, string, Type[], string, Occurs, Type[], Type[], params object[])Assert(object, string, Type[], string, params object[])Assert(object, string, Type[], string, Type[], params object[])Assert(object, string, Type[], string, Type[], Type[], params object[])Call(object, MethodInfo, string, params object[])Call(object, string, string, params object[])Call(object, string, string, Type[], params object[])Call(object, string, string, Type[], Type[], params object[])Call(object, string, Type[], string, params object[])Call(object, string, Type[], string, Type[], params object[])Call(object, string, Type[], string, Type[], Type[], params object[])Call<T>(object, MethodInfo, string, params object[])Call<T>(object, string, string, params object[])Call<T>(object, string, string, Type[], params object[])Call<T>(object, string, string, Type[], Type[], params object[])Call<T>(object, string, Type[], string, params object[])Call<T>(object, string, Type[], string, Type[], params object[])Call<T>(object, string, Type[], string, Type[], Type[], params object[])
Not finding the help you need?
Contact Support