public void FlushThrows() { var stream = new HttpRequestStream(Mock.Of <IHttpBodyControlFeature>()); Assert.Throws <NotSupportedException>(() => stream.Flush()); }
// Read-only streams should support Flush according to https://github.com/dotnet/corefx/pull/27327#pullrequestreview-98384813 public void FlushDoesNotThrow() { var stream = new HttpRequestStream(Mock.Of <IHttpBodyControlFeature>(), new HttpRequestPipeReader()); stream.Flush(); }