public void setup() { mockedClient = MockRepository.GenerateMock<ReevooClient>(); cxReviews = MockRepository.GeneratePartialMock<CustomerExperienceReviews>(); cxReviews.Stub(x => x.ClientUrl()).Return(null); cxReviews.Trkref = "FOO"; cxReviews.client = mockedClient; }
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); }