AsyncExtensions
Adds async return helpers to function expectations.
Definition
Namespace:Telerik.JustMock
Assembly:Telerik.JustMock.dll
Syntax:
public static class AsyncExtensions
Inheritance: objectAsyncExtensions
Methods
Specifies the delegate that will execute and return the value for the expected member.
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)
The function that will evaluate the return value.
Returns:Reference to IAssertable interface.
Specifies the delegate that will execute and return the value for the expected member.
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)
The function that will evaluate the return value.
Returns:Reference to IAssertable interface.
Specifies the delegate that will execute and return the value for the expected member.
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)
The function that will evaluate the return value.
Returns:Reference to IAssertable interface.
Specifies the delegate that will execute and return the value for the expected member.
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)
The function that will evaluate the return value.
Returns:Reference to IAssertable interface.
Specifies the delegate that will execute and return the value for the expected member.
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)
The function that will evaluate the return value.
Returns:Reference to IAssertable interface.
Specifies the delegate that will execute and return the value for the expected member.
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)
The function that will evaluate the return value.
Returns:Reference to IAssertable interface.
Specifies the delegate that will execute and return the value for the expected member.
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)
The function that will evaluate the return value.
Returns:Reference to IAssertable interface.
Specifies the delegate that will execute and return the value for the expected member.
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)
The function that will evaluate the return value.
Returns:Reference to IAssertable interface.
Specifies the delegate that will execute and return the value for the expected member.
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)
The function that will evaluate the return value.
Returns:Reference to IAssertable interface.
Specifies the delegate that will execute and return the value for the expected member.
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)
The function that will evaluate the return value.
Returns:Reference to IAssertable interface.
Specifies the delegate that will execute and return the value for the expected member.
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)
The function that will evaluate the return value.
Returns:Reference to IAssertable interface.
Specifies the delegate that will execute and return the value for the expected member.
public static IAssertable ReturnsAsync<T1, T2, T3, T4, T5, TResult>(this FuncExpectation<Task<TResult>> mock, Func<T1, T2, T3, T4, T5, TResult> valueFunction)
The function that will evaluate the return value.
Returns: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.
public static IAssertable ReturnsAsync<T1, T2, T3, T4, TResult>(this FuncExpectation<Task<TResult>> mock, Func<T1, T2, T3, T4, TResult> valueFunction)
The function that will evaluate the return value.
Returns:Reference to IAssertable interface.
Specifies the delegate that will execute and return the value for the expected member.
public static IAssertable ReturnsAsync<T1, T2, T3, TResult>(this FuncExpectation<Task<TResult>> mock, Func<T1, T2, T3, TResult> valueFunction)
The function that will evaluate the return value.
Returns:Reference to IAssertable interface.
Specifies the delegate that will execute and return the value for the expected member.
public static IAssertable ReturnsAsync<T1, T2, TResult>(this FuncExpectation<Task<TResult>> mock, Func<T1, T2, TResult> valueFunction)
The function that will evaluate the return value.
Returns:Reference to IAssertable interface.
Specifies the delegate that will execute and return the value for the expected member.
public static IAssertable ReturnsAsync<T1, TResult>(this FuncExpectation<Task<TResult>> mock, Func<T1, TResult> valueFunction)
The function that will evaluate the return value.
Returns:Reference to IAssertable interface.
Specifies the return value for an arranged asynchronous method.
public static IAssertable ReturnsAsync<TResult>(this FuncExpectation<Task<TResult>> mock, Func<TResult> valueFunction)
Expectation for the asynchronous call.
valueFunctionFunc<TResult>Function that calculates the return value.
Returns:The current expectation so that you can continue the arrangement.
Returns the specified value from an arranged asynchronous method.
public static IAssertable ReturnsAsync<TResult>(this FuncExpectation<Task<TResult>> mock, TResult value)
Expectation for the asynchronous call.
valueTResultValue to wrap in a completed task.
Returns:The current expectation so that you can continue the arrangement.
Specifies the return value for an arranged asynchronous method.
public static IAssertable ReturnsAsync<TResult>(this FuncExpectation<Task> mock, Func<TResult> valueFunction)
Expectation for the asynchronous call.
valueFunctionFunc<TResult>Function that calculates the return value.
Returns:The current expectation so that you can continue the arrangement.
Returns the specified value from an arranged asynchronous method.
public static IAssertable ReturnsAsync<TResult>(this FuncExpectation<Task> mock, TResult value)
Expectation for the asynchronous call.
valueTResultValue to wrap in a completed task.
Returns:The current expectation so that you can continue the arrangement.