Exemplo n.º 1
0
        protected override void Context()
        {
            _view                               = A.Fake <IParameterIdentificationSimulationSelectionView>();
            _treeNodeFactory                    = A.Fake <ITreeNodeFactory>();
            _applicationController              = A.Fake <IApplicationController>();
            _lazyLoadTask                       = A.Fake <ILazyLoadTask>();
            _treeNodeContextMenuFactory         = A.Fake <ITreeNodeContextMenuFactory>();
            _multipleTreeNodeContextMenuFactory = A.Fake <IMultipleTreeNodeContextMenuFactory>();
            _dialogCreator                      = A.Fake <IDialogCreator>();
            _parameterIdentificationTask        = A.Fake <IParameterIdentificationTask>();
            sut = new ParameterIdentificationSimulationSelectionPresenter(_view, _treeNodeFactory, _applicationController, _lazyLoadTask, _treeNodeContextMenuFactory,
                                                                          _multipleTreeNodeContextMenuFactory, _dialogCreator, _parameterIdentificationTask);

            _parameterIdentification = new ParameterIdentification();
            _simulation = A.Fake <ISimulation>().WithId("Id").WithName("S");
            _parameterIdentification.AddSimulation(_simulation);
            _outputMapping = new OutputMapping
            {
                OutputSelection = new SimulationQuantitySelection(_simulation, new QuantitySelection("PATH", QuantityType.Drug))
            };
            _parameterIdentification.AddOutputMapping(_outputMapping);

            _simulationNode = A.Fake <ITreeNode>();
            A.CallTo(() => _treeNodeFactory.CreateFor(_simulation)).Returns(_simulationNode);

            _simulationSelectionPresenter = A.Fake <ISelectionSimulationPresenter>();
            A.CallTo(() => _applicationController.Start <ISelectionSimulationPresenter>()).Returns(_simulationSelectionPresenter);

            sut.EditParameterIdentification(_parameterIdentification);
        }
Exemplo n.º 2
0
 public ParameterIdentificationSimulationSelectionPresenter(IParameterIdentificationSimulationSelectionView view, ITreeNodeFactory treeNodeFactory,
                                                            IApplicationController applicationController, ILazyLoadTask lazyLoadTask, ITreeNodeContextMenuFactory treeNodeContextMenuFactory,
                                                            IMultipleTreeNodeContextMenuFactory multipleTreeNodeContextMenuFactory, IDialogCreator dialogCreator, IParameterIdentificationTask parameterIdentificationTask) : base(view)
 {
     _treeNodeFactory                    = treeNodeFactory;
     _applicationController              = applicationController;
     _lazyLoadTask                       = lazyLoadTask;
     _treeNodeContextMenuFactory         = treeNodeContextMenuFactory;
     _multipleTreeNodeContextMenuFactory = multipleTreeNodeContextMenuFactory;
     _dialogCreator                      = dialogCreator;
     _parameterIdentificationTask        = parameterIdentificationTask;
 }
 public JournalDiagramPresenter(
     IJournalDiagramView view, IContainerBaseLayouter layouter, IDialogCreator dialogCreator,
     IDiagramModelFactory diagramModelFactory,
     IPresentationUserSettings userSettings, IJournalTask journalTask,
     IJournalPageTask journalPageTask, IReloadRelatedItemTask reloadRelatedItemTask,
     IJournalComparisonTask journalComparisonTask, IMultipleBaseNodeContextMenuFactory multipleNodeContextMenuFactory,
     IViewItemContextMenuFactory viewItemContextMenuFactory)
     : base(view, layouter, dialogCreator, diagramModelFactory)
 {
     _userSettings                   = userSettings;
     _journalTask                    = journalTask;
     _journalPageTask                = journalPageTask;
     _reloadRelatedItemTask          = reloadRelatedItemTask;
     _journalComparisonTask          = journalComparisonTask;
     _multipleNodeContextMenuFactory = multipleNodeContextMenuFactory;
     _viewItemContextMenuFactory     = viewItemContextMenuFactory;
 }