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 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
Assignees
Labels

Comments

@rliesenfeld
Copy link
Member

@rliesenfeld 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
1 participant
You can’t perform that action at this time.