BendTests.A00_UtilTest.testStream C# (CSharp) Метод

testStream() публичный статический Метод

public static testStream ( Stream os ) : void
os Stream
Результат void
        public static void testStream(Stream os)
        {
            // read it back through my offset stream
            Assert.AreEqual(O_LENGTH, os.Length, "test .Length");

            Assert.AreEqual(0, os.Seek(0, SeekOrigin.Begin), "seek to beginning of my offset range");
            Assert.AreEqual(0, os.Position, "test .Position");

            Assert.AreEqual(4, os.ReadByte(), "read byte pos 4");
            Assert.AreEqual(1, os.Position, "test .Position == 1");
            Assert.AreEqual(5, os.ReadByte(), "read byte pos 5");
            Assert.AreEqual(2, os.Position, "test .Position == 2");

            Assert.AreEqual(1, os.Seek(-1, SeekOrigin.Current), "seek to beginning of my offset range AGAIN");
            Assert.AreEqual(1, os.Position, "test .Position AGAIN");

            Assert.AreEqual(5, os.ReadByte(), "read byte pos 5 AGAIN");
        }