Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add validation against unintended invocations to mocked types/instances from inside an expectation/verification block #5
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.