Beispiel #1
0
        public void Test_BuildMainMenu_ShouldReturnTypeOf_ContextMenuWin()
        {
            //---------------Set up test pack-------------------
            //---------------Set up test pack-------------------
            IMenuBuilder contextMenuBuilderWin = new ContextMenuBuilderWin(GlobalUIRegistry.ControlFactory);
            HabaneroMenu habaneroMenu          = new HabaneroMenu("Main");
            //---------------Assert Precondition----------------

            //---------------Execute Test ----------------------
            var menu = contextMenuBuilderWin.BuildMainMenu(habaneroMenu);

            //---------------Test Result -----------------------
            Assert.IsInstanceOf <ContextMenuWin>(menu);
        }
Beispiel #2
0
        public void Test_BuildMainMenu_WhenAddingHabaneroMenuWithOneMenuItem_ShouldReturnMenuWithOneMenuItem()
        {
            //---------------Set up test pack-------------------
            IMenuBuilder contextMenuBuilderWin = new ContextMenuBuilderWin(GlobalUIRegistry.ControlFactory);
            HabaneroMenu habaneroMenu          = new HabaneroMenu("Main");
            string       menuNameItem          = "test";

            habaneroMenu.AddMenuItem(menuNameItem);
            //---------------Assert Precondition----------------
            Assert.AreEqual(1, habaneroMenu.MenuItems.Count);

            //---------------Execute Test ----------------------
            var menu = contextMenuBuilderWin.BuildMainMenu(habaneroMenu);

            //---------------Test Result -----------------------
            Assert.AreEqual(1, menu.MenuItems.Count);
        }
        public void Test_BuildMainMenu_WhenAddingHabaneroMenuWithOneMenuItem_ShouldReturnMenuWithOneMenuItem()
        {
            //---------------Set up test pack-------------------
            IMenuBuilder contextMenuBuilderWin = new ContextMenuBuilderWin(GlobalUIRegistry.ControlFactory);
            HabaneroMenu habaneroMenu = new HabaneroMenu("Main");
            string menuNameItem = "test";
            habaneroMenu.AddMenuItem(menuNameItem);
            //---------------Assert Precondition----------------
            Assert.AreEqual(1, habaneroMenu.MenuItems.Count);

            //---------------Execute Test ----------------------
            var menu = contextMenuBuilderWin.BuildMainMenu(habaneroMenu);

            //---------------Test Result -----------------------
            Assert.AreEqual(1, menu.MenuItems.Count);

        }
        public void Test_BuildMainMenu_ShouldReturnTypeOf_ContextMenuWin()
        {
            //---------------Set up test pack-------------------
            //---------------Set up test pack-------------------
            IMenuBuilder contextMenuBuilderWin = new ContextMenuBuilderWin(GlobalUIRegistry.ControlFactory);
            HabaneroMenu habaneroMenu = new HabaneroMenu("Main");
            //---------------Assert Precondition----------------

            //---------------Execute Test ----------------------
            var menu = contextMenuBuilderWin.BuildMainMenu(habaneroMenu);

            //---------------Test Result -----------------------
            Assert.IsInstanceOf<ContextMenuWin>(menu);
        }