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

Match any values for ref parameters using It.Ref<TValue>.IsAny / ItExpr.Ref<TValue>.IsAny #537

Merged
merged 5 commits into from
Nov 29, 2017

Conversation

stakx
Copy link
Contributor

@stakx stakx commented Nov 29, 2017

This PR adds It.Ref<T>.IsAny which is to ref parameters what It.IsAny<T>() is to regular by-value parameters:

interface IFoo
{
    void Do(ref int n);
}

var mock = new Mock<IFoo>();
mock.Setup(m => m.Do(ref It.Ref<int>.IsAny));

This resolves #479.

@stakx stakx changed the title Match any values for ref parameters using It.Ref<T>.IsAny Match any values for ref parameters using It.Ref<TValue>.IsAny / ItExpr.Ref<TValue>.IsAny Nov 29, 2017
@stakx stakx merged commit 9225ed6 into devlooped:develop Nov 29, 2017
@stakx stakx deleted the itrefisany branch November 29, 2017 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant