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
0 votes
I'm calling same method twice but returning different value on each call.

Reader reader = new Reader();
Isolate.WhenCalled(() => reader.ReadValue()).WillReturn(1);
Isolate.WhenCalled(() => reader.ReadValue()).WillReturn(2);

Problem is that the first call already returns the number 2. Am I missing something?

I'm using TypeMock Isolator 5.1.1.0
asked by JK (3.1k points)

2 Answers

0 votes
Hi,

What you're trying to do, sequenced behavior, was introduced in version 5.2.
Time to upgrade :lol:
answered by gilz (14.5k points)
0 votes
Thanks. I was expecting that. I guess that there are other similar kind of issues also so it's definitely time to upgrade.
answered by JK (3.1k points)
...