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

Expose Mock.Setups, part 2: Match status of setups & invocations #985

Merged
merged 13 commits into from
Mar 31, 2020

Conversation

stakx
Copy link
Contributor

@stakx stakx commented Mar 31, 2020

(This is a follow-up to #984.)

This allows you...

  • to distinguish between unmatched setups and those that were matched by at least one invocation via the ISetup.WasMatched { get; } boolean property; and

  • to find out whether an invocation matched a setup (and which one) via the IInvocation.WasMatched(out ISetup matchingSetup) method.

@stakx stakx added this to the 4.14.0 milestone Mar 31, 2020
this.SetOutParameters(invocation);

// update condition (important for `MockSequence`) and matchers (important for `Capture`):
this.Condition?.SetupEvaluatedSuccessfully();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting to note that Condition no longer needs to remain public; it is now only ever queried from within the same type.

@stakx stakx merged commit 37c84d0 into devlooped:master Mar 31, 2020
@stakx stakx deleted the mock-setups-2 branch March 31, 2020 20:23
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