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))); }
public void DecimalStringConvertFromStringTest() { var convert = new DecimalStringConverter(); Assert.AreEqual(300.57812938712893712361812324m, convert.ConvertFromString("300.57812938712893712361812324", typeof(decimal))); }
public void DecimalStringConvertToStringTest() { var convert = new DecimalStringConverter(); Assert.AreEqual("300.57812938712893712361812324", convert.ConvertToString(300.57812938712893712361812324m)); }