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
If think I found a bug in 5.2.2
In other words, one test that was working in 5.2.1, failed with 5.2.2
I checked this by reverting to 5.2.1
I created this class (for a demo to some folks)
public class HttpContext
   public static HttpContext Current
      get { throw new NotImplementedException(); }

   public IDictionary<string, string> Items { get; set; }

Then I Isolated it out by this
Isolate.WhenCalled(() => HttpContext.Current.Items["CustomerId"]).WillReturn("10");

I then accessed it from code using this
int customerId = HttpContext.Current.Items["CustomerId"].ToInt32();

Where ToInt32() is an extremely simple extension method
At last I was verifying the call with this:
Isolate.Verify.WasCalledWithExactArguments(() => HttpContext.Current.Items["CustomerId"]);

And that last verify failed with Isolator 5.2.2, but it works in 5.2.1.
asked by dvdstelt (5.3k points)

2 Answers

0 votes
Hi Dennis

Thanks for reporting this.
We'll check it out and get back to you as soon as possible.
answered by ohad (35.4k points)
0 votes
Hi Dennis

We found the bug and fixed it. 8)
The patch is on its way to you. Please check it out.
answered by ohad (35.4k points)