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

Make strict mocks recognize that .CallBase() can set up a return value, too #450

Merged
merged 3 commits into from
Sep 21, 2017

Conversation

stakx
Copy link
Contributor

@stakx stakx commented Sep 21, 2017

This fixes #448.

which demonstrates that a strict mock does not currently recognize
that a setup such as `strictMock.SetupGet(...).CallBase()` provides
a return value.
The `ExecuteCall` interception strategy shouldn't just ask `Method-
CallReturn` whether it "has a return value"; make it ask whether it
"provides a return value" (as per the exception message text), then
implement the required check (which now also takes `CallBase` into
consideration) directly in `MethodCallReturn`.

Also, clean up and rewrite the `MethodCallReturn` class a little bit
to make it easier to read.
@stakx stakx merged commit 1475ab2 into devlooped:develop Sep 21, 2017
@stakx stakx deleted the callbase branch September 21, 2017 21:59
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