Exemplo n.º 1
0
        public void TestSeek()
        {
            StringStream ss0 = new StringStream("abcdef");

            ss0.Seek(-2, SeekOrigin.End);
            int b = ss0.ReadByte();

            Assert.Equal('e', b);
        }
Exemplo n.º 2
0
        public void TestPosition()
        {
            StringStream ss0 = new StringStream("abcdef");

            ss0.Position = 4;
            int b = ss0.ReadByte();

            Assert.Equal('e', b);
        }
Exemplo n.º 3
0
        public void TestReadWriteByte()
        {
            StringStream ss1 = new StringStream();

            ss1.WriteByte(Convert.ToByte('a'));
            Assert.Equal(1, ss1.Length);
            ss1.Position = 0;
            Assert.Equal('a', ss1.ReadByte());
        }