Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ReturnValue to IInvocation #921

Merged
merged 4 commits into from Oct 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Expand Up @@ -9,7 +9,8 @@ The format is loosely based on [Keep a Changelog](http://keepachangelog.com/en/1
#### Added

* New method overloads for `It.Is`, `It.IsIn`, and `It.IsNotIn` that compare values using a custom `IEqualityComparer<T>` (@weitzhandler, #1064)
Implement It.Is, It.IsIn, It.IsNotIn with a comparer overload (#1059)
* Implement It.Is, It.IsIn, It.IsNotIn with a comparer overload (#1059)
* New property `IInvocation.ReturnValue` to query recorded invocations return values (@MaStr11, #921)

#### Fixed

Expand Down
5 changes: 5 additions & 0 deletions src/Moq/IInvocation.cs
Expand Up @@ -30,5 +30,10 @@ public interface IInvocation
/// Gets whether this invocation was successfully verified by any of the various <c>`Verify`</c> methods.
/// </summary>
bool IsVerified { get; }

/// <summary>
/// Gets the return value of the invocation.
/// </summary>
object ReturnValue { get; }
}
}