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
Hi after I moved Typemock from 5.1 to 5.3 some of my unit tests failed.
It throws exception:
TypeMock.VerifyException:
TypeMock Verification: The call to System.Collections.Specialized.HybridDictionary.Contains() was made on an uninitialized field.

It fails on recorder.ExpectAndReturn() when I execute this test where page1 is simple aspx page:
[Test]
[VerifyMocks]
public void Page_Load1Test()
{
   PresentFile page1 = new PresentFile();
  NameValueCollection col = new NameValueCollection();

  using (RecordExpectations recorder = RecorderManager.StartRecording())
  {
    recorder.ExpectAndReturn(page1.Request.QueryString, col);
  }
  ........
}


When I execute the same on ascx control is ok.

I think something is not mocked automatically on aspx page, the same is for other properties.
I use .net3.5sp1
asked by whuu (600 points)

1 Answer

0 votes
I'll need to investigate this issue further - let's take it offline.
answered by dhelper (11.9k points)
...