public void do_write_content_length_for_200() { new WriteFileHeadContinuation(theWriter, theFile, HttpStatusCode.OK) .Write(theWriter); theWriter.AssertWasCalled(x => x.AppendHeader(HttpResponseHeaders.ContentLength, theFile.Length().ToString())); }
public void SetContentType_replay_writes_the_content_type_to_the_HttpWriter() { var setContentType = new SetContentType("text/json"); setContentType.Replay(theHttpWriter); theHttpWriter.AssertWasCalled(x => x.WriteContentType("text/json")); }
public void flush_delegates() { ClassUnderTest.Flush(); theHttpWriter.AssertWasCalled(x => x.Flush()); }
private void assertHeaderValueWasWritten(string key, string value) { theWriter.AssertWasCalled(x => x.AppendHeader(key, value)); }
public void redirect_to_a_url_delegates() { ClassUnderTest.RedirectToUrl("http://somewhere.com"); theHttpWriter.AssertWasCalled(x => x.Redirect("http://somewhere.com")); }