public EditSimulationPresenter(IEditSimulationView view, ISimulationChartPresenter chartPresenter, IHierarchicalSimulationPresenter hierarchicalPresenter, ISimulationDiagramPresenter simulationDiagramPresenter,
                                IEditSolverSettingsPresenter solverSettingsPresenter, IEditOutputSchemaPresenter editOutputSchemaPresenter,
                                IEditInSimulationPresenterFactory showPresenterFactory, IHeavyWorkManager heavyWorkManager, IChartFactory chartFactory,
                                IEditFavoritesInSimulationPresenter favoritesPresenter, IChartTasks chartTask, IUserDefinedParametersPresenter userDefinedParametersPresenter)
     : base(view)
 {
     _editOutputSchemaPresenter = editOutputSchemaPresenter;
     _showPresenterFactory      = showPresenterFactory;
     _heavyWorkManager          = heavyWorkManager;
     _chartFactory                   = chartFactory;
     _favoritesPresenter             = favoritesPresenter;
     _chartTask                      = chartTask;
     _userDefinedParametersPresenter = userDefinedParametersPresenter;
     _solverSettingsPresenter        = solverSettingsPresenter;
     _hierarchicalPresenter          = hierarchicalPresenter;
     _simulationDiagramPresenter     = simulationDiagramPresenter;
     _chartPresenter                 = chartPresenter;
     _view.SetTreeView(hierarchicalPresenter.BaseView);
     _view.SetModelDiagram(_simulationDiagramPresenter.View);
     _hierarchicalPresenter.ShowOutputSchema    = showOutputSchema;
     _hierarchicalPresenter.ShowSolverSettings  = showSolverSettings;
     _hierarchicalPresenter.SimulationFavorites = () => _favoritesPresenter.Favorites();
     _view.SetChartView(chartPresenter.View);
     AddSubPresenters(_chartPresenter, _hierarchicalPresenter, _simulationDiagramPresenter, _solverSettingsPresenter, _editOutputSchemaPresenter, _favoritesPresenter, _userDefinedParametersPresenter);
     _cacheShowPresenter = new Cache <Type, IEditInSimulationPresenter> {
         OnMissingKey = x => null
     };
 }
Esempio n. 2
0
 protected override void Context()
 {
     _view           = A.Fake <IEditSimulationView>();
     _chartPresenter = A.Fake <ISimulationChartPresenter>();
     _hierarchicalSimulationPresenter = A.Fake <IHierarchicalSimulationPresenter>();
     _diagramPresenter               = A.Fake <ISimulationDiagramPresenter>();
     _solverSettings                 = A.Fake <IEditSolverSettingsPresenter>();
     _outputSchemaPresenter          = A.Fake <IEditOutputSchemaPresenter>();
     _presenterFactory               = A.Fake <IEditInSimulationPresenterFactory>();
     _editFavoritePresenter          = A.Fake <IEditFavoritesInSimulationPresenter>();
     _chartTasks                     = A.Fake <IChartTasks>();
     _userDefinedParametersPresenter = A.Fake <IUserDefinedParametersPresenter>();
     sut = new EditSimulationPresenter(_view, _chartPresenter, _hierarchicalSimulationPresenter, _diagramPresenter,
                                       _solverSettings, _outputSchemaPresenter, _presenterFactory, new HeavyWorkManagerForSpecs(),
                                       A.Fake <IChartFactory>(), _editFavoritePresenter, _chartTasks, _userDefinedParametersPresenter);
 }