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