protected override void Context() { base.Context(); _statisticalAnalysis.SetPosition(_outputFieldVenousBloodPlasma, PivotArea.DataArea, 0); _statisticalAnalysis.Statistics.Each(s => s.Selected = false); _pivotResult = ChartDataHelperForSpecs.CreateOutputResults(_statisticalAnalysis, _genderField, _outputFieldVenousBloodPlasma, _outputFieldLiverCell); }
protected override void Context() { _dimensionRepository = A.Fake <IDimensionRepository>(); _representationInfoRepository = A.Fake <IRepresentationInfoRepository>(); _lazyLoadTask = A.Fake <ILazyLoadTask>(); _observedcurveDataMapper = A.Fake <IDataRepositoryToObservedCurveDataMapper>(); _statisticalAnalysis = new PopulationStatisticalAnalysis(); _genderField = ChartDataHelperForSpecs.CreateGenderField(); _statisticalAnalysis.Add(_genderField); _statisticalAnalysis.Add(_outputFieldVenousBloodPlasma); _statisticalAnalysis.Add(_outputFieldLiverCell); _predefinedStatisticalAggregation = new PredefinedStatisticalAggregation { Selected = true }; _percentileStatisticalAggregation = new PercentileStatisticalAggregation { Selected = false, Percentile = 50 }; _statisticalAnalysis.AddStatistic(_predefinedStatisticalAggregation); _statisticalAnalysis.AddStatistic(_percentileStatisticalAggregation); A.CallTo(() => _representationInfoRepository.DisplayNameFor(_predefinedStatisticalAggregation)).Returns(_singlecurveId); A.CallTo(() => _representationInfoRepository.DisplayNameFor(_percentileStatisticalAggregation)).Returns(_percentileId); _statisticalDataCalculator = new StatisticalDataCalculator(); _pivotResultCreator = A.Fake <IPivotResultCreator>(); sut = new TimeProfileChartDataCreator(_dimensionRepository, _pivotResultCreator, _representationInfoRepository, _statisticalDataCalculator, _lazyLoadTask, _observedcurveDataMapper); }
protected override void Context() { base.Context(); _observedCurveDataList = new List <ObservedCurveData>(); _observedCurveData = new ObservedCurveData(AuxiliaryType.Undefined) { Caption = "Male" }; _observedCurveDataList.Add(_observedCurveData); _observedCurveData.Color = Color.Aqua; A.CallTo(_observedCurveDataMapper).WithReturnType <IReadOnlyList <ObservedCurveData> >().Returns(_observedCurveDataList); _statisticalAnalysis.SetPosition(_genderField, PivotArea.RowArea, 0); _statisticalAnalysis.SetPosition(_outputFieldVenousBloodPlasma, PivotArea.DataArea, 0); _statisticalAnalysis.SetPosition(_outputFieldLiverCell, PivotArea.DataArea, 1); _predefinedStatisticalAggregation.Method = StatisticalAggregationType.ArithmeticMean; _percentileStatisticalAggregation.Selected = true; _observedDataCollection = new ObservedDataCollection { ApplyGroupingToObservedData = true }; var observedData = DomainHelperForSpecs.ObservedData(); observedData.ExtendedProperties.Add(new ExtendedProperty <string> { Name = _genderField.Name, Value = "Male" }); _observedDataCollection.AddObservedData(observedData); _pivotResult = ChartDataHelperForSpecs.CreateOutputResults(_statisticalAnalysis, _genderField, _outputFieldVenousBloodPlasma, _outputFieldLiverCell, _observedDataCollection); }
protected override void Context() { base.Context(); _pivotAnalysis.SetPosition(_genderField, PivotArea.FilterArea, 0); _pivotAnalysis.SetPosition(_raceField, PivotArea.FilterArea, 0); _pivotAnalysis.SetPosition(_bmiClass, PivotArea.FilterArea, 0); _pivotResult = ChartDataHelperForSpecs.CreatePivotResult(_pivotAnalysis, _aggregate, _genderField, _raceField, _bmiField, _cmaxField); }
protected override void Context() { base.Context(); _pivotAnalysis.SetPosition(_genderField, PivotArea.RowArea, 0); _pivotAnalysis.SetPosition(_cmaxField, PivotArea.DataArea, 0); _pivotAnalysis.SetPosition(_bmiField, PivotArea.DataArea, 1); _pivotResult = ChartDataHelperForSpecs.CreatePivotResult(_pivotAnalysis, AggregationFunctions.ValuesAggregation, _genderField, _raceField, _bmiField, _cmaxField); }
protected override void Context() { base.Context(); _statisticalAnalysis.SetPosition(_genderField, PivotArea.RowArea, 0); _statisticalAnalysis.SetPosition(_outputFieldVenousBloodPlasma, PivotArea.DataArea, 0); _statisticalAnalysis.SetPosition(_outputFieldLiverCell, PivotArea.DataArea, 1); _predefinedStatisticalAggregation.Method = StatisticalAggregationType.Range95; _pivotResult = ChartDataHelperForSpecs.CreateOutputResults(_statisticalAnalysis, _genderField, _outputFieldVenousBloodPlasma, _outputFieldLiverCell); }
protected override void Context() { base.Context(); _chartData = new ChartData <BoxWhiskerXValue, BoxWhiskerYValue>(null, ChartDataHelperForSpecs.FieldValueComparersR1(), Helper.XValueNames, Helper.XValueComparer()); _paneData1 = Helper.CreateBoxWhiskerPaneData11(_chartData); _paneData2 = Helper.CreateBoxWhiskerPaneData12(_chartData); _chartData.AddPane(_paneData2); _chartData.AddPane(_paneData1); }
protected override void Context() { base.Context(); _statisticalAnalysis.SetPosition(_outputFieldVenousBloodPlasma, PivotArea.DataArea, 0); _pivotResult = ChartDataHelperForSpecs.CreateOutputResults(_statisticalAnalysis, _genderField, _outputFieldVenousBloodPlasma, _outputFieldLiverCell); foreach (DataRow dataRow in _pivotResult.PivotedData.Rows) { dataRow[_pivotResult.AggregationName] = DBNull.Value; } }
protected override void Context() { base.Context(); _statisticalAnalysis.SetPosition(_genderField, PivotArea.ColumnArea, 0); _statisticalAnalysis.ColorField = _genderField; _statisticalAnalysis.SetPosition(_outputFieldVenousBloodPlasma, PivotArea.DataArea, 0); _statisticalAnalysis.SetPosition(_outputFieldLiverCell, PivotArea.DataArea, 1); _predefinedStatisticalAggregation.Method = StatisticalAggregationType.ArithmeticMean; _percentileStatisticalAggregation.Selected = true; _pivotResult = ChartDataHelperForSpecs.CreateOutputResults(_statisticalAnalysis, _genderField, _outputFieldVenousBloodPlasma, _outputFieldLiverCell); }
public void should_contain_data() { var curveData1 = ChartDataHelperForSpecs.CreateBoxWhiskerCurveData111(sut); var curveData2 = ChartDataHelperForSpecs.CreateBoxWhiskerCurveData112(sut); sut.AddCurve(curveData1); sut.AddCurve(curveData2); sut.Curves.Count.ShouldBeEqualTo(2); sut.Curves["Male"].ShouldBeEqualTo(curveData1); sut.Curves["Female"].ShouldBeEqualTo(curveData2); }
protected override void Context() { base.Context(); _pivotAnalysis.SetPosition(_bmiClass, PivotArea.ColorArea, 0); _pivotAnalysis.SetPosition(_cmaxField, PivotArea.DataArea, 0); _pivotAnalysis.SetPosition(_bmiField, PivotArea.DataArea, 1); _pivotResult = ChartDataHelperForSpecs.CreatePivotResult(_pivotAnalysis, AggregationFunctions.ValuesAggregation, _genderField, _raceField, _bmiField, _cmaxField, cmaxValues: new double[] { 600, 800, 600 }); }
protected override void Context() { _chartData = ChartDataHelperForSpecs.CreateBoxWhiskerChartData(); var name = "TMax"; _axisData = ChartDataHelperForSpecs.CreateAxisData(name); sut = new PaneData <BoxWhiskerXValue, BoxWhiskerYValue>(_axisData, new Dictionary <string, string> { { name, name } }, ChartDataHelperForSpecs.FieldValueComparersR1()); sut.Caption = name; sut.Id = name; sut.Chart = _chartData; }
protected override void Context() { var chartData = ChartDataHelperForSpecs.CreateBoxWhiskerChartData(); _paneData = ChartDataHelperForSpecs.CreateBoxWhiskerPaneData11(chartData); var name = "Male"; sut = new CurveData <BoxWhiskerXValue, BoxWhiskerYValue>(new Dictionary <string, string> { { name, name } }); sut.Id = name; sut.Caption = name; sut.Pane = _paneData; }
protected override void Context() { _dimensionRepository = A.Fake <IDimensionRepository>(); _representationInfoRepository = A.Fake <IRepresentationInfoRepository>(); _lazyLoadTask = A.Fake <ILazyLoadTask>(); _observedCurveDataMapper = A.Fake <IDataRepositoryToObservedCurveDataMapper>(); _statisticalAnalysis = new PopulationStatisticalAnalysis(); _genderField = ChartDataHelperForSpecs.CreateGenderField(); _statisticalAnalysis.Add(_genderField); _statisticalAnalysis.Add(_outputFieldVenousBloodPlasma); _statisticalAnalysis.Add(_outputFieldLiverCell); _predefinedStatisticalAggregation = new PredefinedStatisticalAggregation { Selected = true }; _percentileStatisticalAggregation = new PercentileStatisticalAggregation { Selected = false, Percentile = 50 }; _statisticalAnalysis.AddStatistic(_predefinedStatisticalAggregation); _statisticalAnalysis.AddStatistic(_percentileStatisticalAggregation); A.CallTo(() => _representationInfoRepository.DisplayNameFor(_predefinedStatisticalAggregation)).Returns(_singleCurveId); A.CallTo(() => _representationInfoRepository.DisplayNameFor(_percentileStatisticalAggregation)).Returns(_percentileId); _statisticalDataCalculator = new StatisticalDataCalculator(); _pivotResultCreator = A.Fake <IPivotResultCreator>(); _mergedDimensionVenousBloodPlasma = DomainHelperForSpecs.ConcentrationDimensionForSpecs(); _mergedDimensionLiverCell = DomainHelperForSpecs.FractionDimensionForSpecs(); A.CallTo(() => _dimensionRepository.MergedDimensionFor(A <IWithDimension> ._)) .WhenArgumentsMatch((IWithDimension context) => Equals((context as NumericFieldContext)?.NumericValueField, _outputFieldVenousBloodPlasma)) .Returns(_mergedDimensionVenousBloodPlasma); A.CallTo(() => _dimensionRepository.MergedDimensionFor(A <IWithDimension> ._)) .WhenArgumentsMatch((IWithDimension context) => Equals((context as NumericFieldContext)?.NumericValueField, _outputFieldLiverCell)) .Returns(_mergedDimensionLiverCell); sut = new TimeProfileChartDataCreator(_dimensionRepository, _pivotResultCreator, _representationInfoRepository, _statisticalDataCalculator, _lazyLoadTask, _observedCurveDataMapper); }
protected override void Context() { sut = new ChartData <BoxWhiskerXValue, BoxWhiskerYValue>(null, ChartDataHelperForSpecs.FieldValueComparersR1(), Helper.XValueNames, Helper.XValueComparer()); }
protected override void Context() { base.Context(); _pivotResult = ChartDataHelperForSpecs.CreatePivotResult(_pivotAnalysis, _aggregate, _genderField, _raceField, _bmiField, _cmaxField); }