public static ifPOS.v1.SignaturItem Into(this ifPOS.v0.SignaturItem from) { return(new ifPOS.v1.SignaturItem() { ftSignatureFormat = from.ftSignatureFormat, ftSignatureType = from.ftSignatureType, Caption = from.Caption, Data = from.Data, }); }
public void Serialize_Deserialize_SignaturItem_ShouldReturn_InitialClass() { var chargeItem = new ifPOS.v0.SignaturItem(); var stream1 = new MemoryStream(); var serializer = new DataContractSerializer(typeof(ifPOS.v0.SignaturItem)); serializer.WriteObject(stream1, chargeItem); stream1.Position = 0; var xmlChargeItem = (ifPOS.v0.SignaturItem)serializer.ReadObject(stream1); xmlChargeItem.ftSignatureFormat.Should().Be(chargeItem.ftSignatureFormat); xmlChargeItem.ftSignatureType.Should().Be(chargeItem.ftSignatureType); xmlChargeItem.Caption.Should().Be(chargeItem.Caption); xmlChargeItem.Data.Should().Be(chargeItem.Data); }