Esempio n. 1
0
        protected override void Context()
        {
            _view = A.Fake <ISimulationTimeProfileChartView>();
            _chartDisplayPresenter          = A.Fake <IChartDisplayPresenter>();
            _pkAnalysisPresenter            = A.Fake <IIndividualPKAnalysisPresenter>();
            _chartEditorPresenter           = A.Fake <IChartEditorPresenter>();
            _chartEditorAndDisplayPresenter = A.Fake <IChartEditorAndDisplayPresenter>();
            _dataColumnToPathElementsMapper = A.Fake <IDataColumnToPathElementsMapper>();
            _chartTask                = A.Fake <IChartTask>();
            _dimensionFactory         = A.Fake <IDimensionFactory>();
            _observedDataTask         = A.Fake <IObservedDataTask>();
            _chartLayoutTask          = A.Fake <IChartEditorLayoutTask>();
            _chartUpdateTask          = A.Fake <IChartUpdater>();
            _presentationSettingsTask = A.Fake <IPresentationSettingsTask>();
            _allTemplates             = new List <ChartEditorLayoutTemplate>();
            A.CallTo(() => _chartLayoutTask.AllTemplates()).Returns(_allTemplates);
            A.CallTo(() => _chartEditorAndDisplayPresenter.EditorPresenter).Returns(_chartEditorPresenter);
            A.CallTo(() => _chartEditorAndDisplayPresenter.DisplayPresenter).Returns(_chartDisplayPresenter);
            A.CallTo(() => _chartEditorPresenter.ColumnSettingsFor(A <BrowserColumns> ._)).Returns(new GridColumnSettings(BrowserColumns.Origin.ToString()));
            A.CallTo(() => _chartEditorPresenter.ColumnSettingsFor(A <AxisOptionsColumns> ._)).Returns(new GridColumnSettings(AxisOptionsColumns.AxisType.ToString()));
            A.CallTo(() => _chartEditorPresenter.ColumnSettingsFor(A <CurveOptionsColumns> ._)).Returns(new GridColumnSettings(CurveOptionsColumns.xData.ToString()));
            _chartTemplatingTask   = A.Fake <IChartTemplatingTask>();
            _projectRetriever      = A.Fake <IProjectRetriever>();
            _chartPresenterContext = new ChartPresenterContext(_chartEditorAndDisplayPresenter, _curveNamer, _dataColumnToPathElementsMapper, _chartTemplatingTask, _presentationSettingsTask, _chartLayoutTask, _projectRetriever, _dimensionFactory);
            _curveNamer            = A.Fake <ICurveNamer>();

            sut = new SimulationTimeProfileChartPresenter(_view, _chartPresenterContext, _pkAnalysisPresenter, _chartTask, _observedDataTask, _chartTemplatingTask, _chartUpdateTask);
        }
        protected override void Context()
        {
            _view = A.Fake <ISimulationTimeProfileChartView>();
            _chartDisplayPresenter          = A.Fake <IChartDisplayPresenter>();
            _pkAnalysisPresenter            = A.Fake <IIndividualPKAnalysisPresenter>();
            _chartEditorPresenter           = A.Fake <IChartEditorPresenter>();
            _chartEditorAndDisplayPresenter = A.Fake <IChartEditorAndDisplayPresenter>();
            A.CallTo(() => _chartEditorAndDisplayPresenter.Control).Returns(new Control());
            _dataColumnToPathElementsMapper = A.Fake <IDataColumnToPathElementsMapper>();
            _quantityDisplayPathMapper      = A.Fake <IQuantityPathToQuantityDisplayPathMapper>();
            _chartTask        = A.Fake <IChartTask>();
            _observedDataTask = A.Fake <IObservedDataTask>();
            _chartLayoutTask  = A.Fake <IChartEditorLayoutTask>();
            _allTemplates     = new List <ChartEditorLayoutTemplate>();
            A.CallTo(() => _chartLayoutTask.AllTemplates()).Returns(_allTemplates);
            A.CallTo(() => _chartEditorAndDisplayPresenter.EditorPresenter).Returns(_chartEditorPresenter);
            A.CallTo(() => _chartEditorAndDisplayPresenter.DisplayPresenter).Returns(_chartDisplayPresenter);
            A.CallTo(() => _chartEditorPresenter.GetDataBrowserColumnSettings(A <BrowserColumns> .Ignored)).Returns(new GridColumnSettings(BrowserColumns.Origin.ToString()));
            A.CallTo(() => _chartEditorPresenter.GetAxisOptionsColumnSettings(A <AxisOptionsColumns> .Ignored)).Returns(new GridColumnSettings(AxisOptionsColumns.AxisType.ToString()));
            A.CallTo(() => _chartEditorPresenter.GetCurveOptionsColumnSettings(A <CurveOptionsColumns> .Ignored)).Returns(new GridColumnSettings(CurveOptionsColumns.xData.ToString()));
            _chartTemplatingTask   = A.Fake <IChartTemplatingTask>();
            _projectRetriever      = A.Fake <IProjectRetriever>();
            _userSettings          = A.Fake <IUserSettings>();
            _chartPresenterContext = A.Fake <ChartPresenterContext>();

            A.CallTo(() => _chartPresenterContext.ChartEditorAndDisplayPresenter).Returns(_chartEditorAndDisplayPresenter);
            A.CallTo(() => _chartPresenterContext.QuantityDisplayPathMapper).Returns(_quantityDisplayPathMapper);
            A.CallTo(() => _chartPresenterContext.EditorLayoutTask).Returns(_chartLayoutTask);
            A.CallTo(() => _chartPresenterContext.TemplatingTask).Returns(_chartTemplatingTask);
            A.CallTo(() => _chartPresenterContext.ProjectRetriever).Returns(_projectRetriever);

            sut = new SimulationTimeProfileChartPresenter(_view, _chartPresenterContext, _pkAnalysisPresenter, _chartTask, _observedDataTask, _chartTemplatingTask, _userSettings);
        }
Esempio n. 3
0
        protected ChartPresenter(
            TView view,
            ChartPresenterContext chartPresenterContext,
            IChartTemplatingTask chartTemplatingTask,
            IIndividualPKAnalysisPresenter pkAnalysisPresenter,
            IChartTask chartTask,
            IObservedDataTask observedDataTask,
            IChartUpdater chartUpdater, bool useSimulationNameToCreateCurveName)
            : base(view, chartPresenterContext)
        {
            _chartTask        = chartTask;
            _observedDataTask = observedDataTask;
            _chartUpdater     = chartUpdater;
            _useSimulationNameToCreateCurveName = useSimulationNameToCreateCurveName;
            _view.SetChartView(chartPresenterContext.EditorAndDisplayPresenter.BaseView);
            _pkAnalysisPresenter = pkAnalysisPresenter;
            _view.SetPKAnalysisView(_pkAnalysisPresenter.View);
            AddSubPresenters(_pkAnalysisPresenter);
            _chartTemplatingTask = chartTemplatingTask;
            _repositoryCache     = new Cache <DataRepository, IndividualSimulation> {
                OnMissingKey = noDataForSimulation
            };

            ChartEditorPresenter.SetShowDataColumnInDataBrowserDefinition(IsColumnVisibleInDataBrowser);
            ChartDisplayPresenter.DragDrop   += OnDragDrop;
            ChartDisplayPresenter.DragOver   += OnDragOver;
            ChartDisplayPresenter.ExportToPDF = () => _chartTask.ExportToPDF(Chart);
            AddAllButtons();
            _chartDisplayMode           = ChartDisplayMode.Chart;
            _observedDataDragDropBinder = new ObservedDataDragDropBinder();
        }
Esempio n. 4
0
 protected override void Context()
 {
     _simulationChartQuery = A.Fake <ISimulationChartsQuery>();
     _serializationManager = A.Fake <ICompressedSerializationManager>();
     _chartTask            = A.Fake <IChartTask>();
     sut = new SimulationChartsLoader(_simulationChartQuery, _serializationManager, _chartTask);
 }
        protected override void Context()
        {
            _view                           = A.Fake <IIndividualSimulationComparisonView>();
            _chartPresenter                 = A.Fake <IChartEditorAndDisplayPresenter>();
            _pkAnalysisPresenter            = A.Fake <IIndividualPKAnalysisPresenter>();
            _curveNamer                     = A.Fake <ICurveNamer>();
            _chartTask                      = A.Fake <IChartTask>();
            _observedDataTask               = A.Fake <IObservedDataTask>();
            _lazyLoadTask                   = A.Fake <ILazyLoadTask>();
            _chartLayoutTask                = A.Fake <IChartEditorLayoutTask>();
            _chartTemplatingTask            = A.Fake <IChartTemplatingTask>();
            _dataColumnToPathElementsMapper = A.Fake <IDataColumnToPathElementsMapper>();
            _projectRetriever               = A.Fake <IProjectRetriever>();
            _chartPresenterContext          = A.Fake <ChartPresenterContext>();
            _chartUpdateTask                = A.Fake <IChartUpdater>();
            _userSettings                   = A.Fake <IUserSettings>();
            A.CallTo(() => _chartPresenterContext.EditorAndDisplayPresenter).Returns(_chartPresenter);
            A.CallTo(() => _chartPresenterContext.CurveNamer).Returns(_curveNamer);
            A.CallTo(() => _chartPresenterContext.EditorLayoutTask).Returns(_chartLayoutTask);
            A.CallTo(() => _chartPresenterContext.TemplatingTask).Returns(_chartTemplatingTask);
            A.CallTo(() => _chartPresenterContext.ProjectRetriever).Returns(_projectRetriever);

            sut = new IndividualSimulationComparisonPresenter(_view, _chartPresenterContext, _pkAnalysisPresenter,
                                                              _chartTask, _observedDataTask, _lazyLoadTask, _chartTemplatingTask, _chartUpdateTask, _userSettings);
        }
Esempio n. 6
0
 public ChartTemplatingTask(IChartFromTemplateService chartFromTemplateService, IProjectRetriever projectRetriever, IChartTemplatePersistor chartTemplatePersistor, IChartUpdater chartUpdater, IDialogCreator dialogCreator,
                            IPKSimChartFactory chartFactory, IQuantityPathToQuantityDisplayPathMapper quantityDisplayPathMapper, ICurveChartToCurveChartTemplateMapper chartTemplateMapper,
                            IExecutionContext executionContext, IApplicationController applicationController, ICloneManager cloneManager, IChartTask chartTask)
     : base(applicationController, chartTemplatePersistor, cloneManager, chartTemplateMapper, chartFromTemplateService, chartUpdater, dialogCreator)
 {
     _chartFromTemplateService  = chartFromTemplateService;
     _projectRetriever          = projectRetriever;
     _chartFactory              = chartFactory;
     _quantityDisplayPathMapper = quantityDisplayPathMapper;
     _chartTemplateMapper       = chartTemplateMapper;
     _executionContext          = executionContext;
     _chartTask = chartTask;
 }
Esempio n. 7
0
 public SummaryChartPresenter(
     ISummaryChartView view,
     IChartEditorAndDisplayPresenter chartEditorAndDisplayPresenter,
     IIndividualPKAnalysisPresenter pkAnalysisPresenter,
     IDataColumnToPathElementsMapper dataColumnToPathElementsMapper,
     IQuantityPathToQuantityDisplayPathMapper quantityDisplayPathMapper,
     IChartTask chartTask,
     IObservedDataTask observedDataTask,
     ILazyLoadTask lazyLoadTask,
     ILicense license,
     IChartEditorLayoutTask chartEditorLayoutTask,
     IChartTemplatingTask chartTemplatingTask) :
     base(view, chartEditorAndDisplayPresenter, pkAnalysisPresenter, dataColumnToPathElementsMapper, quantityDisplayPathMapper, chartTask, observedDataTask, license, chartEditorLayoutTask, chartTemplatingTask)
 {
     _lazyLoadTask        = lazyLoadTask;
     _chartTemplatingTask = chartTemplatingTask;
 }
 protected override void Context()
 {
     _chartFromTemplateService  = A.Fake <IChartFromTemplateService>();
     _projectRetriever          = A.Fake <IProjectRetriever>();
     _chartTemplatePersistor    = A.Fake <IChartTemplatePersistor>();
     _stringCompression         = A.Fake <IStringCompression>();
     _dialogCreator             = A.Fake <IDialogCreator>();
     _chartFactory              = A.Fake <IPKSimChartFactory>();
     _quantityDisplayPathMapper = A.Fake <IQuantityPathToQuantityDisplayPathMapper>();
     _chartTemplateMapper       = A.Fake <ICurveChartToCurveChartTemplateMapper>();
     _chartTask             = A.Fake <IChartTask>();
     _cloneManager          = A.Fake <ICloneManager>();
     _applicationController = A.Fake <IApplicationController>();
     _executionContext      = A.Fake <IExecutionContext>();
     _chartUpdater          = A.Fake <IChartUpdater>();
     sut = new ChartTemplatingTask(_chartFromTemplateService, _projectRetriever, _chartTemplatePersistor, _chartUpdater, _dialogCreator, _chartFactory, _quantityDisplayPathMapper, _chartTemplateMapper,
                                   _executionContext, _applicationController, _cloneManager, _chartTask);
 }
 public SimulationTimeProfileChartPresenter(ISimulationTimeProfileChartView view, ChartPresenterContext chartPresenterContext, IIndividualPKAnalysisPresenter pkAnalysisPresenter, IChartTask chartTask, IObservedDataTask observedDataTask, IChartTemplatingTask chartTemplatingTask, IChartUpdater chartUpdateTask) :
     base(view, chartPresenterContext, chartTemplatingTask, pkAnalysisPresenter, chartTask, observedDataTask, chartUpdateTask, useSimulationNameToCreateCurveName: false)
 {
     PresentationKey = PresenterConstants.PresenterKeys.SimulationTimeProfileChartPresenter;
 }
Esempio n. 10
0
 public IndividualSimulationComparisonPresenter(IIndividualSimulationComparisonView view, ChartPresenterContext chartPresenterContext, IIndividualPKAnalysisPresenter pkAnalysisPresenter, IChartTask chartTask, IObservedDataTask observedDataTask, ILazyLoadTask lazyLoadTask, IChartTemplatingTask chartTemplatingTask, IChartUpdater chartUpdater, IUserSettings userSettings) :
     base(view, chartPresenterContext, chartTemplatingTask, pkAnalysisPresenter, chartTask, observedDataTask, chartUpdater, useSimulationNameToCreateCurveName: true, userSettings)
 {
     _lazyLoadTask   = lazyLoadTask;
     PresentationKey = PresenterConstants.PresenterKeys.IndividualSimulationComparisonPresenter;
 }
Esempio n. 11
0
 public SimulationChartsLoader(ISimulationChartsQuery simulationChartsQuery, ICompressedSerializationManager serializationManager, IChartTask chartTask)
 {
     _simulationChartsQuery = simulationChartsQuery;
     _serializationManager  = serializationManager;
     _chartTask             = chartTask;
 }
Esempio n. 12
0
 public PKSimChartFactory(IContainer container, IIdGenerator idGenerator, IPresentationUserSettings presentationUserSettings,
                          IDimensionFactory dimensionFactory, ITableFormulaToDataRepositoryMapper dataRepositoryMapper, IChartTask chartTask)
     : base(container, idGenerator, presentationUserSettings, dimensionFactory, dataRepositoryMapper)
 {
     _chartTask = chartTask;
 }
Esempio n. 13
0
 public SimulationTimeProfileChartPresenter(ISimulationTimeProfileChartView view, ChartPresenterContext chartPresenterContext, IIndividualPKAnalysisPresenter pkAnalysisPresenter, IChartTask chartTask, IObservedDataTask observedDataTask, IChartTemplatingTask chartTemplatingTask, IUserSettings userSettings) :
     base(view, chartPresenterContext, chartTemplatingTask, pkAnalysisPresenter, chartTask, observedDataTask, userSettings)
 {
     PresentationKey = PresenterConstants.PresenterKeys.SimulationTimeProfileChartPresenter;
 }