public void SerializationRoundtrip_DefaultInstance() { var message = new FailedImageMessage(); var data = message.Serialize(); var deserialized = FailedImageMessage.Deserialize(data); AssertAreEqual(deserialized, message); }
public void SerializationRoundtrip_AllFieldsAreSerializedAndDeserialized(string pathName, string imageName, byte[] expectedImage, byte[] actualImage, byte[] diffImage) { var message = new FailedImageMessage { PathName = pathName, ImageName = imageName, ExpectedImage = expectedImage, ActualImage = actualImage, DiffImage = diffImage, }; var data = message.Serialize(); var deserialized = FailedImageMessage.Deserialize(data); AssertAreEqual(deserialized, message); }
public void HandleFailedImageEvent(MessageEventArgs messageEventArgs) { var failedImageMessage = FailedImageMessage.Deserialize(messageEventArgs.data); SaveImage(failedImageMessage); }