protected override void Context() { base.Context(); _curve = new Curve(); _curve.SetxData(A.Fake <DataColumn>(), A.Fake <IDimensionFactory>()); _chartEditorPresenter = A.Fake <IChartEditorPresenter>(); _simulations = A.Fake <IReadOnlyCollection <IndividualSimulation> >(); var individualSimulation = new IndividualSimulation { SimulationSettings = new SimulationSettings() }; _simulations = new List <IndividualSimulation> { individualSimulation }; var simulationConcentrationChart = new SimulationTimeProfileChart(); individualSimulation.AddAnalysis(simulationConcentrationChart); var dataRepository = generateDataRepository(); individualSimulation.AddUsedObservedData(dataRepository); simulationConcentrationChart.AddObservedData(dataRepository); simulationConcentrationChart.AddCurve(_curve); A.CallTo(() => _projectRetriever.CurrentProject.ObservedDataBy(dataRepository.Id)).Returns(dataRepository); _chartEditorPresenter.Edit(new CurveChart()); }
protected override void Context() { base.Context(); _chart = new SimulationTimeProfileChart(); _curve = new Curve(); _curve.SetxData(A.Fake <DataColumn>(), A.Fake <IDimensionFactory>()); _curve.SetyData(A.Fake <DataColumn>(), A.Fake <IDimensionFactory>()); _chart.AddCurve(_curve); sut.InitializeAnalysis(_chart); sut.UpdateAnalysisBasedOn(A.Fake <IndividualSimulation>()); sut.SwitchPKAnalysisPlot(); }
protected override Task Context() { _axisMapper = A.Fake <AxisMapper>(); _curveMapper = A.Fake <CurveMapper>(); _chartMapper = A.Fake <ChartMapper>(); _idGenerator = A.Fake <IIdGenerator>(); sut = new SimulationTimeProfileChartMapper(_chartMapper, _axisMapper, _curveMapper, _idGenerator); var dimensionFactory = A.Fake <IDimensionFactory>(); _curveChart = new SimulationTimeProfileChart { Name = "Chart", Description = "ChartDescription", Title = "Chart Title", OriginText = "Chart Origin Text", IncludeOriginData = true, PreviewSettings = true, }; _axis = new Axis(AxisTypes.X); _curveChart.AddAxis(_axis); _curve = new Curve(); var dataRepository = DomainHelperForSpecs.ObservedData(); var xColumn = dataRepository.BaseGrid; var yColumn = dataRepository.ObservationColumns().First(); _curve.SetxData(xColumn, dimensionFactory); _curve.SetyData(yColumn, dimensionFactory); _curveChart.AddCurve(_curve); _snapshotAxis = new Snapshots.Axis(); A.CallTo(() => _axisMapper.MapToSnapshot(_axis)).Returns(_snapshotAxis); _snapshotCurve = new Snapshots.Curve(); A.CallTo(() => _curveMapper.MapToSnapshot(_curve)).Returns(_snapshotCurve); return(_completed); }