title: Unit test code coverage issue
body: <p>I am trying to find out why my unit test for the below given code is not showing full code coverage in vs2010 .
  Here is my method I am using to get records .</p>
  
  <pre><code>public Records GetTestRecords(HttpWebRequest request)
  {
      var Records = new Records();
  
      try
      {
          if (null != request)
          {
              var response = (HttpWebResponse)request.GetResponse();
  
              using (var sr = new StreamReader(response.GetResponseStream()))
              {
                  jsonResult = sr.ReadToEnd();
              }
  
              Records = myHelper.Deserialize&lt;Records&gt;(jsonResult);
          }
      }
      catch (Exception exception)
      {
  
          throw (exception);
      }
  
      return Records;
  }
  </code></pre>
  
  <p>Here is my unit test for the above method</p>
  
  <pre><code>[TestMethod()]
      public void GetRecordsTest()
      {
          string mockjsonResult = "{\"recordId\":\"8cccf2deb-4dde-450c-97cd-a6ec\",\"billingAccountId\":\"fake\",\"userid\":81233,\"Checkid\":2533004436741,\"partName\":\"redcredetest\",\"Description\":\"not yet pulling- test\",\"productId\":\"rr43556-23re\",\"created\":\"2013-04-12T21:09:54.4890986Z\",\"enddate\":null,\"autoRenewal\":true,\"changeLog\":{\"reason\":\"dummy.\",\"state\":1,\"time\":\"2013-04-12T21:09:54.48126Z\",\"extensions\":null,\"transactionId\":null}}";
  
  
          var mocrequest = HttpWebRequest.Create("http://social.stackoverflowtest.com/Forums/getfile/2234");
          myProvider target = new myProvider (); 
          HttpWebRequest request = (HttpWebRequest)mocrequest;
          request.Method = "GET";
          request.ContentType = "application/json"; 
          Records records = GetMockRecords();
          string jsonResult = string.Empty;
  
          var mockWebResponse = request.GetResponse();
          var response = (HttpWebResponse)request.GetResponse();
          using (var sr = new StreamReader(response.GetResponseStream()))
          {
              jsonResult = sr.ReadToEnd();
          }
  
          records = MyHelper.Deserialize&lt;Records&gt;(mockdjsonResult);
          Assert.IsNotNull(records.ProductId);
      }
  </code></pre>
  
  <p>I am not able to get full code coverage with this unit test .What I am doing wrong with my unit test here.</p>