Exemplo n.º 1
0
        public void SearchTab_ShowHideShowTest()
        {
            //arrange
            var h = new SearchTab(_searchTabStateMachine).Hide().Show();

            //act/assert
            Assert.That(h.CurrentState == new SearchTabState.Visible());
        }
Exemplo n.º 2
0
        public void SearchTab_ShowHideTest()
        {
            //arrange
            var h = new SearchTab(_searchTabStateMachine);

            h.Hide();

            //act/assert
            Assert.That(h.CurrentState == new SearchTabState.Hidden());
        }
Exemplo n.º 3
0
        public void InitialState()
        {
            //arrange
            var s = new SearchTab(_searchTabStateMachine);
            var a = new AccountTab(_accountTabStateMachine);
            var w = new AccountTab(_workingPanelStateMachine);

            //act/assert
            Assert.That(s.CurrentState == new SearchTabState.Visible());
            Assert.That(a.CurrentState == new AccountTabState.Visible());
            Assert.That(w.CurrentState == new WorkingPanelState.SearchMode());
        }
Exemplo n.º 4
0
        public void When_SearchIsHidden_AccountIsShown()
        {
            //arrange
            var s = new SearchTab(_searchTabStateMachine);
            var a = new AccountTab(_accountTabStateMachine);

            //assert
            Assert.That(s.CurrentState == new SearchTabState.Visible());
            Assert.That(a.CurrentState == new AccountTabState.Visible());

            //act
            s.Hide();

            //assert
            Assert.That(s.CurrentState == new SearchTabState.Hidden());
            Assert.That(a.CurrentState == new AccountTabState.Visible());

            //act
            s.Show();

            //assert
            Assert.That(s.CurrentState == new SearchTabState.Visible());
            Assert.That(a.CurrentState == new AccountTabState.Hidden());

            //act
            s.Hide();

            //assert
            Assert.That(s.CurrentState == new SearchTabState.Hidden());
            Assert.That(a.CurrentState == new AccountTabState.Visible());

            //act
            a.Hide();

            //assert
            Assert.That(s.CurrentState == new SearchTabState.Visible());
            Assert.That(a.CurrentState == new AccountTabState.Hidden());
        }