Ejemplo n.º 1
0
        public void FactoryCreatesCorrectAdapterForMenuStrip()
        {
            ToolStripUIAdapterFactory factory = new ToolStripUIAdapterFactory();
            IUIElementAdapter         adapter = factory.GetAdapter(new MenuStrip());

            Assert.IsTrue(adapter is ToolStripItemCollectionUIAdapter);
        }
Ejemplo n.º 2
0
        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);
        }