Class MultipleReturnValueChainHelper
Provides ability to chain Returns method that returns a single value.
Inheritance
Inherited Members
Namespace: Telerik.JustMock.Helpers
Assembly: Telerik.JustMock.dll
Syntax
public static class MultipleReturnValueChainHelper
Methods
Returns<TReturn>(IAssertable, TReturn)
Defines the return value for a specific method expectation.
Declaration
public static IAssertable Returns<TReturn>(this IAssertable assertable, TReturn value)
Parameters
|
IAssertable
assertable
Reference to IAssertable interface. |
|
TReturn
value
Any object value. |
Returns
|
IAssertable
Reference to IMustBeCalled interface |
Type Parameters
|
TReturn
Type of the return value. |
ReturnsMany<TReturn>(IFunc<TReturn>, TReturn[])
Specifies that the arranged member will return consecutive values from the given array. If the arranged member is called after it has returned the last value, an exception is thrown.
Declaration
public static IAssertable ReturnsMany<TReturn>(this IFunc<TReturn> func, params TReturn[] values)
Parameters
|
IFunc<TReturn>
func
The arranged member. |
|
TReturn[]
values
The array of values that will be returned by the arranged member. |
Returns
|
IAssertable
Reference to IAssertable interface. |
Type Parameters
|
TReturn
Type of the return value. |
ReturnsMany<TReturn>(IFunc<TReturn>, IList<TReturn>, AfterLastValue)
Specifies that the arranged member will return consecutive values from the given array. If the arranged member is called after it has returned the last value, the behavior depends on the behavior parameter.
Declaration
public static IAssertable ReturnsMany<TReturn>(this IFunc<TReturn> func, IList<TReturn> values, AfterLastValue behavior)
Parameters
|
IFunc<TReturn>
func
The arranged member |
|
System.Collections.Generic.IList<TReturn>
values
The list of values that will be returned by the arranged member. The list may be modified after the arrangement is made. |
|
AfterLastValue
behavior
The behavior after the last value has been returned. |
Returns
|
IAssertable
Reference to IAssertable interface. |
Type Parameters
|
TReturn
Type of return value |