Ejemplo n.º 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)));
        }
Ejemplo n.º 2
0
        public void DecimalStringConvertFromStringTest()
        {
            var convert = new DecimalStringConverter();

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

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