chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
0 votes
I just started looking at the new AAA functionality in 5.0, so I may have missed some really basic stuff, but I can't seem to find the option for mocking the ctor of a type as well as any relevant method calls.

E.g. If I have the following

var fake = Isolate.Fake.Instance<MyType>();

the ctor of MyType seems to be called no matter what I do. I have tried to specify the different Member options when creating the Fake to no avail. Since WhenCalled takes an Action or a Func I assume it can't be used to cover the ctor.

Please advice.

Best regards,
Brian Rasmussen
asked by brian.rasmussen (7.2k points)

1 Answer

0 votes
Never mind - just found the Swap method :) Plenty to learn about this new API.

answered by brian.rasmussen (7.2k points)