public void StopAcceptingReadsCausesCopyToAsyncToThrowObjectDisposedException()
        {
            var stream = new FrameRequestStream(Mock.Of <IHttpBodyControlFeature>());

            stream.StartAcceptingReads(null);
            stream.StopAcceptingReads();
            Assert.Throws <ObjectDisposedException>(() => { stream.CopyToAsync(Mock.Of <Stream>()); });
        }
Beispiel #2
0
 public void Stop()
 {
     _request.StopAcceptingReads();
     _emptyRequest.StopAcceptingReads();
     _response.StopAcceptingWrites();
 }