public PopulationAnalysisOutputSelectionPresenter(
     IPopulationAnalysisOutputSelectionView view,
     IQuantityListPresenter allOutputsPresenter,
     IPopulationAnalysisOutputFieldsPresenter selectedOutputsPresenter,
     IPopulationAnalysisStatisticsSelectionPresenter statisticsSelectionPresenter,
     IEntitiesInContainerRetriever outputsRetriever,
     IEventPublisher eventPublisher,
     IDimensionRepository dimensionRepository,
     IQuantityPathToQuantityDisplayPathMapper quantityDisplayPathMapper) : base(view)
 {
     _allOutputsPresenter          = allOutputsPresenter;
     _selectedOutputsPresenter     = selectedOutputsPresenter;
     _statisticsSelectionPresenter = statisticsSelectionPresenter;
     _outputsRetriever             = outputsRetriever;
     _eventPublisher            = eventPublisher;
     _quantityDisplayPathMapper = quantityDisplayPathMapper;
     _timeDimension             = dimensionRepository.Time;
     AddSubPresenters(allOutputsPresenter, _selectedOutputsPresenter, _statisticsSelectionPresenter);
     _view.AddPopulationOutputsView(_allOutputsPresenter.View);
     _view.AddSelectedOutputsView(_selectedOutputsPresenter.View);
     _view.AddStatisticsSelectionView(_statisticsSelectionPresenter.View);
     _allOutputsPresenter.QuantityDoubleClicked += (o, e) => addOutput(e.Quantity);
     _allOutputsPresenter.Hide(QuantityColumn.Selection);
     _statisticsSelectionPresenter.SelectionChanged += (o, e) => selectionChanged();
     _allOutputsPresenter.ExpandAllGroups            = true;
 }
        protected override void Context()
        {
            _view = A.Fake <IPopulationAnalysisFieldsView>();
            _quantitiesRetriever            = A.Fake <IEntitiesInContainerRetriever>();
            _contextMenuFactory             = A.Fake <IPopulationAnalysesContextMenuFactory>();
            _populationAnalysisFieldFactory = A.Fake <IPopulationAnalysisFieldFactory>();
            _populationAnalysisTemplateTask = A.Fake <IPopulationAnalysisTemplateTask>();
            _dialogCreator  = A.Fake <IDialogCreator>();
            _fieldDTOMapper = A.Fake <IPopulationAnalysisFieldToPopulationAnalysisFieldDTOMapper>();
            _parameterCache = new PathCacheForSpecs <IParameter>();
            _eventPublisher = A.Fake <IEventPublisher>();
            _populationAnalysisGroupingFieldCreator = A.Fake <IPopulationAnalysisGroupingFieldCreator>();
            sut = new PopulationAnalysisParameterFieldsPresenter(_view, _contextMenuFactory, _quantitiesRetriever, _populationAnalysisFieldFactory,
                                                                 _eventPublisher, _populationAnalysisGroupingFieldCreator, _populationAnalysisTemplateTask, _dialogCreator, _fieldDTOMapper);

            A.CallTo(_quantitiesRetriever).WithReturnType <PathCache <IParameter> >().Returns(_parameterCache);
            _populationPivotAnalysis = new PopulationPivotAnalysis();
            _populationDataCollector = A.Fake <IPopulationDataCollector>();
            sut.StartAnalysis(_populationDataCollector, _populationPivotAnalysis);

            _parameter      = A.Fake <IParameter>();
            _parameterField = new PopulationAnalysisParameterField {
                ParameterPath = _parameterPath, Name = "ParameterField"
            };
            A.CallTo(() => _populationAnalysisFieldFactory.CreateFor(_parameter)).Returns(_parameterField);

            _derivedField = A.Fake <PopulationAnalysisDerivedField>();
            A.CallTo(() => _derivedField.ReferencedFieldNames).Returns(new[] { _parameterField.Name });

            _parameterCache.Add(_parameterPath, _parameter);
        }
示例#3
0
 protected override void Context()
 {
     _quantityRetriever    = A.Fake <IEntitiesInContainerRetriever>();
     _dimensionRepository  = A.Fake <IDimensionRepository>();
     _displayUnitRetriever = A.Fake <IDisplayUnitRetriever>();
     sut = new SimulationResultsToDataTableConverter(_dimensionRepository, _quantityRetriever, _displayUnitRetriever);
 }
示例#4
0
 public PopulationAnalysisAvailablePKParametersPresenter(IPopulationAnalysisAvailablePKParametersView view,
                                                         IQuantityToQuantitySelectionDTOMapper quantitySelectionDTOMapper, IEntitiesInContainerRetriever entitiesInContainerRetriever, IPKParameterRepository pkParameterRepository)
     : base(view)
 {
     _quantitySelectionDTOMapper   = quantitySelectionDTOMapper;
     _entitiesInContainerRetriever = entitiesInContainerRetriever;
     _pkParameterRepository        = pkParameterRepository;
     _allPKParameters = new List <QuantityPKParameterDTO>();
 }
示例#5
0
 public JsonSimulationRunner(ISimulationLoader simulationLoader, ISimulationExporter simulationExporter, IBatchLogger logger,
                             IEntitiesInContainerRetriever entitiesInContainerRetriever, IExecutionContext executionContext, ICommandTask commandTask)
 {
     _simulationLoader             = simulationLoader;
     _simulationExporter           = simulationExporter;
     _logger                       = logger;
     _entitiesInContainerRetriever = entitiesInContainerRetriever;
     _executionContext             = executionContext;
     _commandTask                  = commandTask;
 }
示例#6
0
 protected override void Context()
 {
     _view = A.Fake <IPopulationAnalysisOutputSelectionView>();
     _allOutputsPresenter         = A.Fake <IQuantityListPresenter>();
     _selectedOutputsPresenter    = A.Fake <IPopulationAnalysisOutputFieldsPresenter>();
     _statisticSelectionPresenter = A.Fake <IPopulationAnalysisStatisticsSelectionPresenter>();
     _outputsRetriever            = A.Fake <IEntitiesInContainerRetriever>();
     _eventPublisher      = A.Fake <IEventPublisher>();
     _dimensionRepository = A.Fake <IDimensionRepository>();
     _timeDimension       = A.Fake <IDimension>();
     A.CallTo(() => _dimensionRepository.Time).Returns(_timeDimension);
     sut = new PopulationAnalysisOutputSelectionPresenter(_view, _allOutputsPresenter, _selectedOutputsPresenter, _statisticSelectionPresenter, _outputsRetriever, _eventPublisher, _dimensionRepository);
 }
示例#7
0
 protected override void Context()
 {
     _token = new CancellationToken();
     _populationSimulation            = A.Fake <PopulationSimulation>();
     _pkAnalyses                      = A.Fake <PopulationSimulationPKAnalyses>();
     _populationSimulation.PKAnalyses = _pkAnalyses;
     _quantityRetriever               = A.Fake <IEntitiesInContainerRetriever>();
     _pkAnalysesImporter              = A.Fake <ISimulationPKAnalysesImporter>();
     _availableQuantities             = new PathCacheForSpecs <IQuantity>();
     A.CallTo(_pkAnalysesImporter).WithReturnType <IEnumerable <QuantityPKParameter> >().Returns(_importedPKParameters);
     A.CallTo(() => _quantityRetriever.OutputsFrom(_populationSimulation)).Returns(_availableQuantities);
     sut = new SimulationPKParametersImportTask(_pkAnalysesImporter, _quantityRetriever);
 }
示例#8
0
 protected override void Context()
 {
     _dialogCreator = A.Fake <IDialogCreator>();
     _templateTask  = A.Fake <ITemplateTask>();
     _keyPathMapper = A.Fake <IKeyPathMapper>();
     _entitiesInContainerRetriever = A.Fake <IEntitiesInContainerRetriever>();
     _entityTask = A.Fake <IEntityTask>();
     _cloner     = A.Fake <ICloner>();
     _simulationAnalysisWorkflowMapper = A.Fake <IAnalysableToSimulationAnalysisWorkflowMapper>();
     _simulationAnalysisCreator        = A.Fake <ISimulationAnalysisCreator>();
     _lazyLoadTask = A.Fake <ILazyLoadTask>();
     sut           = new PopulationAnalysisTemplateTask(_templateTask, _dialogCreator, _entitiesInContainerRetriever,
                                                        _keyPathMapper, _entityTask, _cloner, _simulationAnalysisWorkflowMapper, _simulationAnalysisCreator, _lazyLoadTask);
 }
示例#9
0
 public ImportSimulationTask(ISimulationTransferLoader simulationTransferLoader, ISimulationFactory simulationFactory, IEntitiesInContainerRetriever parameterRetriever, ISimulationBuildingBlockUpdater simulationBuildingBlockUpdater,
                             IIndividualPropertiesCacheImporter individualPropertiesCacheImporter, IExecutionContext executionContext, IObjectBaseFactory objectBaseFactory,
                             ISimulationUpdaterAfterDeserialization simulationUpdaterAfterDeserialization, IAdvancedParameterFactory advancedParameterFactory)
 {
     _simulationTransferLoader          = simulationTransferLoader;
     _simulationFactory                 = simulationFactory;
     _parameterRetriever                = parameterRetriever;
     _simulationBuildingBlockUpdater    = simulationBuildingBlockUpdater;
     _individualPropertiesCacheImporter = individualPropertiesCacheImporter;
     _executionContext  = executionContext;
     _objectBaseFactory = objectBaseFactory;
     _simulationUpdaterAfterDeserialization = simulationUpdaterAfterDeserialization;
     _advancedParameterFactory = advancedParameterFactory;
 }
 protected override void Context()
 {
     _individualResultsImporter = A.Fake <IIndividualResultsImporter>();
     _containerTask             = A.Fake <IEntitiesInContainerRetriever>();
     _progressManager           = A.Fake <IProgressManager>();
     _populationSimulation      = A.Fake <PopulationSimulation>();
     _files = new List <string> {
         _file1, _file2
     };
     _cancellationToken = new CancellationToken();
     sut = new SimulationResultsImportTask(_containerTask, _individualResultsImporter, _progressManager);
     A.CallTo(_containerTask).WithReturnType <PathCache <IQuantity> >().Returns(_allQuantities);
     A.CallTo(() => _individualResultsImporter.ImportFrom(_file1, _populationSimulation, A <IImportLogger> ._)).Returns(_individualResults1);
     A.CallTo(() => _individualResultsImporter.ImportFrom(_file2, _populationSimulation, A <IImportLogger> ._)).Returns(_individualResults2);
 }
示例#11
0
 protected override void Context()
 {
     _simulationTransferLoader       = A.Fake <ISimulationTransferLoader>();
     _simulationFactory              = A.Fake <ISimulationFactory>();
     _parameterRetriever             = A.Fake <IEntitiesInContainerRetriever>();
     _simulationBuildingBlockUpdater = A.Fake <ISimulationBuildingBlockUpdater>();
     _executionContext = A.Fake <IExecutionContext>();
     _individualPropertiesCacheImporter = A.Fake <IIndividualPropertiesCacheImporter>();
     _objectBaseFactory = A.Fake <IObjectBaseFactory>();
     _simulationUpdaterAfterDeserialization = A.Fake <ISimulationUpdaterAfterDeserialization>();
     _advancedParameterFactory = A.Fake <IAdvancedParameterFactory>();
     sut = new ImportSimulationTask(_simulationTransferLoader, _simulationFactory, _parameterRetriever,
                                    _simulationBuildingBlockUpdater, _individualPropertiesCacheImporter, _executionContext, _objectBaseFactory,
                                    _simulationUpdaterAfterDeserialization, _advancedParameterFactory);
 }
示例#12
0
        protected override Task Context()
        {
            _entitiesInContainerRetriever = A.Fake <IEntitiesInContainerRetriever>();
            _logger = A.Fake <ILogger>();
            sut     = new OutputSelectionsMapper(_entitiesInContainerRetriever, _logger);

            _quantitySelection1 = new QuantitySelection("PATH1", QuantityType.Drug);
            _quantitySelection2 = new QuantitySelection("PATH2", QuantityType.Observer);

            _outputSelections = new OutputSelections();
            _outputSelections.AddOutput(_quantitySelection1);
            _outputSelections.AddOutput(_quantitySelection2);

            _simulation    = new IndividualSimulation();
            _allQuantities = new PathCacheForSpecs <IQuantity>();

            A.CallTo(() => _entitiesInContainerRetriever.QuantitiesFrom(_simulation)).Returns(_allQuantities);

            return(Task.FromResult(true));
        }
 protected override void Context()
 {
     base.Context();
     _context                = A.Fake <IExecutionContext>();
     _quantityRetriever      = A.Fake <IEntitiesInContainerRetriever>();
     _populationAnalysisTask = A.Fake <IPKAnalysesTask>();
     _pkAnalyses             = A.Fake <PopulationSimulationPKAnalyses>();
     _quantityCache          = new PathCacheForSpecs <IQuantity>();
     _quantity1              = new MoleculeAmount();
     _quantity2              = new MoleculeAmount();
     _quantityCache.Add("PATH1", _quantity1);
     _quantityCache.Add("PATH2", _quantity2);
     A.CallTo(() => _context.Resolve <IEntitiesInContainerRetriever>()).Returns(_quantityRetriever);
     A.CallTo(() => _context.Resolve <IPKAnalysesTask>()).Returns(_populationAnalysisTask);
     A.CallTo(() => _quantityRetriever.QuantitiesFrom(_populationSimulation)).Returns(_quantityCache);
     A.CallTo(() => _populationAnalysisTask.CalculateFor(_populationSimulation)).Returns(_pkAnalyses);
     _allQuantityPaths = new List <string> {
         "PATH1", "PATH2"
     };
     _simulationSettings = new OutputSelections();
     A.CallTo(() => _populationSimulation.OutputSelections).Returns(_simulationSettings);
     A.CallTo(() => _simulationResults.AllQuantityPaths()).Returns(_allQuantityPaths);
 }
 public SimulationResultsExportTask(IDimensionRepository dimensionRepository, IEntitiesInContainerRetriever quantityRetriever)
 {
     _quantityRetriever = quantityRetriever;
     _timeDimension     = dimensionRepository.Time;
 }
 public SimulationResultsToDataTableConverter(IDimensionRepository dimensionRepository, IEntitiesInContainerRetriever quantityRetriever, IDisplayUnitRetriever displayUnitRetriever)
 {
     _quantityRetriever    = quantityRetriever;
     _displayUnitRetriever = displayUnitRetriever;
     _timeDimension        = dimensionRepository.Time;
 }
示例#16
0
 public SimulationPersistableUpdater(IEntitiesInContainerRetriever quantitiesRetriever) : base(quantitiesRetriever)
 {
 }
示例#17
0
 public PopulationAnalysisParameterFieldsPresenter(IPopulationAnalysisFieldsView view, IPopulationAnalysesContextMenuFactory contextMenuFactory, IEntitiesInContainerRetriever parametersRetriever, IPopulationAnalysisFieldFactory populationAnalysisFieldFactory, IEventPublisher eventPublisher, IPopulationAnalysisGroupingFieldCreator populationAnalysisGroupingFieldCreator, IPopulationAnalysisTemplateTask populationAnalysisTemplateTask, IDialogCreator dialogCreator, IPopulationAnalysisFieldToPopulationAnalysisFieldDTOMapper fieldDTOMapper)
     : base(view, new[] { typeof(PopulationAnalysisParameterField), typeof(PopulationAnalysisCovariateField) }, contextMenuFactory, populationAnalysisFieldFactory, eventPublisher, populationAnalysisGroupingFieldCreator, populationAnalysisTemplateTask, dialogCreator, fieldDTOMapper)
 {
     _parametersRetriever  = parametersRetriever;
     EmptySelectionMessage = PKSimConstants.UI.ChooseParametersToDisplay;
 }
 public OutputSelectionsMapper(IEntitiesInContainerRetriever entitiesInContainerRetriever, IOSPSuiteLogger logger)
 {
     _entitiesInContainerRetriever = entitiesInContainerRetriever;
     _logger = logger;
 }
 public SimulationPKParametersImportTask(ISimulationPKAnalysesImporter pkAnalysesImporter, IEntitiesInContainerRetriever quantityRetriever)
 {
     _pkAnalysesImporter = pkAnalysesImporter;
     _quantityRetriever  = quantityRetriever;
 }
 public SimulationResultsImportTask(IEntitiesInContainerRetriever quantitiesRetriever, IIndividualResultsImporter individualResultsImporter, IProgressManager progressManager)
 {
     _quantitiesRetriever       = quantitiesRetriever;
     _individualResultsImporter = individualResultsImporter;
     _progressManager           = progressManager;
 }
示例#21
0
 protected override void Context()
 {
     _containerTask = A.Fake <IEntitiesInContainerRetriever>();
     sut            = new SimulationPersistableUpdater(_containerTask);
 }