コード例 #1
0
        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");
        }
コード例 #2
0
        public void PaddingConverter_CanConvertTo_Invoke_ReturnsExpected(Type destinationType, bool expected)
        {
            var converter = new PaddingConverter();

            Assert.Equal(expected, converter.CanConvertTo(destinationType));
        }