private static void AssertRoundTrip(IProtoBufSerializer serializer, IpcMessage message) { var result = RoundTrip(serializer, message); Assert.AreEqual(message.GetType(), result.GetType()); Assert.AreEqual(message.RequestId, result.RequestId); Assert.AreEqual(message.Protocol, result.Protocol); Assert.AreEqual(message.Data == null, result.Data == null); if (message.Data != null) { Assert.AreEqual(message.Data.GetType(), result.Data.GetType()); } }