Simple HTTP agent used for getting Reevoo Mark data. ReevooClient uses a System.Net.WebRequest to cache the results of an HTTP GET request if appropriate. To set a default proxy for all your application's System.Net.WebRequests, (including those used by ReevooClient), set the property System.Net.WebRequest.DefaultWebProxy before calling ReevooClient.ObtainReevooMarkData().
 public void setup()
 {
     mockedClient = MockRepository.GenerateMock<ReevooClient>();
     cxReviews = MockRepository.GeneratePartialMock<CustomerExperienceReviews>();
     cxReviews.Stub(x => x.ClientUrl()).Return(null);
     cxReviews.Trkref = "FOO";
     cxReviews.client = mockedClient;
 }
Пример #2
0
 protected override void Render(System.Web.UI.HtmlTextWriter writer)
 {
     String _content;
     try
     {
         _content = new ReevooClient().ObtainReevooMarkData(BuildParams(), BaseUri).Content;
     }
     catch (ReevooException re_)
     {
         //We wrap all exceptions with a ReevooException. Log the error & return the empty string.
         Trace.Write(re_.Message);
         _content = String.Empty;
     }
     writer.Write(_content);
 }