public void CanNotDelete() { // Arrange ClientSearchState clientSearchState = this.GetDefaultState(); // Assert clientSearchState.CanDelete().Should().BeFalse(); }
public void CanCancel() { // Arrange ClientSearchState clientSearchState = this.GetDefaultState(); // Assert clientSearchState.CanCancel().Should().BeTrue(); }
private void InitStates() { this._clientEmptyState = new ClientEmptyState(this); this._clientSearchState = new ClientSearchState(this); this._clientCreationState = new ClientCreationState(this); this._clientLoadedState = new ClientLoadedState(this); this._clientEditState = new ClientEditState(this); }
public void CanNotSwitchToOtherModes() { // Arrange ClientSearchState clientSearchState = this.GetDefaultState(); // Assert clientSearchState.CanSwitchToSearchMode().Should().BeFalse(); clientSearchState.CanSwitchToAddMode().Should().BeFalse(); clientSearchState.CanSwitchToEditMode().Should().BeFalse(); }
public void ReturnToEmptyClientState() { // Arrange Mock <ClientEditViewModel> mockClientEditViewModel = this.GetMockedViewModel(); ClientSearchState clientSearchState = this.GetDefaultState(mockClientEditViewModel); // Act clientSearchState.Cancel(); // Assert mockClientEditViewModel.Verify(x => x.ChangeToEmptyMode(), Times.Once); }
public void SendsClientSearchCriterionMessage() { // Arrange Mock <ClientEditViewModel> mockClientEditViewModel = this.GetMockedViewModel(); ClientSearchState clientSearchState = this.GetDefaultState(mockClientEditViewModel); // Act clientSearchState.Commit(); // Assert mockClientEditViewModel.Verify(x => x.SendClientSearchCriterionMessage(), Times.Once); }