You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While the argument values of the invocation are accessible, the return value is not. Is it possible to make the return value part of the interface?
namespaceMoq{publicinterfaceIInvocation{MethodInfoMethod{get;}IReadOnlyList<object> Arguments {get;}/// <summary>/// Gets the return value of the invocation./// </summary> objectReturnValue{get;}}}
A related discussion of why the return value wasn't included in the first place can be found here: #560 (comment)
I currently use reflection to access the Invocation.ReturnValue and the value is set to the correct value.
The text was updated successfully, but these errors were encountered:
Yes, Moq does record the return value these days. See my comment in your PR for the reason why I haven't yet added ReturnValue to the public API despite that fact.
The
Invocation
class has a propertyReturnValue
:https://github.com/moq/moq4/blob/a12fe5b1fc2eb7857799d5a7bb5cc9e18f61aace/src/Moq/Invocation.cs#L69
The
IIvocation
interface does not include this property:While the argument values of the invocation are accessible, the return value is not. Is it possible to make the return value part of the interface?
A related discussion of why the return value wasn't included in the first place can be found here:
#560 (comment)
I currently use reflection to access the Invocation.ReturnValue and the value is set to the correct value.
The text was updated successfully, but these errors were encountered: