public void DeserializeEmptyNumberField() { var serializer = new IntegerFieldSerializer <NumberField>(); var field = (NumberField)serializer.Deserialize(null); Assert.False(field.Value.HasValue); }
public void DeserializeNumberField() { var serializer = new IntegerFieldSerializer <NumberField>(); var number = new NumberField { Value = 25 }; var str = "25"; var field = (NumberField)serializer.Deserialize(str); Assert.NotNull(field); Assert.Equal(number.Value, field.Value); }