public void ConvertTo() { VectorConverter r = new VectorConverter(); Vector rect = new Vector(1, 2); object o = r.ConvertTo(null, CultureInfo.InvariantCulture, rect, typeof(string)); Assert.AreEqual(typeof(string), o.GetType()); Assert.AreEqual("1,2", (string)o); }
public void ConvertTo() { VectorConverter r = new VectorConverter(); Vector rect = new Vector(1, 2); object o = r.ConvertTo(rect, typeof(string)); Assert.AreEqual(typeof(string), o.GetType()); Assert.AreEqual("1,2", (string)o); }
public void ConvertToInvalidDestination() { new Action(() => _converter.ConvertTo(new Vector(), typeof(int))).ShouldThrow <NotSupportedException>(); }