protected override void Context() { _view = A.Fake <IEditTimeProfileAnalysisChartView>(); _timeProfilerChartPresenter = A.Fake <ITimeProfileChartPresenter>(); _timeProfileChartDataCreator = A.Fake <ITimeProfileChartDataCreator>(); _populationSimulationAnalysisStarter = A.Fake <IPopulationSimulationAnalysisStarter>(); _populationAnalysisTask = A.Fake <IPopulationAnalysisTask>(); _colorGenerator = A.Fake <IColorGenerator>(); _observedDataTask = A.Fake <IObservedDataTask>(); _pkAnalysisPresenter = A.Fake <IPopulationPKAnalysisPresenter>(); _dimensionRepository = A.Fake <IDimensionRepository>(); _presenterSettingsTask = A.Fake <IPresentationSettingsTask>(); sut = new EditTimeProfileAnalysisChartPresenter(_view, _timeProfilerChartPresenter, _timeProfileChartDataCreator, _populationSimulationAnalysisStarter, _populationAnalysisTask, _colorGenerator, _observedDataTask, _pkAnalysisPresenter, _dimensionRepository, _presenterSettingsTask); _timeProfileAnalysisChart = new TimeProfileAnalysisChart(); _populationStatisticalAnalysis = new PopulationStatisticalAnalysis(); _timeProfileAnalysisChart.PopulationAnalysis = _populationStatisticalAnalysis; _populationDataCollector = A.Fake <IPopulationDataCollector>(); sut.InitializeAnalysis(_timeProfileAnalysisChart, _populationDataCollector); _observedDataRepository = DomainHelperForSpecs.ObservedData(); var data = new DragDropInfo( new List <ITreeNode> { new ObservedDataNode(new ClassifiableObservedData { Subject = _observedDataRepository }) } ); _dragEventArgs = new DragEventArgs(new DataObject(data), 0, 0, 0, DragDropEffects.All, DragDropEffects.All); _chartData = new ChartData <TimeProfileXValue, TimeProfileYValue>(null, null); var concentrationDimension = DomainHelperForSpecs.ConcentrationDimensionForSpecs(); var yAxis = new AxisData(concentrationDimension, concentrationDimension.DefaultUnit, Scalings.Linear); _paneData = new PaneData <TimeProfileXValue, TimeProfileYValue>(yAxis); _chartData.AddPane(_paneData); A.CallTo(_timeProfileChartDataCreator).WithReturnType <ChartData <TimeProfileXValue, TimeProfileYValue> >().Returns(_chartData); var outputField = new PopulationAnalysisOutputField { Dimension = DomainHelperForSpecs.MassConcentrationDimensionForSpecs() }; _populationStatisticalAnalysis.Add(outputField); A.CallTo(() => _dimensionRepository.MergedDimensionFor(A <NumericFieldContext> ._)).Returns(concentrationDimension); }