public static void CanConvertToInt32() { // Arrange var converter = new DecimalConverter(); // Act var result = converter.CanConvertTo(typeof(int)); // Assert Assert.True(result); }
public override bool CanConvertTo(object sourceValue, Type destinationType) { if (sourceValue == null) { return(false); } if (destinationType == typeof(decimal)) { return(true); } DecimalConverter dc = new DecimalConverter(); return(dc.CanConvertTo(destinationType)); }