Class LocalRef
Creates handles used for mocking ref returns, used with conjunction with Returns(Delegate)
Inheritance
System.Object
LocalRef
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.JustMock
Assembly: Telerik.JustMock.dll
Syntax
public static class LocalRef
Examples
var refHandle = LocalRef.WithValue(10); Mock.Arrange(mock, m => m.Echo(ref Arg.Ref(Arg.AnyInt).Value)).Returns(refHandle.Handle).OccursOnce();
Methods
WithValue<T>(T)
Creates ref return handle with given type and value
Declaration
public static LocalRefHandle<T> WithValue<T>(T value)
Parameters
T
value
Initial value |
Returns
LocalRefHandle<T>
Ref return handle of type LocalRefHandle<T> |
Type Parameters
T
Ref return type |