Ejemplo n.º 1
0
        public void BuilderTest()
        {
            const uint    uintVal = 598135039;
            const long    longVal = 1234567890;
            const char    charVal = '@';
            const decimal decVal  = (decimal)(System.Math.PI * System.Math.E);

            m_stream
            .WriteUInt32(uintVal)
            .WriteLong(longVal)
            .WriteChar(charVal)
            .WriteDecimal(decVal)
            .ResetRead();

            Assert.AreEqual(SerializationMode.Reading, m_stream.Mode);

            Assert.AreEqual(uintVal, m_stream.ReadUInt32());
            Assert.AreEqual(longVal, m_stream.ReadLong());
            Assert.AreEqual(charVal, m_stream.ReadChar());
            Assert.AreEqual(decVal, m_stream.ReadDecimal());
        }