Пример #1
0
        public void TestCanConvertTo()
        {
            MockTypeDescriptorContext context = new MockTypeDescriptorContext(null);
            HierarchyNodeConverter    target  = new HierarchyNodeConverter();

            Assert.IsTrue(target.CanConvertTo(context, typeof(string)));
            Assert.IsTrue(target.CanConvertTo(context, typeof(HierarchyNode)));
            Assert.IsFalse(target.CanConvertTo(context, typeof(object)));
        }
Пример #2
0
        public void TestCanConvertToThrows()
        {
            HierarchyNodeConverter target = new HierarchyNodeConverter();

            Assert.IsTrue(target.CanConvertTo(typeof(string)));
        }