public EditProtocolPresenter(IEditProtocolView view, ISubPresenterItemManager <IProtocolItemPresenter> subPresenterItemManager,
                              IProtocolChartPresenter protocolChartPresenter, ISchemaTask schemaTask,
                              IProtocolUpdater protocolUpdater, IDialogCreator dialogCreator)
     : base(view, subPresenterItemManager, ProtocolItems.All)
 {
     _protocolChartPresenter = protocolChartPresenter;
     _schemaTask             = schemaTask;
     _protocolUpdater        = protocolUpdater;
     _dialogCreator          = dialogCreator;
     _view.UpdateChartControl(_protocolChartPresenter.View);
 }
 protected override void Context()
 {
     _view = A.Fake <IEditProtocolView>();
     _subPresenterManager       = SubPresenterHelper.Create <IProtocolItemPresenter>();
     _simpleProtocolPresenter   = _subPresenterManager.CreateFake(ProtocolItems.Simple);
     _advancedProtocolPresenter = _subPresenterManager.CreateFake(ProtocolItems.Advanced);
     _protocolChartPresenter    = A.Fake <IProtocolChartPresenter>();
     _schemaTask      = A.Fake <ISchemaTask>();
     _protocolUpdater = A.Fake <IProtocolUpdater>();
     _dialogCreator   = A.Fake <IDialogCreator>();
     sut = new EditProtocolPresenter(_view, _subPresenterManager, _protocolChartPresenter, _schemaTask, _protocolUpdater, _dialogCreator);
 }
 public SimulationCompoundProtocolCollectorPresenter(ISimulationCompoundProtocolCollectorView view, IApplicationController applicationController,
                                                     IConfigurableLayoutPresenter configurableLayoutPresenter, IEventPublisher eventPublisher, IProtocolChartPresenter protocolChartPresenter,
                                                     ISimulationBuildingBlockUpdater simulationBuildingBlockUpdater) : base(view, applicationController, configurableLayoutPresenter, eventPublisher)
 {
     view.ApplicationIcon = ApplicationIcons.Administration;
     view.Caption         = PKSimConstants.UI.SimulationApplicationConfiguration;
     view.AddProtocolChart(protocolChartPresenter.BaseView);
     _protocolChartPresenter = protocolChartPresenter;
     AddSubPresenters(_protocolChartPresenter);
     _simulationBuildingBlockUpdater = simulationBuildingBlockUpdater;
     _hasWarnings = false;
 }
 public CreateProtocolPresenter(ICreateProtocolView view,
                                ISubPresenterItemManager <IProtocolItemPresenter> subPresenterItemManager,
                                IBuildingBlockPropertiesMapper propertiesMapper,
                                IProtocolChartPresenter protocolChartPresenter,
                                IProtocolFactory protocolFactory,
                                IProtocolUpdater protocolUpdater,
                                IProtocolToProtocolPropertiesDTOMapper protocolPropertiesDTOMapper, IDialogCreator dialogCreator)
     : base(view, subPresenterItemManager, ProtocolItems.All, dialogCreator)
 {
     _propertiesMapper            = propertiesMapper;
     _protocolChartPresenter      = protocolChartPresenter;
     _protocolFactory             = protocolFactory;
     _protocolUpdater             = protocolUpdater;
     _protocolPropertiesDTOMapper = protocolPropertiesDTOMapper;
 }
        protected override void Context()
        {
            _view = A.Fake <ISimulationCompoundProtocolCollectorView>();
            _applicationController       = A.Fake <IApplicationController>();
            _configurableLayoutPresenter = A.Fake <IConfigurableLayoutPresenter>();
            _eventPublisher                 = A.Fake <IEventPublisher>();
            _protocolChartPresenter         = A.Fake <IProtocolChartPresenter>();
            _simulationBuildingBlockUpdater = A.Fake <ISimulationBuildingBlockUpdater>();

            sut = new SimulationCompoundProtocolCollectorPresenter(_view, _applicationController, _configurableLayoutPresenter,
                                                                   _eventPublisher, _protocolChartPresenter, _simulationBuildingBlockUpdater);

            _simulation = A.Fake <Simulation>();
            _compound1  = A.Fake <Compound>();
            _compound2  = A.Fake <Compound>();

            _subPresenter1 = A.Fake <ISimulationCompoundProtocolPresenter>();
            A.CallTo(() => _subPresenter1.SelectedProtocol).Returns(new SimpleProtocol().WithName("P1"));
            _subPresenter2 = A.Fake <ISimulationCompoundProtocolPresenter>();
            A.CallTo(() => _subPresenter2.SelectedProtocol).Returns(new SimpleProtocol().WithName("P2"));

            A.CallTo(() => _simulation.Compounds).Returns(new[] { _compound1, _compound2 });
            A.CallTo(() => _applicationController.Start <ISimulationCompoundProtocolPresenter>()).ReturnsNextFromSequence(_subPresenter1, _subPresenter2);
        }
Example #6
0
 public void AttachPresenter(IProtocolChartPresenter presenter)
 {
     _presenter = presenter;
 }