Class
AsyncExtensions

Defines the expectation for a specific method.

Definition

Namespace:Telerik.JustMock

Assembly:Telerik.JustMock.dll

Syntax:

cs-api-definition
public static class AsyncExtensions

Inheritance: objectAsyncExtensions

Methods

ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult>)

Specifies the delegate that will execute and return the value for the expected member.

Declaration

cs-api-definition
public static IAssertable ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult>(this FuncExpectation<Task<TResult>> mock, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult> valueFunction)

Parameters

mock

FuncExpectation<Task<TResult>>

valueFunction

Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult>

The function that will evaluate the return value.

Returns

IAssertable

Reference to IAssertable interface.

ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult>)

Specifies the delegate that will execute and return the value for the expected member.

Declaration

cs-api-definition
public static IAssertable ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult>(this FuncExpectation<Task<TResult>> mock, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult> valueFunction)

Parameters

mock

FuncExpectation<Task<TResult>>

valueFunction

Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult>

The function that will evaluate the return value.

Returns

IAssertable

Reference to IAssertable interface.

ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult>)

Specifies the delegate that will execute and return the value for the expected member.

Declaration

cs-api-definition
public static IAssertable ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult>(this FuncExpectation<Task<TResult>> mock, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult> valueFunction)

Parameters

mock

FuncExpectation<Task<TResult>>

valueFunction

Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult>

The function that will evaluate the return value.

Returns

IAssertable

Reference to IAssertable interface.

ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult>)

Specifies the delegate that will execute and return the value for the expected member.

Declaration

cs-api-definition
public static IAssertable ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult>(this FuncExpectation<Task<TResult>> mock, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult> valueFunction)

Parameters

mock

FuncExpectation<Task<TResult>>

valueFunction

Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult>

The function that will evaluate the return value.

Returns

IAssertable

Reference to IAssertable interface.

ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult>)

Specifies the delegate that will execute and return the value for the expected member.

Declaration

cs-api-definition
public static IAssertable ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult>(this FuncExpectation<Task<TResult>> mock, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult> valueFunction)

Parameters

mock

FuncExpectation<Task<TResult>>

valueFunction

Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult>

The function that will evaluate the return value.

Returns

IAssertable

Reference to IAssertable interface.

ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult>)

Specifies the delegate that will execute and return the value for the expected member.

Declaration

cs-api-definition
public static IAssertable ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult>(this FuncExpectation<Task<TResult>> mock, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult> valueFunction)

Parameters

mock

FuncExpectation<Task<TResult>>

valueFunction

Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult>

The function that will evaluate the return value.

Returns

IAssertable

Reference to IAssertable interface.

ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>)

Specifies the delegate that will execute and return the value for the expected member.

Declaration

cs-api-definition
public static IAssertable ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>(this FuncExpectation<Task<TResult>> mock, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult> valueFunction)

Parameters

mock

FuncExpectation<Task<TResult>>

valueFunction

Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>

The function that will evaluate the return value.

Returns

IAssertable

Reference to IAssertable interface.

ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>)

Specifies the delegate that will execute and return the value for the expected member.

Declaration

cs-api-definition
public static IAssertable ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(this FuncExpectation<Task<TResult>> mock, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult> valueFunction)

Parameters

mock

FuncExpectation<Task<TResult>>

valueFunction

Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>

The function that will evaluate the return value.

Returns

IAssertable

Reference to IAssertable interface.

ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, T5, T6, T7, T8, TResult>)

Specifies the delegate that will execute and return the value for the expected member.

Declaration

cs-api-definition
public static IAssertable ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, TResult>(this FuncExpectation<Task<TResult>> mock, Func<T1, T2, T3, T4, T5, T6, T7, T8, TResult> valueFunction)

Parameters

mock

FuncExpectation<Task<TResult>>

valueFunction

Func<T1, T2, T3, T4, T5, T6, T7, T8, TResult>

The function that will evaluate the return value.

Returns

IAssertable

Reference to IAssertable interface.

ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, T5, T6, T7, TResult>)

Specifies the delegate that will execute and return the value for the expected member.

Declaration

cs-api-definition
public static IAssertable ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, TResult>(this FuncExpectation<Task<TResult>> mock, Func<T1, T2, T3, T4, T5, T6, T7, TResult> valueFunction)

Parameters

mock

FuncExpectation<Task<TResult>>

valueFunction

Func<T1, T2, T3, T4, T5, T6, T7, TResult>

The function that will evaluate the return value.

Returns

IAssertable

Reference to IAssertable interface.

ReturnsAsync<T1, T2, T3, T4, T5, T6, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, T5, T6, TResult>)

Specifies the delegate that will execute and return the value for the expected member.

Declaration

cs-api-definition
public static IAssertable ReturnsAsync<T1, T2, T3, T4, T5, T6, TResult>(this FuncExpectation<Task<TResult>> mock, Func<T1, T2, T3, T4, T5, T6, TResult> valueFunction)

Parameters

mock

FuncExpectation<Task<TResult>>

valueFunction

Func<T1, T2, T3, T4, T5, T6, TResult>

The function that will evaluate the return value.

Returns

IAssertable

Reference to IAssertable interface.

ReturnsAsync<T1, T2, T3, T4, T5, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, T5, TResult>)

Specifies the delegate that will execute and return the value for the expected member.

Declaration

cs-api-definition
public static IAssertable ReturnsAsync<T1, T2, T3, T4, T5, TResult>(this FuncExpectation<Task<TResult>> mock, Func<T1, T2, T3, T4, T5, TResult> valueFunction)

Parameters

mock

FuncExpectation<Task<TResult>>

valueFunction

Func<T1, T2, T3, T4, T5, TResult>

The function that will evaluate the return value.

Returns

IAssertable

Reference to IAssertable interface.

ReturnsAsync<T1, T2, T3, T4, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, TResult>)

Specifies the delegate that will execute and return the value for the expected member.

Declaration

cs-api-definition
public static IAssertable ReturnsAsync<T1, T2, T3, T4, TResult>(this FuncExpectation<Task<TResult>> mock, Func<T1, T2, T3, T4, TResult> valueFunction)

Parameters

mock

FuncExpectation<Task<TResult>>

valueFunction

Func<T1, T2, T3, T4, TResult>

The function that will evaluate the return value.

Returns

IAssertable

Reference to IAssertable interface.

ReturnsAsync<T1, T2, T3, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, TResult>)

Specifies the delegate that will execute and return the value for the expected member.

Declaration

cs-api-definition
public static IAssertable ReturnsAsync<T1, T2, T3, TResult>(this FuncExpectation<Task<TResult>> mock, Func<T1, T2, T3, TResult> valueFunction)

Parameters

mock

FuncExpectation<Task<TResult>>

valueFunction

Func<T1, T2, T3, TResult>

The function that will evaluate the return value.

Returns

IAssertable

Reference to IAssertable interface.

ReturnsAsync<T1, T2, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, TResult>)

Specifies the delegate that will execute and return the value for the expected member.

Declaration

cs-api-definition
public static IAssertable ReturnsAsync<T1, T2, TResult>(this FuncExpectation<Task<TResult>> mock, Func<T1, T2, TResult> valueFunction)

Parameters

mock

FuncExpectation<Task<TResult>>

valueFunction

Func<T1, T2, TResult>

The function that will evaluate the return value.

Returns

IAssertable

Reference to IAssertable interface.

ReturnsAsync<T1, TResult>(FuncExpectation<Task<TResult>>, Func<T1, TResult>)

Specifies the delegate that will execute and return the value for the expected member.

Declaration

cs-api-definition
public static IAssertable ReturnsAsync<T1, TResult>(this FuncExpectation<Task<TResult>> mock, Func<T1, TResult> valueFunction)

Parameters

mock

FuncExpectation<Task<TResult>>

valueFunction

Func<T1, TResult>

The function that will evaluate the return value.

Returns

IAssertable

Reference to IAssertable interface.

ReturnsAsync<TResult>(FuncExpectation<Task<TResult>>, Func<TResult>)

Specifies a function to evaluate and return the value for an asynchronous method.

Declaration

cs-api-definition
public static IAssertable ReturnsAsync<TResult>(this FuncExpectation<Task<TResult>> mock, Func<TResult> valueFunction)

Parameters

mock

FuncExpectation<Task<TResult>>

valueFunction

Func<TResult>

The function that will evaluate the return value.

Returns

IAssertable

Reference to IAssertable interface.

ReturnsAsync<TResult>(FuncExpectation<Task<TResult>>, TResult)

Specifies the return value for an asynchronous method.

Declaration

cs-api-definition
public static IAssertable ReturnsAsync<TResult>(this FuncExpectation<Task<TResult>> mock, TResult value)

Parameters

mock

FuncExpectation<Task<TResult>>

value

TResult

Returns

IAssertable

Reference to IAssertable interface.

ReturnsAsync<TResult>(FuncExpectation<Task>, Func<TResult>)

Specifies a function to evaluate and return the value for an asynchronous method.

Declaration

cs-api-definition
public static IAssertable ReturnsAsync<TResult>(this FuncExpectation<Task> mock, Func<TResult> valueFunction)

Parameters

mock

FuncExpectation<Task>

valueFunction

Func<TResult>

The function that will evaluate the return value.

Returns

IAssertable

Reference to IAssertable interface.

ReturnsAsync<TResult>(FuncExpectation<Task>, TResult)

Specifies the return value for an asynchronous method.

Declaration

cs-api-definition
public static IAssertable ReturnsAsync<TResult>(this FuncExpectation<Task> mock, TResult value)

Parameters

mock

FuncExpectation<Task>

value

TResult

Returns

IAssertable

Reference to IAssertable interface.

In this article
DefinitionMethodsReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult>)ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult>)ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult>)ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult>)ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult>)ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult>)ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>)ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>)ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, T8, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, T5, T6, T7, T8, TResult>)ReturnsAsync<T1, T2, T3, T4, T5, T6, T7, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, T5, T6, T7, TResult>)ReturnsAsync<T1, T2, T3, T4, T5, T6, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, T5, T6, TResult>)ReturnsAsync<T1, T2, T3, T4, T5, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, T5, TResult>)ReturnsAsync<T1, T2, T3, T4, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, T4, TResult>)ReturnsAsync<T1, T2, T3, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, T3, TResult>)ReturnsAsync<T1, T2, TResult>(FuncExpectation<Task<TResult>>, Func<T1, T2, TResult>)ReturnsAsync<T1, TResult>(FuncExpectation<Task<TResult>>, Func<T1, TResult>)ReturnsAsync<TResult>(FuncExpectation<Task<TResult>>, Func<TResult>)ReturnsAsync<TResult>(FuncExpectation<Task<TResult>>, TResult)ReturnsAsync<TResult>(FuncExpectation<Task>, Func<TResult>)ReturnsAsync<TResult>(FuncExpectation<Task>, TResult)
Not finding the help you need?
Contact Support