public void CanConvertTo()
        {
            SizeConverter r = new SizeConverter();

            Assert.IsTrue(r.CanConvertTo(typeof(string)));
            Assert.IsFalse(r.CanConvertTo(typeof(Size)));
        }
示例#2
0
        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(Size)).Should().BeFalse();
            _converter.CanConvertTo(null, typeof(SizeConverter)).Should().BeFalse();
        }