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))); }
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))); }
public void EditValueWithNoFormsServiceThrows() { MockVSHierarchy root = new MockVSHierarchy(); MockVsSolution solution = new MockVsSolution(root); MockServiceProvider serviceProvider = new MockServiceProvider(); serviceProvider.AddService(typeof(IVsSolution), solution); MockTypeDescriptorContext context = new MockTypeDescriptorContext(serviceProvider); string value = "Project1.txt"; MockVSHierarchy project = new MockVSHierarchy(value); root.AddProject(project); SolutionPickerEditor target = new SolutionPickerEditor(); target.EditValue(serviceProvider, null); }