Exemplo n.º 1
0
        public void CanConvertFrom()
        {
            RectConverter r = new RectConverter();

            Assert.IsTrue(r.CanConvertFrom(typeof(string)));
            Assert.IsFalse(r.CanConvertFrom(typeof(Rect)));
            Assert.IsFalse(r.CanConvertFrom(typeof(Size)));
        }
Exemplo n.º 2
0
        public void CanConvertFrom()
        {
            _converter.CanConvertFrom(null, typeof(string)).Should().BeTrue();

            _converter.CanConvertFrom(null, typeof(int)).Should().BeFalse();
            _converter.CanConvertFrom(null, typeof(void)).Should().BeFalse();
            _converter.CanConvertFrom(null, typeof(object)).Should().BeFalse();
            _converter.CanConvertFrom(null, typeof(Rect)).Should().BeFalse();
            _converter.CanConvertFrom(null, typeof(RectConverter)).Should().BeFalse();
        }