public void CheckWriting1Packet() { m_PacketReader.RegisterType(typeof(WrapperPacket)); WrapperPacket writtenPacket = new WrapperPacket("Test1", 100); m_PacketWriter.Write(writtenPacket); Assert.AreEqual(108, m_MemoryStream.Position); m_MemoryStream.Position = 0; IPacket readPacket = m_PacketReader.Read(); Assert.AreEqual(writtenPacket, readPacket); }