public void CanConvertStringToDecimal() { const decimal value = 1.1m; var converter = new FloatingDecimalPointPropertyValueConverter(); Assert.AreEqual(value, converter.Convert(value.ToString(CultureInfo.InvariantCulture), typeof(decimal))); }
public void CanConvertValueReturnsTrueForNullableDecimal() { var converter = new FloatingDecimalPointPropertyValueConverter(); Assert.IsTrue(converter.CanConvertValue(null, typeof(string), typeof(decimal?))); }
public void CanConvertStringToNullableDecimal() { var converter = new FloatingDecimalPointPropertyValueConverter(); Assert.AreEqual(null, converter.Convert(null, typeof(decimal?))); }