Beispiel #1
0
        public void ReadPreviousChar()
        {
            var str = "Hello World!";

            using (var ms = new MemoryStream(Encoding.UTF8.GetBytes(str)))
                using (var bs = new BencodeStream(ms))
                {
                    Assert.Equal(default(char), bs.ReadPreviousChar());
                    bs.Read(1);
                    Assert.Equal('H', bs.ReadPreviousChar());
                }
        }