public void CanConvertTo() { PointConverter r = new PointConverter(); Assert.IsTrue(r.CanConvertTo(typeof(string))); Assert.IsFalse(r.CanConvertTo(typeof(Point))); }
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(); }
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { return(_pointConverter.CanConvertTo(context, destinationType)); }