Ejemplo n.º 1
0
 public void setup()
 {
     _rawSample = new PushbackInputStream(HttpSample.ChunkedResponse());
     var buf = new byte[74];
     _rawSample.Read(buf, 0, 74); // skip HTTP headers
     _subject = new HttpChunkedStreamWrapper(_rawSample, TimeSpan.FromSeconds(1));
 }
Ejemplo n.º 2
0
 public void chunked_wrapper_disposal()
 {
     var under = Substitute.For<Stream>();
     var subject = new HttpChunkedStreamWrapper(under, TimeSpan.Zero);
     subject.Dispose();
     under.Received().Close();
 }