public void ShouldGetRendererWhenReceivingGetRequest() { var renderer = _mocks.Stub <IWorkStepRenderer>(); using (_mocks.Record()) { Expect.Call(_rendererFactory.CreateRenderer("text/html")).Return(renderer); } using (_mocks.Playback()) { var request = CreateHtmlGetRequest("/"); Assert.AreEqual(HttpStatusCode.OK, _httpHandler.HandleRequest(request).HttpStatusCode); } }
private WorkflowHttpResponse RespondToGet(WorkflowHttpRequest request) { var renderer = _rendererFactory.CreateRenderer(request.Accept); return(Render(renderer, request.RawUrl)); }