public void SearchTab_ShowHideTest() { //arrange var h = new SearchTab(_searchTabStateMachine); h.Hide(); //act/assert Assert.That(h.CurrentState == new SearchTabState.Hidden()); }
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()); }