protected override void Context() { _applicationController = A.Fake <IApplicationController>(); _configurableLayoutPresenter = A.Fake <IConfigurableLayoutPresenter>(); _eventPublisher = A.Fake <IEventPublisher>(); _view = A.Fake <ISimulationCompoundCollectorView>(); sut = new SimulationCompoundConfigurationCollectorPresenter(_view, _applicationController, _configurableLayoutPresenter, _eventPublisher); _simulation = A.Fake <Simulation>(); _compound1 = A.Fake <Compound>().WithName("C1"); _compound2 = A.Fake <Compound>().WithName("C2"); _allCompounds = new List <Compound> { _compound1, _compound2 }; A.CallTo(() => _simulation.Compounds).Returns(_allCompounds); _allSubPresenters = new List <ISimulationCompoundConfigurationPresenter>(); A.CallTo(() => _applicationController.Start <ISimulationCompoundConfigurationPresenter>()).ReturnsLazily(x => { var p = A.Fake <ISimulationCompoundConfigurationPresenter>(); _allSubPresenters.Add(p); return(p); }); }
protected SimulationCompoundCollectorPresenterBase(TView view, IApplicationController applicationController, IConfigurableLayoutPresenter configurableLayoutPresenter, IEventPublisher eventPublisher) : base(view) { _applicationController = applicationController; _configurableLayoutPresenter = configurableLayoutPresenter; _eventPublisher = eventPublisher; _view.AddCollectorView(_configurableLayoutPresenter.BaseView); _subPresenterCollector = new SubPresenterManager(); }
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 DynamicTestPresenter( IDynamicTestView view, IConfigurableLayoutPresenter configurableLayoutPresenter, IContainer container, IQuantityToQuantitySelectionDTOMapper quantitySelectionDTOMapper ) : base(view) { _configurableLayoutPresenter = configurableLayoutPresenter; _container = container; _quantitySelectionDTOMapper = quantitySelectionDTOMapper; _view.AddCollectorView(_configurableLayoutPresenter.BaseView); }
public SimulationCompoundProcessSummaryCollectorPresenter( ISimulationCompoundProcessSummaryCollectorView view, IApplicationController applicationController, IConfigurableLayoutPresenter configurableLayoutPresenter, IEventPublisher eventPublisher, ISimulationCompoundInteractionSelectionPresenter interactionSelectionPresenter, IReactionDiagramContainerPresenter reactionDiagramPresenter) : base(view, applicationController, configurableLayoutPresenter, eventPublisher) { view.ApplicationIcon = ApplicationIcons.Protein; view.Caption = PKSimConstants.UI.SimulationProcessDefinition; view.AddInteractionView(interactionSelectionPresenter.BaseView); _reactionDiagramPresenter = reactionDiagramPresenter; _interactionSelectionPresenter = interactionSelectionPresenter; AddSubPresenters(_interactionSelectionPresenter, _reactionDiagramPresenter); }
protected override void Context() { _view = A.Fake <ISimulationCompoundProcessSummaryCollectorView>(); _applicationController = A.Fake <IApplicationController>(); _layoutPresenter = A.Fake <IConfigurableLayoutPresenter>(); _eventPublisher = A.Fake <IEventPublisher>(); _interactionSelectionPresenter = A.Fake <ISimulationCompoundInteractionSelectionPresenter>(); _reactionDiagramPresenter = A.Fake <IReactionDiagramContainerPresenter>(); sut = new SimulationCompoundProcessSummaryCollectorPresenter( _view, _applicationController, _layoutPresenter, _eventPublisher, _interactionSelectionPresenter, _reactionDiagramPresenter); _simulation = A.Fake <Simulation>(); _individual = new Individual(); _compound = new Compound(); A.CallTo(() => _simulation.Individual).Returns(_individual); A.CallTo(() => _simulation.Compounds).Returns(new[] { _compound }); }
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); }
public SimulationCompoundConfigurationCollectorPresenter(ISimulationCompoundCollectorView view, IApplicationController applicationController, IConfigurableLayoutPresenter configurableLayoutPresenter, IEventPublisher eventPubliser) : base(view, applicationController, configurableLayoutPresenter, eventPubliser) { view.Caption = PKSimConstants.UI.SimulationCompoundsConfiguration; view.ApplicationIcon = ApplicationIcons.Compound; }
public void AttachPresenter(IConfigurableLayoutPresenter presenter) { /*nothing to do*/ }