public void CanConvertTo() { PaddingConverter c = new PaddingConverter(); Assert.IsTrue(c.CanConvertTo(null, typeof(string)), "1"); Assert.IsFalse(c.CanConvertTo(null, typeof(int)), "2"); Assert.IsFalse(c.CanConvertTo(null, typeof(float)), "3"); Assert.IsFalse(c.CanConvertTo(null, typeof(object)), "4"); }
public void PaddingConverter_CanConvertTo_Invoke_ReturnsExpected(Type destinationType, bool expected) { var converter = new PaddingConverter(); Assert.Equal(expected, converter.CanConvertTo(destinationType)); }