示例#1
0
        protected override void Context()
        {
            _editFavoritesInReactionsPresenter = A.Fake <IEditFavoritesInReactionsPresenter>();
            _reactionDiagramPresenter          = A.Fake <IReactionDiagramPresenter>();
            _reactionListPresenter             = A.Fake <IReactionsListSubPresenter>();
            _view = A.Fake <IEditReactionBuildingBlockView>();
            _editReactionBuilderPresenter   = A.Fake <IEditReactionBuilderPresenter>();
            _formulaCachePresenter          = A.Fake <IFormulaCachePresenter>();
            _userDefinedParametersPresenter = A.Fake <IUserDefinedParametersPresenter>();

            sut = new EditReactionBuildingBlockPresenter(_view, _reactionListPresenter, _reactionDiagramPresenter,
                                                         _editReactionBuilderPresenter, _formulaCachePresenter,
                                                         _editFavoritesInReactionsPresenter, _userDefinedParametersPresenter);
        }
 public EditReactionBuildingBlockPresenter(IEditReactionBuildingBlockView view,
                                           IReactionsListSubPresenter reactionListPresenter,
                                           IReactionDiagramPresenter reactionDiagramPresenter,
                                           IEditReactionBuilderPresenter editReactionBuilderPresenter,
                                           IFormulaCachePresenter formulaCachePresenter,
                                           IEditFavoritesInReactionsPresenter editFavoritesInReactionsPresenter,
                                           IUserDefinedParametersPresenter userDefinedParametersPresenter
                                           )
     : base(view, formulaCachePresenter)
 {
     _editReactionBuilderPresenter      = editReactionBuilderPresenter;
     _editFavoritesInReactionsPresenter = editFavoritesInReactionsPresenter;
     _userDefinedParametersPresenter    = userDefinedParametersPresenter;
     _reactionDiagramPresenter          = reactionDiagramPresenter;
     _reactionListPresenter             = reactionListPresenter;
     _view.SetEditReactionView(_editReactionBuilderPresenter.BaseView);
     _view.SetReactionListView(_reactionListPresenter.BaseView);
     _view.SetReactionDiagram(_reactionDiagramPresenter.BaseView);
     _view.SetFavoritesReactionView(_editFavoritesInReactionsPresenter.BaseView);
     _view.SetUserDefinedParametersView(_userDefinedParametersPresenter.BaseView);
     _editFavoritesInReactionsPresenter.ShouldHandleRemovedEvent = shouldHandleRemoved;
     _userDefinedParametersPresenter.ColumnConfiguration         = x => x.ConfigureForReaction();
     AddSubPresenters(_editReactionBuilderPresenter, _reactionDiagramPresenter, _reactionListPresenter, _editFavoritesInReactionsPresenter, _userDefinedParametersPresenter);
 }