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); }
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); }
public ChartPresenterContext(IChartEditorAndDisplayPresenter chartEditorAndDisplayPresenter, ICurveNamer curveNamer, IDataColumnToPathElementsMapper dataColumnToPathElementsMapper, IChartTemplatingTask chartTemplatingTask, IPresentationSettingsTask presentationSettingsTask, IChartEditorLayoutTask chartEditorLayoutTask, IProjectRetriever projectRetriever, IDimensionFactory dimensionFactory) { EditorAndDisplayPresenter = chartEditorAndDisplayPresenter; DataColumnToPathElementsMapper = dataColumnToPathElementsMapper; TemplatingTask = chartTemplatingTask; PresenterSettingsTask = presentationSettingsTask; EditorLayoutTask = chartEditorLayoutTask; ProjectRetriever = projectRetriever; DimensionFactory = dimensionFactory; CurveNamer = curveNamer; }
protected override void Context() { _presentationSettingsTask = A.Fake <IPresentationSettingsTask>(); _view = A.Fake <IParameterIdentificationMultipleRunsAnalysisView>(); _chartEditorAndDisplayPresenter = A.Fake <IChartEditorAndDisplayPresenter>(); _curveNamer = A.Fake <ICurveNamer>(); _pathElementsMapper = A.Fake <IDataColumnToPathElementsMapper>(); _chartTemplatingTask = A.Fake <IChartTemplatingTask>(); _dimensionFactory = A.Fake <IDimensionFactory>(); _displayUnitRetriever = A.Fake <IDisplayUnitRetriever>(); _chartEditorLayoutTask = A.Fake <IChartEditorLayoutTask>(); _projectRetreiver = A.Fake <IProjectRetriever>(); _chartPresenterContext = A.Fake <ChartPresenterContext>(); A.CallTo(() => _chartPresenterContext.EditorAndDisplayPresenter).Returns(_chartEditorAndDisplayPresenter); A.CallTo(() => _chartPresenterContext.CurveNamer).Returns(_curveNamer); A.CallTo(() => _chartPresenterContext.DataColumnToPathElementsMapper).Returns(_pathElementsMapper); A.CallTo(() => _chartPresenterContext.TemplatingTask).Returns(_chartTemplatingTask); A.CallTo(() => _chartPresenterContext.PresenterSettingsTask).Returns(_presentationSettingsTask); A.CallTo(() => _chartPresenterContext.DimensionFactory).Returns(_dimensionFactory); A.CallTo(() => _chartPresenterContext.EditorLayoutTask).Returns(_chartEditorLayoutTask); A.CallTo(() => _chartPresenterContext.ProjectRetriever).Returns(_projectRetreiver); sut = new ParameterIdentificationTimeProfileChartPresenter(_view, _chartPresenterContext, _displayUnitRetriever); _timeProfileAnalysis = new ParameterIdentificationTimeProfileChart(); _outputMapping1 = A.Fake <OutputMapping>(); _outputMapping2 = A.Fake <OutputMapping>(); _observedData1 = DomainHelperForSpecs.ObservedData(); _observedData2 = DomainHelperForSpecs.ObservedData(); A.CallTo(() => _outputMapping1.WeightedObservedData).Returns(new WeightedObservedData(_observedData1)); A.CallTo(() => _outputMapping2.WeightedObservedData).Returns(new WeightedObservedData(_observedData2)); _parameterIdentification = new ParameterIdentification(); _parameterIdentification.AddOutputMapping(_outputMapping1); _parameterIdentification.AddOutputMapping(_outputMapping2); _parameterIdentificationRunResult = A.Fake <ParameterIdentificationRunResult>(); _parameterIdentification.AddResult(_parameterIdentificationRunResult); _optimizationRunResult = new OptimizationRunResult(); _parameterIdentificationRunResult.BestResult = _optimizationRunResult; _parameterIdentificationRunResult = A.Fake <ParameterIdentificationRunResult>(); _parameterIdentification.AddResult(_parameterIdentificationRunResult); _optimizationRunResult2 = new OptimizationRunResult(); _parameterIdentificationRunResult.BestResult = _optimizationRunResult2; }
public ChartEditorAndDisplayPresenter(IChartEditorAndDisplayView chartEditorAndDisplayView, IChartDisplayPresenter chartDisplayPresenter, IChartEditorPresenter chartEditorPresenter, IChartEditorLayoutTask chartEditorLayoutTask, IStartOptions startOptions, IPresentationUserSettings presentationUserSettings) : base(chartEditorAndDisplayView) { _chartEditorAndDisplayView = chartEditorAndDisplayView; DisplayPresenter = chartDisplayPresenter; EditorPresenter = chartEditorPresenter; _chartEditorLayoutTask = chartEditorLayoutTask; _startOptions = startOptions; _presentationUserSettings = presentationUserSettings; _chartEditorAndDisplayView.AddDisplay(DisplayPresenter.View); _chartEditorAndDisplayView.AddEditor(EditorPresenter.View); AddSubPresenters(EditorPresenter, chartDisplayPresenter); }
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() { _view = A.Fake <IParameterIdentificationSingleRunAnalysisView>(); _chartEditorAndDisplayPresenter = A.Fake <IChartEditorAndDisplayPresenter>(); _curveNamer = A.Fake <ICurveNamer>(); _dataColumnToPathElementsMapper = A.Fake <IDataColumnToPathElementsMapper>(); _chartTemplatingTask = A.Fake <IChartTemplatingTask>(); _presentationSettingsTask = A.Fake <IPresentationSettingsTask>(); _dimensionFactory = A.Fake <IDimensionFactory>(); _predictedVsObservedService = A.Fake <IPredictedVsObservedChartService>(); _chartEditorLayoutTask = A.Fake <IChartEditorLayoutTask>(); _projectRetreiver = A.Fake <IProjectRetriever>(); _chartPresenterContext = A.Fake <ChartPresenterContext>(); A.CallTo(() => _chartPresenterContext.EditorAndDisplayPresenter).Returns(_chartEditorAndDisplayPresenter); A.CallTo(() => _chartPresenterContext.CurveNamer).Returns(_curveNamer); A.CallTo(() => _chartPresenterContext.DataColumnToPathElementsMapper).Returns(_dataColumnToPathElementsMapper); A.CallTo(() => _chartPresenterContext.TemplatingTask).Returns(_chartTemplatingTask); A.CallTo(() => _chartPresenterContext.PresenterSettingsTask).Returns(_presentationSettingsTask); A.CallTo(() => _chartPresenterContext.DimensionFactory).Returns(_dimensionFactory); A.CallTo(() => _chartPresenterContext.EditorLayoutTask).Returns(_chartEditorLayoutTask); A.CallTo(() => _chartPresenterContext.ProjectRetriever).Returns(_projectRetreiver); _observationData = DomainHelperForSpecs.ObservedData(); _simulationData = DomainHelperForSpecs.IndividualSimulationDataRepositoryFor("Simulation"); _noDimensionColumnForSimulation = _simulationData.FirstDataColumn(); _predictedVsObservedChart = new ParameterIdentificationPredictedVsObservedChart().WithAxes(); _parameterIdentification = A.Fake <ParameterIdentification>(); sut = new ParameterIdentificationPredictedVsObservedChartPresenter(_view, _chartPresenterContext, _predictedVsObservedService); _parameterIdentificationRunResult = A.Fake <ParameterIdentificationRunResult>(); A.CallTo(() => _parameterIdentification.Results).Returns(new[] { _parameterIdentificationRunResult }); _residualResults = new ResidualsResult(); _optimizationRunResult = new OptimizationRunResult { ResidualsResult = _residualResults, SimulationResults = new List <DataRepository> { _simulationData } }; _parameterIdentificationRunResult.BestResult = _optimizationRunResult; sut.InitializeAnalysis(_predictedVsObservedChart); }
protected override void Context() { _presentationSettingsTask = A.Fake <IPresentationSettingsTask>(); _view = A.Fake <IParameterIdentificationSingleRunAnalysisView>(); _chartEditorAndDisplayPresenter = A.Fake <IChartEditorAndDisplayPresenter>(); _curveNamer = A.Fake <ICurveNamer>(); _pathElementsMapper = A.Fake <IDataColumnToPathElementsMapper>(); _chartTemplatingTask = A.Fake <IChartTemplatingTask>(); _dimensionFactory = A.Fake <IDimensionFactory>(); _chartEditorLayoutTask = A.Fake <IChartEditorLayoutTask>(); _projectRetreiver = A.Fake <IProjectRetriever>(); _chartPresenterContext = A.Fake <ChartPresenterContext>(); A.CallTo(() => _chartPresenterContext.EditorAndDisplayPresenter).Returns(_chartEditorAndDisplayPresenter); A.CallTo(() => _chartPresenterContext.CurveNamer).Returns(_curveNamer); A.CallTo(() => _chartPresenterContext.DataColumnToPathElementsMapper).Returns(_pathElementsMapper); A.CallTo(() => _chartPresenterContext.TemplatingTask).Returns(_chartTemplatingTask); A.CallTo(() => _chartPresenterContext.PresenterSettingsTask).Returns(_presentationSettingsTask); A.CallTo(() => _chartPresenterContext.DimensionFactory).Returns(_dimensionFactory); A.CallTo(() => _chartPresenterContext.EditorLayoutTask).Returns(_chartEditorLayoutTask); A.CallTo(() => _chartPresenterContext.ProjectRetriever).Returns(_projectRetreiver); sut = new ParameterIdentificationResidualVsTimeChartPresenter(_view, _chartPresenterContext); _residualVsTimeChart = new ParameterIdentificationResidualVsTimeChart().WithAxes(); _parameterIdentification = A.Fake <ParameterIdentification>(); _parameterIdentificationRunResult = A.Fake <ParameterIdentificationRunResult>(); A.CallTo(() => _parameterIdentification.Results).Returns(new[] { _parameterIdentificationRunResult }); _residualResults = new ResidualsResult(); _optimizationRunResult = new OptimizationRunResult { ResidualsResult = _residualResults }; _parameterIdentificationRunResult.BestResult = _optimizationRunResult; A.CallTo(() => _parameterIdentification.MinObservedDataTime).Returns(10); A.CallTo(() => _parameterIdentification.MaxObservedDataTime).Returns(50); }