Exemple #1
0
        public void CanConvertTo()
        {
            RectConverter r = new RectConverter();

            Assert.IsTrue(r.CanConvertTo(typeof(string)));
            Assert.IsFalse(r.CanConvertTo(typeof(Rect)));
            Assert.IsFalse(r.CanConvertTo(typeof(Size)));
        }
Exemple #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(Rect)).Should().BeFalse();
            _converter.CanConvertTo(null, typeof(RectConverter)).Should().BeFalse();
        }