Welcome to Typemock Answers. Here you can ask and receive answers from other community members. And if you liked or disliked an answer or thread: react with an up- or downvote Enjoy!

Mock all the methods in an object whenever it is called.

+1 vote
Hi,

Is there anyway to mock away all of the methods that are called by a particular object? I can manually specify each method name for every expected occurrence. But is there another way to do this without explicitly mocking all the methods?
________
buy no2 vaporizer
asked Jan 14, 2008 by nsoonhui (9,460 points)

3 Answers

+1 vote
Hi,

Currently there's no API for creating a stub object, without specifying expectations. We can certainly add this to the feature wish list.

What would be the scenario you want use a stub object without verifying the expectations?
answered Jan 14, 2008 by gilz (20,200 points)
+1 vote
:idea: Take a look at this post (Stub with TypeMock)
answered Jan 14, 2008 by eli (5,770 points)
+1 vote
Hi,

Currently there's no API for creating a stub object, without specifying expectations. We can certainly add this to the feature wish list.

What would be the scenario you want use a stub object without verifying the expectations?


gilz, what I wanted could be found in the post eli mentioned. Thanks for your help :wink:
________
vaporgenie vaporizer
answered Jan 18, 2008 by nsoonhui (9,460 points)
...