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
Isolate.WhenCalled(() => ....).CallOriginal()


would call the original method, regardless of the args

Isolate.WhenCalled(() => ....).WithArguments("X", "Y").CallOriginal()


would only call the original method when these specific values args are passed;

Keeping in mind my other post:

Isolate.WhenCalled(() => ...).WithArguments(Arg.Any, "Y").CallOriginal()


would only call the original method when the second argument is the specific value, and because of overloads that might give a signagure of (string, string) but also (int?, string), when you need to be specific about types:

Isolate.WhenCalled(() => ...).WithArguments(Arg.AnyTypeOf<string>(), "Y").CallOriginal


And then similiar for privates:

Isolate.NonPublic.WhenCalled(fake, "MethodName").WithArguments(Arg.InstanceOf<Customer>(), "Y").CallOriginal();


That's not much right? Version 5.2.2 next week? :lol:

Thanks...looking forward to whatever we get next...
asked by boo (21.8k points)

3 Answers

0 votes
Hi Boo,

Conditional behavior setting is high on our feature backlog. Unfortunately, it did not make 5.2.2 (which is already out!), but we will definately put it into an upcoming version soon.

The API you suggest is interesting and along the lines we had in mind when we discussed the feature. There are pros and cons to it, but we will take that into consideration when it's time to implement.

Thanks!
Doron
Typemock Support
answered by doron (17.2k points)
0 votes
Cool...my updater just hadn't caught yet...

Where do I find release notes so I know what was added/fixed in this release?
answered by boo (21.8k points)
0 votes
Release notes are part of the documentation installed with Typemock Isolator.

You can see the release announcment on our blog:http://blog.typemock.com/2009/02/typemock-isolator-version-522-is-out.html
answered by dhelper (11.9k points)
...