public ImportObserverSetPresenter( IImportObserverSetView view, IObserverInfoPresenter observerInfoPresenter, IDialogCreator dialogCreator, IObserverTask observerTask, IEntityTask entityTask) : base(view) { _observerInfoPresenter = observerInfoPresenter; _dialogCreator = dialogCreator; _observerTask = observerTask; _entityTask = entityTask; AddSubPresenters(_observerInfoPresenter); _view.AddObserverView(_observerInfoPresenter.View); _view.BindTo(_observerDTOs); }
protected override void Context() { _view = A.Fake <IImportObserverSetView>(); _observerInfoPresenter = A.Fake <IObserverInfoPresenter>(); _dialogCreator = A.Fake <IDialogCreator>(); _observerTask = A.Fake <IObserverTask>(); _commandCollector = A.Fake <ICommandCollector>(); _observer1 = new ContainerObserverBuilder().WithName("OBS1"); _observer2 = new ContainerObserverBuilder().WithName("OBS2"); _observerSet = new ObserverSet { _observer1, _observer2 }; _entityTask = A.Fake <IEntityTask>(); A.CallTo(() => _view.BindTo(A <IReadOnlyList <ImportObserverDTO> > ._)) .Invokes(x => _allImportObserverDTO = x.GetArgument <IReadOnlyList <ImportObserverDTO> >(0)); sut = new ImportObserverSetPresenter(_view, _observerInfoPresenter, _dialogCreator, _observerTask, _entityTask); sut.InitializeWith(_commandCollector); }