Example #1
0
 public PivotResult(PopulationPivotAnalysis analysis, DataTable pivotedData, IPopulationDataCollector populationDataCollector, ObservedDataCollection observedDataCollection, string aggregationName, string dataColumnName)
 {
     Analysis                = analysis;
     PivotedData             = pivotedData;
     PopulationDataCollector = populationDataCollector;
     ObservedDataCollection  = observedDataCollection;
     AggregationName         = aggregationName;
     DataColumnName          = dataColumnName;
 }
Example #2
0
 public void UpdateFrom(ObservedDataCollection observedDataCollection)
 {
     if (observedDataCollection == null)
     {
         return;
     }
     observedDataCollection.AllObservedData().Each(AddObservedData);
     observedDataCollection.ObservedDataCurveOptions().Each(AddCurveOptions);
     ApplyGroupingToObservedData = observedDataCollection.ApplyGroupingToObservedData;
 }
Example #3
0
 protected PopulationAnalysisChart()
 {
     Id                      = ShortGuid.NewGuid();
     ChartSettings           = new ChartSettings();
     ObservedDataCollection  = new ObservedDataCollection();
     Name                    = string.Empty;
     Title                   = string.Empty;
     FontAndSize             = new ChartFontAndSizeSettings();
     _secondaryYAxisSettings = new List <AxisSettings>();
     PrimaryXAxisSettings    = new AxisSettings();
     PrimaryYAxisSettings    = new AxisSettings();
 }
Example #4
0
        protected override Task Context()
        {
            _curveOptionsMapper = A.Fake <CurveOptionsMapper>();
            sut = new ObservedDataCollectionMappper(_curveOptionsMapper);

            _observedDataRepository = DomainHelperForSpecs.ObservedData("ID").WithName("ObsData");
            _observedDataCollection = new Model.PopulationAnalyses.ObservedDataCollection();
            _observedDataCollection.ApplyGroupingToObservedData = true;
            _observedDataCollection.AddObservedData(_observedDataRepository);
            _firstObservedDataColumn  = _observedDataRepository.ObservationColumns().First();
            _observedDataCurveOptions = new ObservedDataCurveOptions
            {
                Caption  = "Obs Data Caption",
                ColumnId = _firstObservedDataColumn.Id
            };

            _observedDataCollection.AddCurveOptions(_observedDataCurveOptions);
            _snapshotCurveOptions = new CurveOptions();
            A.CallTo(() => _curveOptionsMapper.MapToSnapshot(_observedDataCurveOptions.CurveOptions)).Returns(_snapshotCurveOptions);
            return(_completed);
        }
Example #5
0
 protected override async Task Because()
 {
     _result = await sut.MapToModel(null, new SimulationAnalysisContext());
 }
Example #6
0
 protected override async Task Because()
 {
     _newObservedDataCollection = await sut.MapToModel(_snapshot, _simulationAnalysisContext);
 }
Example #7
0
 public void AddObservedData(DataRepository dataRepository)
 {
     ObservedDataCollection.AddObservedData(dataRepository);
 }
Example #8
0
 public CurveOptions CurveOptionsFor(DataColumn dataColumn)
 {
     return(ObservedDataCollection.ObservedDataCurveOptionsFor(dataColumn).CurveOptions);
 }
Example #9
0
 public void RemoveObservedData(DataRepository dataRepository)
 {
     ObservedDataCollection.RemoveObservedData(dataRepository);
 }
Example #10
0
 public bool UsesObservedData(DataRepository dataRepository)
 {
     return(ObservedDataCollection.UsesObservedData(dataRepository));
 }
Example #11
0
 public IEnumerable <DataRepository> AllObservedData()
 {
     return(ObservedDataCollection.AllObservedData());
 }