public void CanConvertTo()
        {
            PointConverter r = new PointConverter();

            Assert.IsTrue(r.CanConvertTo(typeof(string)));
            Assert.IsFalse(r.CanConvertTo(typeof(Point)));
        }
Ejemplo n.º 2
0
        public void CanConvertTo()
        {
            _converter.CanConvertTo(null, typeof(string)).Should().BeTrue();

            _converter.CanConvertTo(null, typeof(int)).Should().BeFalse();
            _converter.CanConvertTo(null, typeof(void)).Should().BeFalse();
            _converter.CanConvertTo(null, typeof(object)).Should().BeFalse();
            _converter.CanConvertTo(null, typeof(Point)).Should().BeFalse();
            _converter.CanConvertTo(null, typeof(PointConverter)).Should().BeFalse();
        }
Ejemplo n.º 3
0
 public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
 {
     return(_pointConverter.CanConvertTo(context, destinationType));
 }