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()));
        }
Пример #2
0
        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"));
        }
Пример #3
0
 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));
 }
Пример #5
0
        public void redirect_to_a_url_delegates()
        {
            ClassUnderTest.RedirectToUrl("http://somewhere.com");

            theHttpWriter.AssertWasCalled(x => x.Redirect("http://somewhere.com"));
        }