public void ReturnNullIfSerializingNull() { Serializer <Guid?> serializer = new NullableGuidSerializer(); byte[] actualSerializedValue = serializer.Serialize(null); Assert.Null(actualSerializedValue); }
public void SerializeAndDeserializeToTheSameObject(Guid?originalValue) { Serializer <Guid?> serializer = new NullableGuidSerializer(); byte[] serializedValue = serializer.Serialize(originalValue); Guid? deserializedValue = serializer.Deserialize(serializedValue); Assert.Equal(originalValue, deserializedValue); }