Beispiel #1
0
        public void IsMainMenuTabSetToEventVisibleWithoutWcagOverride()
        {
            WebConfigurationMock.Current = WebConfigurationFactory.GetLevelUndefined();
            MainMenuTab mainMenuTab = new MainMenuTab();

            mainMenuTab.Command.Type = CommandType.Event;
            Assert.That(mainMenuTab.EvaluateVisible(), Is.True);
        }
Beispiel #2
0
        public void EvaluateTrue_FromTrueAndWithCommandSetNull()
        {
            MainMenuTab mainMenuTab = CreateMainMenuTabWithoutCommand();

            mainMenuTab.IsVisible = true;

            bool isVisible = mainMenuTab.EvaluateVisible();

            Assert.That(isVisible, Is.True);
        }
Beispiel #3
0
        public void EvaluateFalse_FromFalseAndWithCommandSetNull()
        {
            MainMenuTab mainMenuTab = CreateMainMenuTabWithoutCommand();

            mainMenuTab.IsVisible = false;

            bool isVisible = mainMenuTab.EvaluateVisible();

            Assert.That(isVisible, Is.False);
        }
Beispiel #4
0
        public void EvaluateFalse_FromFalse()
        {
            MainMenuTab mainMenuTab = CreateMainMenuTab();

            mainMenuTab.IsVisible = false;
            _mocks.ReplayAll();

            bool isVisible = mainMenuTab.EvaluateVisible();

            _mocks.VerifyAll();
            Assert.That(isVisible, Is.False);
        }
Beispiel #5
0
        public void EvaluateFalse_FromTrueAndWithAccessDenied()
        {
            MainMenuTab mainMenuTab = CreateMainMenuTab();

            mainMenuTab.IsVisible = true;
            Expect.Call(_mockNavigationCommand.HasAccess(null)).Return(false);
            _mocks.ReplayAll();

            bool isVisible = mainMenuTab.EvaluateVisible();

            _mocks.VerifyAll();
            Assert.That(isVisible, Is.False);
        }
Beispiel #6
0
        public void EvaluateFalse_FromFalseAndWithMissingPermissionBehaviorSetToDisabled()
        {
            MainMenuTab mainMenuTab = CreateMainMenuTab();

            mainMenuTab.MissingPermissionBehavior = MissingPermissionBehavior.Disabled;
            mainMenuTab.IsVisible = false;
            Expect.Call(_mockNavigationCommand.HasAccess(null)).Repeat.Never();
            _mocks.ReplayAll();

            bool isVisible = mainMenuTab.EvaluateVisible();

            _mocks.VerifyAll();
            Assert.That(isVisible, Is.False);
        }