示例#1
0
        public void TestDecimalStringConvertTo()
        {
            var converter = new DecimalStringConverter();

            Assert.AreEqual(decimal.MinValue.ToString(CultureInfo.InvariantCulture), converter.ConvertTo(decimal.MinValue, typeof(string)));
            Assert.AreEqual("776", converter.ConvertTo((decimal)776, typeof(string)));
            Assert.AreEqual(decimal.MaxValue.ToString(CultureInfo.InvariantCulture), converter.ConvertTo(decimal.MaxValue, typeof(string)));
        }
示例#2
0
        public void DecimalStringConvertFromStringTest()
        {
            var convert = new DecimalStringConverter();

            Assert.AreEqual(300.57812938712893712361812324m, convert.ConvertFromString("300.57812938712893712361812324", typeof(decimal)));
        }
示例#3
0
        public void DecimalStringConvertToStringTest()
        {
            var convert = new DecimalStringConverter();

            Assert.AreEqual("300.57812938712893712361812324", convert.ConvertToString(300.57812938712893712361812324m));
        }