public void TestConsumeHe()
        {
            var buffer = Encoding.ASCII.GetBytes("Hello world.!");
            var slice = new BufferSlice(buffer, 0, buffer.Length, buffer.Length);
            var reader = new BufferSliceReader(slice);

            reader.Consume('H', 'e');
            Assert.Equal('l', reader.Current);
            Assert.Equal('l', reader.Peek);
        }
        public void TestConsume()
        {
            var buffer = Encoding.ASCII.GetBytes("Hello world.!");
            var slice = new BufferSlice(buffer, 0, buffer.Length, buffer.Length); 

            var reader = new BufferSliceReader(slice);

            reader.Consume();
            Assert.Equal(slice.Count, reader.Length);
            Assert.Equal(slice.RemainingLength, reader.RemainingLength);
            Assert.Equal('e', reader.Current);
            Assert.Equal('l', reader.Peek);
            Assert.True(reader.HasMore);
        }
        public void TestConsumeEnd()
        {
            var buffer = Encoding.ASCII.GetBytes("Hello  \tworld.!");
            var slice = new BufferSlice(buffer, 0, buffer.Length, buffer.Length);
            var reader = new BufferSliceReader(slice);

            reader.ReadUntil('!');
            Assert.Equal('!', reader.Current);
            reader.Consume();
            Assert.True(reader.EndOfFile);
            Assert.Equal(0, reader.RemainingLength);
        }