public void WithMock() { var searchParametersViewModel = new FilterParametersViewModel(); _presenter.Initialize(searchParametersViewModel); _viewMock.VerifySet(v => v.ViewModel = searchParametersViewModel, Times.Once()); _viewMock.VerifyGet(v => v.ViewModel, Times.Never); }
public void InitializeShouldSetViewModel() { var searchParametersViewMock = new FilterParametesViewMock(); var searchParametersPresenter = new FilterParametersPresenter(searchParametersViewMock); var searchParametersViewModel = new FilterParametersViewModel(); searchParametersPresenter.Initialize(searchParametersViewModel); Assert.That(searchParametersViewMock.ViewModel, Is.EqualTo(searchParametersViewModel)); }