Class LocalRefHandle<T>
Handles local refs returns used for mocking, used with conjunction with WithValue<T>(T)
Inheritance
System.Object
LocalRefHandle<T>
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 abstract class LocalRefHandle<T>
Type Parameters
T
|
Examples
var refHandle = LocalRef.WithValue(10); Mock.Arrange(mock, m => m.Echo(ref Arg.Ref(Arg.AnyInt).Value)).Returns(refHandle.Handle).OccursOnce();
Constructors
LocalRefHandle(FuncExpectation<T>.RefDelegate)
Constructs local ref handle
Declaration
public LocalRefHandle(FuncExpectation<T>.RefDelegate refDelegate)
Parameters
FuncExpectation.RefDelegate<>
refDelegate
Mocking delegate |
Properties
Handle
Delegate used for mocking ref returns, see Returns(Delegate)
Declaration
public FuncExpectation<T>.RefDelegate Handle { get; }
Property Value
FuncExpectation.RefDelegate<>
|
Ref
Ref to the internal value of type
Declaration
public T Ref { get; }
Property Value
T
|