Example #1
0
        public void NetUser_WriteTo_ReadFromIsEquivalent()
        {
            NetUser    user   = new NetUser(0, 100);
            DataBuffer buffer = new DataBuffer();

            user.WriteTo(buffer);
            buffer.Seek(0);
            NetUser result = new NetUser();

            result.ReadFrom(buffer);
            Assert.AreEqual(result.UserId, user.UserId);
        }