skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
    • What's New
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Interface IFunctionExpectation

Interface used to arrange and call local functions.

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

Syntax

public interface IFunctionExpectation

Methods

Arrange(Object, MethodInfo, String, Object[])

Arranges a local function for mocking.

Declaration
ActionExpectation Arrange(object target, MethodInfo method, string localFunctionName, params object[] args)
Parameters
System.Object target

Target instance

System.Reflection.MethodInfo method

Metadata for the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Object[] args

Local function arguments

Returns
ActionExpectation

Reference to setup actions calls

Arrange(Object, String, String, Object[])

Arranges a local function for mocking.

Declaration
ActionExpectation Arrange(object target, string methodName, string localFunctionName, params object[] args)
Parameters
System.Object target

Target instance

System.String methodName

Name of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Object[] args

Local function arguments

Returns
ActionExpectation

Reference to setup actions calls

Arrange(Object, String, String, Type[], Object[])

Arranges a local function for mocking.

Declaration
ActionExpectation Arrange(object target, string methodName, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters
System.Object target

Target instance

System.String methodName

Name of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Object[] args

Local function arguments

Returns
ActionExpectation

Reference to setup actions calls

Arrange(Object, String, String, Type[], Type[], Object[])

Arranges a local function for mocking.

Declaration
ActionExpectation Arrange(object target, string methodName, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters
System.Object target

Target instance

System.String methodName

Name of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Type[] localFunctionGenericTypes

Generic types of the local function specified by localFunctionName

System.Object[] args

Local function arguments

Returns
ActionExpectation

Reference to setup actions calls

Arrange(Object, String, Type[], String, Object[])

Arranges a local function for mocking.

Declaration
ActionExpectation Arrange(object target, string methodName, Type[] methodParamTypes, string localFunctionName, params object[] args)
Parameters
System.Object target

Target instance

System.String methodName

Name of the method where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Object[] args

Local function arguments

Returns
ActionExpectation

Reference to setup actions calls

Arrange(Object, String, Type[], String, Type[], Object[])

Arranges a local function for mocking.

Declaration
ActionExpectation Arrange(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters
System.Object target

Target instance

System.String methodName

Name of the method where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Object[] args

Local function arguments

Returns
ActionExpectation

Reference to setup actions calls

Arrange(Object, String, Type[], String, Type[], Type[], Object[])

Arranges a local function for mocking.

Declaration
ActionExpectation Arrange(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters
System.Object target

Target instance

System.String methodName

Name of the method where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Type[] localFunctionGenericTypes

Generic types of the local function specified by localFunctionName

System.Object[] args

Local function arguments

Returns
ActionExpectation

Reference to setup actions calls

Arrange(Type, MethodInfo, String, Object[])

Arranges a local function inside static method for mocking.

Declaration
ActionExpectation Arrange(Type type, MethodInfo method, string localFunctionName, params object[] args)
Parameters
System.Type type

The type with static method containing local function

System.Reflection.MethodInfo method

Metadata of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Object[] args

Local function arguments

Returns
ActionExpectation

Reference to setup actions calls

Arrange(Type, String, String, Object[])

Arranges a local function inside static method for mocking.

Declaration
ActionExpectation Arrange(Type type, string methodName, string localFunctionName, params object[] args)
Parameters
System.Type type

The type with static method containing local function

System.String methodName

Name of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Object[] args

Local function arguments

Returns
ActionExpectation

Reference to setup actions calls

Arrange(Type, String, String, Type[], Object[])

Arranges a local function inside static method for mocking.

Declaration
ActionExpectation Arrange(Type type, string methodName, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters
System.Type type

The type with static method containing local function

System.String methodName

Name of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Object[] args

Local function arguments

Returns
ActionExpectation

Arrange(Type, String, String, Type[], Type[], Object[])

Arranges a local function inside static method for mocking.

Declaration
ActionExpectation Arrange(Type type, string methodName, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters
System.Type type

The type with static method containing local function

System.String methodName

Name of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Type[] localFunctionGenericTypes

Generic types of the local function specified by localFunctionName

System.Object[] args

Local function arguments

Returns
ActionExpectation

Arrange(Type, String, Type[], String, Object[])

Arranges a local function inside static method for mocking.

Declaration
ActionExpectation Arrange(Type type, string methodName, Type[] methodParamTypes, string localFunctionName, params object[] args)
Parameters
System.Type type

The type with static method containing local function

System.String methodName

Name of the method where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Object[] args

Local function arguments

Returns
ActionExpectation

Reference to setup actions calls

Arrange(Type, String, Type[], String, Type[], Object[])

Arranges a local function inside static method for mocking.

Declaration
ActionExpectation Arrange(Type type, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters
System.Type type

The type with static method containing local function

System.String methodName

Name of the method where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Object[] args

Local function arguments

Returns
ActionExpectation

Reference to setup actions calls

Arrange(Type, String, Type[], String, Type[], Type[], Object[])

Arranges a local function inside static method for mocking.

Declaration
ActionExpectation Arrange(Type type, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters
System.Type type

The type with static method containing local function

System.String methodName

Name of the method where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Type[] localFunctionGenericTypes

Generic types of the local function specified by localFunctionName

System.Object[] args

Local function arguments

Returns
ActionExpectation

Reference to setup actions calls

Arrange<TReturn>(Object, MethodInfo, String, Object[])

Arranges a local function for mocking.

Declaration
FuncExpectation<TReturn> Arrange<TReturn>(object target, MethodInfo method, string localFunctionName, params object[] args)
Parameters
System.Object target

Target instance

System.Reflection.MethodInfo method

Metadata for the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Object[] args

Local function arguments

Returns
FuncExpectation<TReturn>

Reference to setup actions calls

Type Parameters
TReturn

The type of the return value

Arrange<TReturn>(Object, String, String, Object[])

Arranges a local function for mocking.

Declaration
FuncExpectation<TReturn> Arrange<TReturn>(object target, string methodName, string localFunctionName, params object[] args)
Parameters
System.Object target

Target instance

System.String methodName

Name of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Object[] args

Local function arguments

Returns
FuncExpectation<TReturn>

Reference to setup actions calls

Type Parameters
TReturn

The type of the return value

Arrange<TReturn>(Object, String, String, Type[], Object[])

Arranges a local function for mocking.

Declaration
FuncExpectation<TReturn> Arrange<TReturn>(object target, string methodName, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters
System.Object target

Target instance

System.String methodName

Name of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Object[] args

Local function arguments

Returns
FuncExpectation<TReturn>

Reference to setup actions calls

Type Parameters
TReturn

The type of the return value

Arrange<TReturn>(Object, String, String, Type[], Type[], Object[])

Arranges a local function for mocking.

Declaration
FuncExpectation<TReturn> Arrange<TReturn>(object target, string methodName, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters
System.Object target

Target instance

System.String methodName

Name of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Type[] localFunctionGenericTypes

Generic types of the local function specified by localFunctionName

System.Object[] args

Local function arguments

Returns
FuncExpectation<TReturn>

Reference to setup actions calls

Type Parameters
TReturn

The type of the return value

Arrange<TReturn>(Object, String, Type[], String, Object[])

Arranges a local function for mocking.

Declaration
FuncExpectation<TReturn> Arrange<TReturn>(object target, string methodName, Type[] methodParamTypes, string localFunctionName, params object[] args)
Parameters
System.Object target

Target instance

System.String methodName

Name of the method where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Object[] args

Local function arguments

Returns
FuncExpectation<TReturn>

Reference to setup actions calls

Type Parameters
TReturn

The type of the return value

Arrange<TReturn>(Object, String, Type[], String, Type[], Object[])

Arranges a local function for mocking.

Declaration
FuncExpectation<TReturn> Arrange<TReturn>(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters
System.Object target

Target instance

System.String methodName

Name of the method where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Object[] args

Local function arguments

Returns
FuncExpectation<TReturn>

Reference to setup actions calls

Type Parameters
TReturn

The type of the return value

Arrange<TReturn>(Object, String, Type[], String, Type[], Type[], Object[])

Arranges a local function for mocking.

Declaration
FuncExpectation<TReturn> Arrange<TReturn>(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters
System.Object target

Target instance

System.String methodName

Name of the method where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Type[] localFunctionGenericTypes

Generic types of the local function specified by localFunctionName

System.Object[] args

Local function arguments

Returns
FuncExpectation<TReturn>

Reference to setup actions calls

Type Parameters
TReturn

The type of the return value

Arrange<T>(MethodInfo, String, Object[])

Arranges a local function inside static method for mocking.

Declaration
ActionExpectation Arrange<T>(MethodInfo method, string localFunctionName, params object[] args)
Parameters
System.Reflection.MethodInfo method

Metadata of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Object[] args

Local function arguments

Returns
ActionExpectation

Reference to setup actions calls

Type Parameters
T

The type with static method containing local function

Arrange<T>(String, String, Object[])

Arranges a local function inside static method for mocking.

Declaration
ActionExpectation Arrange<T>(string methodName, string localFunctionName, params object[] args)
Parameters
System.String methodName

Name of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Object[] args

Local function arguments

Returns
ActionExpectation

Reference to setup actions calls

Type Parameters
T

The type with static method containing local function

Arrange<T>(String, String, Type[], Object[])

Arranges a local function inside static method for mocking.

Declaration
ActionExpectation Arrange<T>(string methodName, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters
System.String methodName

Name of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Object[] args

Local function arguments

Returns
ActionExpectation

Reference to setup actions calls

Type Parameters
T

The type with static method containing local function

Arrange<T>(String, String, Type[], Type[], Object[])

Arranges a local function inside static method for mocking.

Declaration
ActionExpectation Arrange<T>(string methodName, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters
System.String methodName

Name of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Type[] localFunctionGenericTypes

Generic types of the local function specified by localFunctionName

System.Object[] args

Local function arguments

Returns
ActionExpectation

Reference to setup actions calls

Type Parameters
T

The type with static method containing local function

Arrange<T>(String, Type[], String, Object[])

Arranges a local function inside static method for mocking.

Declaration
ActionExpectation Arrange<T>(string methodName, Type[] methodParamTypes, string localFunctionName, params object[] args)
Parameters
System.String methodName

Name of the method where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Object[] args

Local function arguments

Returns
ActionExpectation

Reference to setup actions calls

Type Parameters
T

The type with static method containing local function

Arrange<T>(String, Type[], String, Type[], Object[])

Arranges a local function inside static method for mocking.

Declaration
ActionExpectation Arrange<T>(string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters
System.String methodName

Name of the method where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Object[] args

Local function arguments

Returns
ActionExpectation

Reference to setup actions calls

Type Parameters
T

The type with static method containing local function

Arrange<T>(String, Type[], String, Type[], Type[], Object[])

Arranges a local function inside static method for mocking.

Declaration
ActionExpectation Arrange<T>(string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters
System.String methodName

Name of the method where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Type[] localFunctionGenericTypes

Generic types of the local function specified by localFunctionName

System.Object[] args

Local function arguments

Returns
ActionExpectation

Reference to setup actions calls

Type Parameters
T

The type with static method containing local function

Arrange<TReturn>(Type, MethodInfo, String, Object[])

Arranges a local function inside static method for mocking.

Declaration
FuncExpectation<TReturn> Arrange<TReturn>(Type type, MethodInfo method, string localFunctionName, params object[] args)
Parameters
System.Type type

The type with static method containing local function

System.Reflection.MethodInfo method

Metadata of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Object[] args

Local function arguments

Returns
FuncExpectation<TReturn>

Reference to setup actions calls

Type Parameters
TReturn

The type of the return value

Arrange<TReturn>(Type, String, String, Object[])

Arranges a local function inside static method for mocking.

Declaration
FuncExpectation<TReturn> Arrange<TReturn>(Type type, string methodName, string localFunctionName, params object[] args)
Parameters
System.Type type

The type with static method containing local function

System.String methodName

Name of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Object[] args

Local function arguments

Returns
FuncExpectation<TReturn>

Reference to setup actions calls

Type Parameters
TReturn

The type of the return value

Arrange<TReturn>(Type, String, String, Type[], Object[])

Arranges a local function inside static method for mocking.

Declaration
FuncExpectation<TReturn> Arrange<TReturn>(Type type, string methodName, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters
System.Type type

The type with static method containing local function

System.String methodName

Name of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Object[] args

Local function arguments

Returns
FuncExpectation<TReturn>

Reference to setup actions calls

Type Parameters
TReturn

The type of the return value

Arrange<TReturn>(Type, String, String, Type[], Type[], Object[])

Arranges a local function inside static method for mocking.

Declaration
FuncExpectation<TReturn> Arrange<TReturn>(Type type, string methodName, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters
System.Type type

The type with static method containing local function

System.String methodName

Name of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Type[] localFunctionGenericTypes

Generic types of the local function specified by localFunctionName

System.Object[] args

Local function arguments

Returns
FuncExpectation<TReturn>

Reference to setup actions calls

Type Parameters
TReturn

Arrange<TReturn>(Type, String, Type[], String, Object[])

Arranges a local function inside static method for mocking.

Declaration
FuncExpectation<TReturn> Arrange<TReturn>(Type type, string methodName, Type[] methodParamTypes, string localFunctionName, params object[] args)
Parameters
System.Type type

The type with static method containing local function

System.String methodName

Name of the method where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Object[] args

Local function arguments

Returns
FuncExpectation<TReturn>

Reference to setup actions calls

Type Parameters
TReturn

The type of the return value

Arrange<TReturn>(Type, String, Type[], String, Type[], Object[])

Arranges a local function inside static method for mocking.

Declaration
FuncExpectation<TReturn> Arrange<TReturn>(Type type, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters
System.Type type

The type with static method containing local function

System.String methodName

Name of the method where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Object[] args

Local function arguments

Returns
FuncExpectation<TReturn>

Reference to setup actions calls

Type Parameters
TReturn

The type of the return value

Arrange<TReturn>(Type, String, Type[], String, Type[], Type[], Object[])

Arranges a local function inside static method for mocking.

Declaration
FuncExpectation<TReturn> Arrange<TReturn>(Type type, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters
System.Type type

The type with static method containing local function

System.String methodName

Name of the method where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Type[] localFunctionGenericTypes

Generic types of the local function specified by localFunctionName

System.Object[] args

Local function arguments

Returns
FuncExpectation<TReturn>

Reference to setup actions calls

Type Parameters
TReturn

The type of the return value

Arrange<T, TReturn>(MethodInfo, String, Object[])

Arranges a local function inside static method for mocking.

Declaration
FuncExpectation<TReturn> Arrange<T, TReturn>(MethodInfo method, string localFunctionName, params object[] args)
Parameters
System.Reflection.MethodInfo method

Metadata of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Object[] args

Local function arguments

Returns
FuncExpectation<TReturn>

Reference to setup actions calls

Type Parameters
T

The type with static method containing local function

TReturn

The type of the return value

Arrange<T, TReturn>(String, String, Object[])

Arranges a local function inside static method for mocking.

Declaration
FuncExpectation<TReturn> Arrange<T, TReturn>(string methodName, string localFunctionName, params object[] args)
Parameters
System.String methodName

Name of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Object[] args

Local function arguments

Returns
FuncExpectation<TReturn>

Reference to setup actions calls

Type Parameters
T

The type with static method containing local function

TReturn

The type of the return value

Arrange<T, TReturn>(String, String, Type[], Object[])

Arranges a local function inside static method for mocking.

Declaration
FuncExpectation<TReturn> Arrange<T, TReturn>(string methodName, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters
System.String methodName

Name of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Object[] args

Local function arguments

Returns
FuncExpectation<TReturn>

Reference to setup actions calls

Type Parameters
T

The type with static method containing local function

TReturn

The type of the return value

Arrange<T, TReturn>(String, String, Type[], Type[], Object[])

Arranges a local function inside static method for mocking.

Declaration
FuncExpectation<TReturn> Arrange<T, TReturn>(string methodName, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters
System.String methodName

Name of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Type[] localFunctionGenericTypes

Generic types of the local function specified by localFunctionName

System.Object[] args

Local function arguments

Returns
FuncExpectation<TReturn>

Reference to setup actions calls

Type Parameters
T

The type with static method containing local function

TReturn

The type of the return value

Arrange<T, TReturn>(String, Type[], String, Object[])

Arranges a local function inside static method for mocking.

Declaration
FuncExpectation<TReturn> Arrange<T, TReturn>(string methodName, Type[] methodParamTypes, string localFunctionName, params object[] args)
Parameters
System.String methodName

Name of the method where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Object[] args

Local function arguments

Returns
FuncExpectation<TReturn>

Reference to setup actions calls

Type Parameters
T

The type with static method containing local function

TReturn

The type of the return value

Arrange<T, TReturn>(String, Type[], String, Type[], Object[])

Arranges a local function inside static method for mocking.

Declaration
FuncExpectation<TReturn> Arrange<T, TReturn>(string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters
System.String methodName

Name of the method where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Object[] args

Local function arguments

Returns
FuncExpectation<TReturn>

Reference to setup actions calls

Type Parameters
T

The type with static method containing local function

TReturn

The type of the return value

Arrange<T, TReturn>(String, Type[], String, Type[], Type[], Object[])

Arranges a local function inside static method for mocking.

Declaration
FuncExpectation<TReturn> Arrange<T, TReturn>(string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters
System.String methodName

Name of the method where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Type[] localFunctionGenericTypes

Generic types of the local function specified by localFunctionName

System.Object[] args

Local function arguments

Returns
FuncExpectation<TReturn>

Reference to setup actions calls

Type Parameters
T

The type with static method containing local function

TReturn

The type of the return value

Assert(Object, MethodInfo, String, Object[])

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

Declaration
void Assert(object target, MethodInfo method, string localFunctionName, params object[] args)
Parameters
System.Object target

Target mock

System.Reflection.MethodInfo method

Metadata for the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Object[] args

Method arguments

Assert(Object, MethodInfo, String, Occurs, Object[])

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

Declaration
void Assert(object target, MethodInfo method, string localFunctionName, Occurs occurs, params object[] args)
Parameters
System.Object target

Target mock

System.Reflection.MethodInfo method

Metadata for the method where the local function is nested

System.String localFunctionName

Name of the nested local function

Occurs occurs

Specifies the number of times a call should occur.

System.Object[] args

Method arguments

Assert(Object, String, String, Object[])

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

Declaration
void Assert(object target, string methodName, string localFunctionName, params object[] args)
Parameters
System.Object target

Target mock

System.String methodName

Name of the where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Object[] args

Method arguments

Assert(Object, String, String, Type[], Object[])

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

Declaration
void Assert(object target, string methodName, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters
System.Object target

Target mock

System.String methodName

Name of the where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Object[] args

Method arguments

Assert(Object, String, String, Type[], Type[], Object[])

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

Declaration
void Assert(object target, string methodName, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters
System.Object target

Target mock

System.String methodName

Name of the where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Type[] localFunctionGenericTypes

Generic types of the local function specified by localFunctionName

System.Object[] args

Method arguments

Assert(Object, String, String, Occurs, Object[])

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

Declaration
void Assert(object target, string methodName, string localFunctionName, Occurs occurs, params object[] args)
Parameters
System.Object target

Target mock

System.String methodName

Name of the where the local function is nested

System.String localFunctionName

Name of the nested local function

Occurs occurs

Specifies the number of times a call should occur.

System.Object[] args

Method arguments

Assert(Object, String, String, Occurs, Type[], Object[])

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

Declaration
void Assert(object target, string methodName, string localFunctionName, Occurs occurs, Type[] methodGenericTypes, params object[] args)
Parameters
System.Object target

Target mock

System.String methodName

Name of the where the local function is nested

System.String localFunctionName

Name of the nested local function

Occurs occurs

Specifies the number of times a call should occur.

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Object[] args

Method arguments

Assert(Object, String, String, Occurs, Type[], Type[], Object[])

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

Declaration
void Assert(object target, string methodName, string localFunctionName, Occurs occurs, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters
System.Object target

Target mock

System.String methodName

Name of the where the local function is nested

System.String localFunctionName

Name of the nested local function

Occurs occurs

Specifies the number of times a call should occur.

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Type[] localFunctionGenericTypes

Generic types of the local function specified by localFunctionName

System.Object[] args

Method arguments

Assert(Object, String, Type[], String, Object[])

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

Declaration
void Assert(object target, string methodName, Type[] methodParamTypes, string localFunctionName, params object[] args)
Parameters
System.Object target

Target mock

System.String methodName

Name of the where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Object[] args

Method arguments

Assert(Object, String, Type[], String, Type[], Object[])

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

Declaration
void Assert(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters
System.Object target

Target mock

System.String methodName

Name of the where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Object[] args

Method arguments

Assert(Object, String, Type[], String, Type[], Type[], Object[])

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

Declaration
void Assert(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters
System.Object target

Target mock

System.String methodName

Name of the where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Type[] localFunctionGenericTypes

Generic types of the local function specified by localFunctionName

System.Object[] args

Method arguments

Assert(Object, String, Type[], String, Occurs, Object[])

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

Declaration
void Assert(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Occurs occurs, params object[] args)
Parameters
System.Object target

Target mock

System.String methodName

Name of the where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

Occurs occurs

Specifies the number of times a call should occur.

System.Object[] args

Method arguments

Assert(Object, String, Type[], String, Occurs, Type[], Object[])

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

Declaration
void Assert(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Occurs occurs, Type[] methodGenericTypes, params object[] args)
Parameters
System.Object target

Target mock

System.String methodName

Name of the where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

Occurs occurs

Specifies the number of times a call should occur.

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Object[] args

Method arguments

Assert(Object, String, Type[], String, Occurs, Type[], Type[], Object[])

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

Declaration
void Assert(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Occurs occurs, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters
System.Object target

Target mock

System.String methodName

Name of the where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

Occurs occurs

Specifies the number of times a call should occur.

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Type[] localFunctionGenericTypes

Generic types of the local function specified by localFunctionName

System.Object[] args

Method arguments

Call(Object, MethodInfo, String, Object[])

Setups a non-public method for mocking.

Declaration
object Call(object target, MethodInfo method, string localFunctionName, params object[] args)
Parameters
System.Object target

Target instance

System.Reflection.MethodInfo method

Method to setup taken from reflection.

System.String localFunctionName

Name of the nested local function

System.Object[] args

Method arguments

Returns
System.Object

Reference to setup actions calls

Call(Object, String, String, Object[])

Calls the specified local function by name.

Declaration
object Call(object target, string methodName, string localFunctionName, params object[] args)
Parameters
System.Object target

Target instance

System.String methodName

Name of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Object[] args

Local function arguments

Returns
System.Object

The value returned by the specified local function.

Call(Object, String, String, Type[], Object[])

Calls the specified local function by name.

Declaration
object Call(object target, string methodName, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters
System.Object target

Target instance

System.String methodName

Name of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Object[] args

Local function arguments

Returns
System.Object

The value returned by the specified local function.

Call(Object, String, String, Type[], Type[], Object[])

Calls the specified local function by name.

Declaration
object Call(object target, string methodName, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters
System.Object target

Target instance

System.String methodName

Name of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Type[] localFunctionGenericTypes

Generic types of the local function specified by localFunctionName

System.Object[] args

Local function arguments

Returns
System.Object

The value returned by the specified local function.

Call(Object, String, Type[], String, Object[])

Calls the specified local function by name.

Declaration
object Call(object target, string methodName, Type[] methodParamTypes, string localFunctionName, params object[] args)
Parameters
System.Object target

Target instance

System.String methodName

Name of the method where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Object[] args

Local function arguments

Returns
System.Object

The value returned by the specified local function.

Call(Object, String, Type[], String, Type[], Object[])

Calls the specified local function by name.

Declaration
object Call(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters
System.Object target

Target instance

System.String methodName

Name of the method where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Object[] args

Local function arguments

Returns
System.Object

The value returned by the specified local function.

Call(Object, String, Type[], String, Type[], Type[], Object[])

Calls the specified local function by name.

Declaration
object Call(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters
System.Object target

Target instance

System.String methodName

Name of the method where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Type[] localFunctionGenericTypes

Generic types of the local function specified by localFunctionName

System.Object[] args

Local function arguments

Returns
System.Object

The value returned by the specified local function.

Call<T>(Object, MethodInfo, String, Object[])

Setups a non-public method for mocking.

Declaration
T Call<T>(object target, MethodInfo method, string localFunctionName, params object[] args)
Parameters
System.Object target

Target instance

System.Reflection.MethodInfo method

Method to setup taken from reflection.

System.String localFunctionName

Name of the nested local function

System.Object[] args

Method arguments

Returns
T

Reference to setup actions calls

Type Parameters
T

Call<T>(Object, String, String, Object[])

Calls the specified local function by name.

Declaration
T Call<T>(object target, string methodName, string localFunctionName, params object[] args)
Parameters
System.Object target

Target instance

System.String methodName

Name of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Object[] args

Local function arguments

Returns
T

The value returned by the specified local function.

Type Parameters
T

Call<T>(Object, String, String, Type[], Object[])

Calls the specified local function by name.

Declaration
T Call<T>(object target, string methodName, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters
System.Object target

Target instance

System.String methodName

Name of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Object[] args

Local function arguments

Returns
T

The value returned by the specified local function.

Type Parameters
T

Call<T>(Object, String, String, Type[], Type[], Object[])

Calls the specified local function by name.

Declaration
T Call<T>(object target, string methodName, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters
System.Object target

Target instance

System.String methodName

Name of the method where the local function is nested

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Type[] localFunctionGenericTypes

Generic types of the local function specified by localFunctionName

System.Object[] args

Local function arguments

Returns
T

The value returned by the specified local function.

Type Parameters
T

Call<T>(Object, String, Type[], String, Object[])

Calls the specified local function by name.

Declaration
T Call<T>(object target, string methodName, Type[] methodParamTypes, string localFunctionName, params object[] args)
Parameters
System.Object target

Target instance

System.String methodName

Name of the method where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Object[] args

Local function arguments

Returns
T

The value returned by the specified local function.

Type Parameters
T

Call<T>(Object, String, Type[], String, Type[], Object[])

Calls the specified local function by name.

Declaration
T Call<T>(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, params object[] args)
Parameters
System.Object target

Target instance

System.String methodName

Name of the method where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Object[] args

Local function arguments

Returns
T

The value returned by the specified local function.

Type Parameters
T

Call<T>(Object, String, Type[], String, Type[], Type[], Object[])

Calls the specified local function by name.

Declaration
T Call<T>(object target, string methodName, Type[] methodParamTypes, string localFunctionName, Type[] methodGenericTypes, Type[] localFunctionGenericTypes, params object[] args)
Parameters
System.Object target

Target instance

System.String methodName

Name of the method where the local function is nested

System.Type[] methodParamTypes

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

System.String localFunctionName

Name of the nested local function

System.Type[] methodGenericTypes

Generic types of the method specified by methodName

System.Type[] localFunctionGenericTypes

Generic types of the local function specified by localFunctionName

System.Object[] args

Local function arguments

Returns
T

The value returned by the specified local function.

Type Parameters
T

Extension Methods

FluentHelper.Arrange<T, TResult>(T, Expression<Func<T, TResult>>)
FluentHelper.Arrange<T>(T, Expression<Action<T>>)
FluentHelper.ArrangeSet<T>(T, Action<T>)
FluentHelper.ArrangeLike<T>(T, Expression<Func<T, Boolean>>)
FluentHelper.Assert<T, TReturn>(T, Expression<Func<T, TReturn>>, String)
FluentHelper.Assert<T, TReturn>(T, Expression<Func<T, TReturn>>, Occurs, String)
FluentHelper.Assert<T>(T, Expression<Action<T>>, String)
FluentHelper.Assert<T>(T, Expression<Action<T>>, Occurs, String)
FluentHelper.AssertSet<T>(T, Action<T>, String)
FluentHelper.AssertSet<T>(T, Action<T>, Occurs, String)
FluentHelper.Raise<T>(T, Action<T>, EventArgs)
FluentHelper.Raise<T>(T, Action<T>, Object[])
FluentHelper.Assert<T>(T, String)
FluentHelper.AssertAll<T>(T, String)
Getting Started
  • Unit Testing and Mocking Explained
  • Videos
  • FAQs
Community
  • Forums
  • Blogs
  • Feedback Portal

Copyright © 2019 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.