public void CanConvertFrom() { PointConverter r = new PointConverter(); Assert.IsTrue(r.CanConvertFrom(typeof(string))); Assert.IsFalse(r.CanConvertFrom(typeof(Point))); }
public void CanConvertFrom() { _converter.CanConvertFrom(null, typeof(string)).Should().BeTrue(); _converter.CanConvertFrom(null, typeof(int)).Should().BeFalse(); _converter.CanConvertFrom(null, typeof(void)).Should().BeFalse(); _converter.CanConvertFrom(null, typeof(object)).Should().BeFalse(); _converter.CanConvertFrom(null, typeof(Point)).Should().BeFalse(); _converter.CanConvertFrom(null, typeof(PointConverter)).Should().BeFalse(); }
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { return(_pointConverter.CanConvertFrom(context, sourceType)); }