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))); }
public void TestCanConvertFromThrows() { HierarchyNodeConverter target = new HierarchyNodeConverter(); Assert.IsTrue(target.CanConvertFrom(typeof(string))); }