Beispiel #1
0
        public void RemoveBuffer()
        {
            buffer.Add(testData, 0, testData.Length);

            var buffer2 = new Buffer();
            buffer.Remove(buffer2, testData.Length);

            Assert.AreEqual(buffer.Length, 0);
            Assert.AreEqual(buffer2.Length, testData.Length);

            var data = new byte[testData.Length];
            buffer2.Remove(data, 0, data.Length);

            Assert.AreEqual(Encoding.UTF8.GetString(data), Encoding.UTF8.GetString(testData));
        }
Beispiel #2
0
 public void Setup()
 {
     buffer = new Buffer();
 }