コード例 #1
0
        public void CanConvertStringToDecimal()
        {
            const decimal value = 1.1m;

            var converter = new FloatingDecimalPointPropertyValueConverter();

            Assert.AreEqual(value, converter.Convert(value.ToString(CultureInfo.InvariantCulture), typeof(decimal)));
        }
コード例 #2
0
        public void CanConvertValueReturnsTrueForNullableDecimal()
        {
            var converter = new FloatingDecimalPointPropertyValueConverter();

            Assert.IsTrue(converter.CanConvertValue(null, typeof(string), typeof(decimal?)));
        }
コード例 #3
0
        public void CanConvertStringToNullableDecimal()
        {
            var converter = new FloatingDecimalPointPropertyValueConverter();

            Assert.AreEqual(null, converter.Convert(null, typeof(decimal?)));
        }