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 validation against unintended invocations to mocked types/instances from inside an expectation/verification block #5

Closed
rliesenfeld opened this Issue Jul 15, 2014 · 0 comments

Comments

1 participant
@rliesenfeld
Member

rliesenfeld commented Jul 15, 2014

Sometimes a user will write a "result = new SomeClass(someMock)" recording, where the called constructor happens to make calls on "someMock". Such indirect recordings are unintended, and can result in confusing exceptions.

Such misuses of the mocking API should be detected, with a helpful exception message shown.

@rliesenfeld rliesenfeld self-assigned this Jul 15, 2014

rliesenfeld added a commit that referenced this issue Jul 20, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment