protected override void Context()
        {
            _editObservedDataTask = A.Fake <IEditObservedDataTask>();
            _view = A.Fake <IDataRepositoryDataView>();
            _dataRepositoryTask = A.Fake <IDataRepositoryExportTask>();
            _commandCollector   = A.Fake <ICommandCollector>();
            sut = new DataRepositoryDataPresenter(_view, _dataRepositoryTask, _editObservedDataTask);
            sut.InitializeWith(_commandCollector);

            //common setup
            _dataRepository = new DataRepository();
            _dataTable      = new DataTable();
            A.CallTo(() => _dataRepositoryTask.ToDataTable(_dataRepository, A <DataColumnExportOptions> ._)).Returns(new[] { _dataTable });

            var col = _dataTable.AddColumn <float>("test");

            col.ExtendedProperties.Add(Constants.DATA_REPOSITORY_COLUMN_ID, "col");
            _baseGrid = new BaseGrid("base", "base", Constants.Dimension.NO_DIMENSION)
            {
                Values = new ArraySegment <float>()
            };
            _dim = A.Fake <IDimension>();
            _col = new DataColumn("col", "col", _dim, _baseGrid)
            {
                Values = new ArraySegment <float>()
            };
            _dataRepository.Add(_baseGrid);
            _dataRepository.Add(_col);
        }
Beispiel #2
0
 public DataRepositoryDataPresenter(IDataRepositoryDataView view, IDataRepositoryTask dataRepositoryTask, IEditObservedDataTask editObservedDataTask)
     : base(view)
 {
     _dataRepositoryTask   = dataRepositoryTask;
     _editObservedDataTask = editObservedDataTask;
     _numericFormatter     = new NumericFormatter <double>(NumericFormatterOptions.Instance);
 }
 public DataRepositoryMetaDataPresenter(IDataRepositoryMetaDataView view, IEditObservedDataTask editObservedDataTask,
                                        IObservedDataConfiguration observedDataConfiguration, IParameterFactory parameterFactory, IDimensionFactory dimensionFactory)
     : base(view)
 {
     _editObservedDataTask      = editObservedDataTask;
     _observedDataConfiguration = observedDataConfiguration;
     _parameterFactory          = parameterFactory;
     _molWeightDimension        = dimensionFactory.Dimension(Constants.Dimension.MOLECULAR_WEIGHT);
 }
        protected override void Context()
        {
            _commandCollector     = A.Fake <ICommandCollector>();
            _editObservedDataTask = A.Fake <IEditObservedDataTask>();
            _view = A.Fake <IDataRepositoryMetaDataView>();
            _observedDataConfiguration = A.Fake <IObservedDataConfiguration>();
            _dataRepository            = new DataRepository();
            _dimensionFactory          = A.Fake <IDimensionFactory>();
            _parameterFactory          = A.Fake <IParameterFactory>();
            sut = new DataRepositoryMetaDataPresenter(_view, _editObservedDataTask, _observedDataConfiguration, _parameterFactory, _dimensionFactory);
            sut.InitializeWith(_commandCollector);
            sut.EditObservedData(_dataRepository);

            var baseGrid = new BaseGrid("time", DomainHelperForSpecs.TimeDimensionForSpecs());

            _dataColumn1 = new DataColumn("Col1", "Col1", DomainHelperForSpecs.ConcentrationDimensionForSpecs(), baseGrid);
            _dataColumn2 = new DataColumn("Col2", "Col2", DomainHelperForSpecs.ConcentrationDimensionForSpecs(), baseGrid);
            _dataRepository.Add(_dataColumn1);
            _dataRepository.Add(_dataColumn2);
        }
 public DataRepositoryDataPresenter(IDataRepositoryDataView view, IDataRepositoryTask dataRepositoryTask, IEditObservedDataTask editObservedDataTask)
     : base(view)
 {
     _dataRepositoryTask   = dataRepositoryTask;
     _editObservedDataTask = editObservedDataTask;
 }
Beispiel #6
0
 public EditMultipleMetaDataUICommand(IEditObservedDataTask observedDataTask)
 {
     _observedDataTask = observedDataTask;
 }