コード例 #1
0
        public void TestCanConvertFrom()
        {
            MockTypeDescriptorContext context = new MockTypeDescriptorContext(null);
            HierarchyNodeConverter    target  = new HierarchyNodeConverter();

            Assert.IsTrue(target.CanConvertFrom(context, typeof(string)));
            Assert.IsTrue(target.CanConvertFrom(context, typeof(HierarchyNode)));
            Assert.IsFalse(target.CanConvertFrom(context, typeof(object)));
        }
コード例 #2
0
        public void TestCanConvertFromThrows()
        {
            HierarchyNodeConverter target = new HierarchyNodeConverter();

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