protected override void SetUpPage() { base.SetUpPage(); _tabbedMenu = new TabbedMenuMock(); _tabbedMenu.ID = "TabbedMenu"; _mainMenuTab1 = new MainMenuTab("MainMenuTab1", "Main 1"); _mainMenuTab2 = new MainMenuTab("MainMenuTab2", "Main 2"); _mainMenuTab3 = new MainMenuTab("MainMenuTab3", "Main 3"); _subMenuTab11 = new SubMenuTab("SubMenuTab11", "Sub 1.1"); _subMenuTab12 = new SubMenuTab("SubMenuTab12", "Sub 1.2"); _subMenuTab13 = new SubMenuTab("SubMenuTab13", "Sub 1.3"); _subMenuTab21 = new SubMenuTab("SubMenuTab21", "Sub 2.1"); _subMenuTab22 = new SubMenuTab("SubMenuTab22", "Sub 2.2"); _subMenuTab23 = new SubMenuTab("SubMenuTab23", "Sub 2.3"); _mainMenuTab1.SubMenuTabs.Add(_subMenuTab11); _mainMenuTab1.SubMenuTabs.Add(_subMenuTab12); _mainMenuTab1.SubMenuTabs.Add(_subMenuTab13); _mainMenuTab2.SubMenuTabs.Add(_subMenuTab21); _mainMenuTab2.SubMenuTabs.Add(_subMenuTab22); _mainMenuTab2.SubMenuTabs.Add(_subMenuTab23); _tabbedMenu.Tabs.Add(_mainMenuTab1); _tabbedMenu.Tabs.Add(_mainMenuTab2); _tabbedMenu.Tabs.Add(_mainMenuTab3); }
public void Setup() { _mocks = new MockRepository(); _mockTabbedMenu = _mocks.PartialMock <TabbedMenu>(); _mockNavigationCommand1 = _mocks.PartialMock <NavigationCommand>(); _mocks.Replay(_mockNavigationCommand1); _mockNavigationCommand2 = _mocks.PartialMock <NavigationCommand>(); _mocks.Replay(_mockNavigationCommand2); _mainMenuTab = new MainMenuTab(); _mainMenuTab.ItemID = "MainMenuTab"; _mainMenuTab.Command.Type = CommandType.None; _mainMenuTab.OwnerControl = _mockTabbedMenu; _mockSubMenuTab1 = CreateSubMenuTab("SubMenuTab1", _mockNavigationCommand1); _mainMenuTab.SubMenuTabs.Add(_mockSubMenuTab1); _mockSubMenuTab2 = CreateSubMenuTab("SubMenuTab2", _mockNavigationCommand2); _mainMenuTab.SubMenuTabs.Add(_mockSubMenuTab2); _mocks.BackToRecord(_mockSubMenuTab1); _mocks.BackToRecord(_mockSubMenuTab2); _mocks.BackToRecord(_mockNavigationCommand1); _mocks.BackToRecord(_mockNavigationCommand2); }
public void IsSubMenuTabSetToEventVisibleWithoutWcagOverride() { WebConfigurationMock.Current = WebConfigurationFactory.GetLevelUndefined(); SubMenuTab subMenuTab = new SubMenuTab(); subMenuTab.Command.Type = CommandType.Event; Assert.That(subMenuTab.EvaluateVisible(), Is.True); }
private SubMenuTab CreateSubMenuTab(string itemID, NavigationCommand command) { SubMenuTab tab = _mocks.PartialMock <SubMenuTab>(); _mocks.Replay(tab); tab.ItemID = itemID; tab.Command = command; return(tab); }