Esempio n. 1
0
        public void ReadByte()
        {
            using (var stream = new RingMemoryStream(SmallBufferSize))
            {
                stream.Write(TestData, 0, TestData.Length);
                stream.Position = 0;

                for (int i = 0; i < TestData.Length; i++)
                {
                    Assert.AreEqual(TestData[i], stream.ReadByte());
                    Assert.AreEqual(i + 1, stream.Position);
                }
            }
        }
Esempio n. 2
0
 public void ReadBeyondEnd()
 {
     using (var stream = new RingMemoryStream(SmallBufferSize))
     {
         stream.ReadByte();
     }
 }