Esempio n. 1
0
        public void FlushThrows()
        {
            var stream = new HttpRequestStream(Mock.Of <IHttpBodyControlFeature>());

            Assert.Throws <NotSupportedException>(() => stream.Flush());
        }
Esempio n. 2
0
    // 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();
    }