protected override void Context() { _view = A.Fake <IChartEditorView>(); _axisSettingsPresenter = A.Fake <IAxisSettingsPresenter>(); _chartSettingsPresenter = A.Fake <IChartSettingsPresenter>(); _chartExportSettingsPresenter = A.Fake <IChartExportSettingsPresenter>(); _curveSettingsPresenter = A.Fake <ICurveSettingsPresenter>(); _dataBrowserPresenter = A.Fake <IDataBrowserPresenter>(); _chartTemplateMenuPresenter = A.Fake <IChartTemplateMenuPresenter>(); _chartUpdater = A.Fake <IChartUpdater>(); _eventPublisher = A.Fake <IEventPublisher>(); _dimensionFactory = A.Fake <IDimensionFactory>(); sut = new ChartEditorPresenter(_view, _axisSettingsPresenter, _chartSettingsPresenter, _chartExportSettingsPresenter, _curveSettingsPresenter, _dataBrowserPresenter, _chartTemplateMenuPresenter, _chartUpdater, _eventPublisher, _dimensionFactory); sut.SetCurveNameDefinition(x => x.QuantityInfo.PathAsString); _chart = new CurveChart().WithAxes(); sut.Edit(_chart); _baseGrid = new BaseGrid("Time", DomainHelperForSpecs.TimeDimensionForSpecs()); _standardColumn = new DataColumn("Standard", DomainHelperForSpecs.ConcentrationDimensionForSpecs(), _baseGrid) { DataInfo = new DataInfo(ColumnOrigins.Calculation), }; A.CallTo(() => _dimensionFactory.MergedDimensionFor(_baseGrid)).Returns(_baseGrid.Dimension); A.CallTo(() => _dimensionFactory.MergedDimensionFor(_standardColumn)).Returns(_standardColumn.Dimension); }
private void bindCurveChartToEditor() { Chart = new CurveChart { OriginText = Captions.ChartFingerprintDataFrom("Test Chart Project", "Test Chart Simulation", DateTime.Now.ToIsoFormat()), Title = "The Chart Title" }; Chart.ChartSettings.BackColor = Color.White; ChartEditorPresenter.Edit(Chart); }