public void FactoryCreatesCorrectAdapterForMenuStrip() { ToolStripUIAdapterFactory factory = new ToolStripUIAdapterFactory(); IUIElementAdapter adapter = factory.GetAdapter(new MenuStrip()); Assert.IsTrue(adapter is ToolStripItemCollectionUIAdapter); }
public void FactoryCreatesCorrectAdapterForToolStripMenuItem() { ToolStripUIAdapterFactory factory = new ToolStripUIAdapterFactory(); ToolStrip strip = new ToolStrip(); ToolStripMenuItem item = new ToolStripMenuItem(); strip.Items.Add(item); IUIElementAdapter adapter = factory.GetAdapter(item); Assert.IsTrue(adapter is ToolStripItemOwnerCollectionUIAdapter); }