public void TestReadByte()
        {
            using (var mem = new MemoryPoolStream())
            {
                var buf = new byte[19];
                Array.Fill <byte>(buf, 1);
                mem.Write(buf, 0, buf.Length);

                mem.Position = 0;

                int b = mem.ReadByte();
                Assert.AreEqual(1, b);
            }
        }
        public void TestMemoryPoolStream2()
        {
            using (var mem = new MemoryPoolStream())
            {
                for (int i = 0; i < 10; i++)
                {
                    mem.WriteByte(1);
                }
                mem.Position = 0;
                mem.Read(new byte[3], 0, 3);
                mem.Seek(0, SeekOrigin.End);
                mem.Capacity = 20;

                var ar = new byte[10];
                Array.Fill <byte>(ar, 1);
                mem.Write(ar, 0, 10);
            }
        }