public void protobuf_serialization_can_deserialized_guids() { RuntimeTypeModel.Default[typeof(GatewayPageEvent)].AddSubType(3, typeof(GatewayPageAddedToSite)); var originalMessage = new GatewayPageAddedToSite {GatewayPageId = Guid.NewGuid(), SiteCode = "dls", Url = "test"}; var serializedMessage = Serialize(originalMessage); var @event = (GatewayPageAddedToSite) Deserialize(serializedMessage, typeof (GatewayPageAddedToSite)); Assert.AreEqual(originalMessage.GatewayPageId, @event.GatewayPageId); }
public void protobuf_serialization_can_deserialized_guids() { RuntimeTypeModel.Default[typeof(GatewayPageEvent)].AddSubType(3, typeof(GatewayPageAddedToSite)); var originalMessage = new GatewayPageAddedToSite { GatewayPageId = Guid.NewGuid(), SiteCode = "dls", Url = "test" }; var serializedMessage = Serialize(originalMessage); var @event = (GatewayPageAddedToSite)Deserialize(serializedMessage, typeof(GatewayPageAddedToSite)); Assert.AreEqual(originalMessage.GatewayPageId, @event.GatewayPageId); }