public void Int16StringConvertFromStringTest() { var convert = new Int16StringConverter(); Int16 v = 123; Assert.AreEqual(v, convert.ConvertFromString("123", typeof(Int16))); }
public void Int16StringConvertToStringTest() { var convert = new Int16StringConverter(); Int16 v = 123; Assert.AreEqual("123", convert.ConvertToString(v)); }
public void TestInt16StringConvertTo() { var converter = new Int16StringConverter(); Assert.AreEqual(short.MinValue.ToString(), converter.ConvertTo(short.MinValue, typeof(string))); Assert.AreEqual("129", converter.ConvertTo((short)129, typeof(string))); Assert.AreEqual(short.MaxValue.ToString(), converter.ConvertTo(short.MaxValue, typeof(string))); }