public void CompletingTheReadingDisposesStream()
        {
            var        stream = new ObserveDisposeStream();
            PipeWriter reader = PipeWriter.Create(stream);

            reader.Complete();

            Assert.Equal(1, stream.DisposedCount);
        }
        public void CompletingAlreadyCompletePipeReaderNoopsSecondTime()
        {
            var        stream = new ObserveDisposeStream();
            PipeWriter writer = PipeWriter.Create(stream);

            writer.Complete();
            writer.Complete();

            Assert.Equal(1, stream.DisposedCount);
        }