Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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>();
 }