public void reading_from_the_stream_with_StreamCopyTo_returns_all_data()
        {
            BufferPoolStream stream = new BufferPoolStream(BufferPool);
            int size = 20123;
            stream.Write(new byte[size], 0, size);
            stream.Position = 0;

            var destination = new MemoryStream();
            stream.CopyTo(destination);
            Assert.AreEqual(destination.Length, size);
        }
예제 #2
0
        public void reading_from_the_stream_with_StreamCopyTo_returns_all_data()
        {
            BufferPoolStream stream = new BufferPoolStream(BufferPool);
            int size = 20123;

            stream.Write(new byte[size], 0, size);
            stream.Position = 0;

            var destination = new MemoryStream();

            stream.CopyTo(destination);
            Assert.AreEqual(destination.Length, size);
        }