public ChartFromTemplateService(IDimensionFactory dimensionFactory, IKeyPathMapper keyPathMapper, IDialogCreator dialogCreator, ICloneManager cloneManager, IChartUpdater chartUpdater) { _dimensionFactory = dimensionFactory; _keyPathMapper = keyPathMapper; _dialogCreator = dialogCreator; _cloneManager = cloneManager; _chartUpdater = chartUpdater; }
public SimulationSettingsRetriever(IApplicationController applicationController, IProjectRetriever projectRetriever, IEntityPathResolver entityPathResolver, IKeyPathMapper keyPathMapper, ICoreUserSettings userSettings) { _applicationController = applicationController; _projectRetriever = projectRetriever; _entityPathResolver = entityPathResolver; _keyPathMapper = keyPathMapper; _userSettings = userSettings; }
protected override void Context() { _populationSimulationSettingsPresenter = A.Fake <IPopulationSimulationSettingsPresenter>(); _applicationController = A.Fake <IApplicationController>(); _projectRetriever = A.Fake <IPKSimProjectRetriever>(); _simulationPersistableUpdater = A.Fake <ISimulationPersistableUpdater>(); _project = A.Fake <PKSimProject>(); _compound1 = A.Fake <Compound>(); _individual = A.Fake <Individual>(); _human = new Species().WithName(CoreConstants.Species.HUMAN); _rat = new Species().WithName(CoreConstants.Species.RAT); _mouse = new Species().WithName(CoreConstants.Species.MOUSE); A.CallTo(() => _individual.Species).Returns(_human); _populationSimulation = A.Fake <PopulationSimulation>(); A.CallTo(() => _populationSimulation.Compounds).Returns(new[] { _compound1 }); A.CallTo(() => _populationSimulation.Individual).Returns(_individual); _keyPathMapper = A.Fake <IKeyPathMapper>(); _entityPathResolver = A.Fake <IEntityPathResolver>(); _userSettings = A.Fake <ICoreUserSettings>(); _originalSettings = new OutputSelections(); A.CallTo(() => _populationSimulation.OutputSelections).Returns(_originalSettings); _populationSimulation.Model = new Model(); _populationSimulation.Model.Root = new Container(); _compound1.Name = "DRUG"; var organism = new Organism(); var peripheralVenousBlood = new Container().WithName(CoreConstants.Organ.PeripheralVenousBlood); var venousBlood = new Container().WithName(CoreConstants.Organ.VenousBlood); var venousBloodPlasma = new Container().WithName(CoreConstants.Compartment.Plasma).WithParentContainer(venousBlood); var drugPeripheralBlood = new Container().WithName(_compound1.Name); var drugVenousBlood = new Container().WithName(_compound1.Name); var periperhalVenousBloodObserver = new Observer { Name = CoreConstants.Observer.PLASMA_PERIPHERAL_VENOUS_BLOOD }; drugPeripheralBlood.Add(periperhalVenousBloodObserver); var venousBloodObserver = new Observer { Name = CoreConstants.Observer.CONCENTRATION }; drugVenousBlood.Add(venousBloodObserver); peripheralVenousBlood.Add(drugPeripheralBlood); venousBloodPlasma.Add(drugVenousBlood); organism.Add(peripheralVenousBlood); organism.Add(venousBlood); _populationSimulation.Model.Root.Add(organism); A.CallTo(() => _projectRetriever.Current).Returns(_project); A.CallTo(() => _applicationController.Start <ISimulationOutputSelectionPresenter <PopulationSimulation> >()).Returns(_populationSimulationSettingsPresenter); sut = new SimulationSettingsRetriever(_applicationController, _projectRetriever, _entityPathResolver, _keyPathMapper, _userSettings, _simulationPersistableUpdater); A.CallTo(() => _entityPathResolver.PathFor(periperhalVenousBloodObserver)).Returns("PERIPHERAL_OBSERVER"); A.CallTo(() => _entityPathResolver.PathFor(venousBloodObserver)).Returns("VENOUS_BLOOD_OBSERVER"); }
public SimulationRunner(IMoBiContext context, IMoBiApplicationController applicationController, IOutputSelectionsRetriever outputSelectionsRetriever, ISimulationPersistableUpdater simulationPersistableUpdater, IDisplayUnitUpdater displayUnitUpdater, ISimModelManagerFactory simModelManagerFactory, IKeyPathMapper keyPathMapper) { _context = context; _applicationController = applicationController; _outputSelectionsRetriever = outputSelectionsRetriever; _simulationPersistableUpdater = simulationPersistableUpdater; _displayUnitUpdater = displayUnitUpdater; _simModelManagerFactory = simModelManagerFactory; _keyPathMapper = keyPathMapper; }
protected override void Context() { _context = A.Fake <IMoBiContext>(); _outputSelectionsRetriever = A.Fake <IOutputSelectionsRetriever>(); _simulationPersistableUpdater = A.Fake <ISimulationPersistableUpdater>(); _displayUnitUpdater = A.Fake <IDisplayUnitUpdater>(); _applicationController = A.Fake <IMoBiApplicationController>(); _simModelManagerFactory = A.Fake <ISimModelManagerFactory>(); _keyPathMapper = A.Fake <IKeyPathMapper>(); sut = new SimulationRunner(_context, _applicationController, _outputSelectionsRetriever, _simulationPersistableUpdater, _displayUnitUpdater, _simModelManagerFactory, _keyPathMapper); }
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); }
public PopulationAnalysisTemplateTask(ITemplateTask templateTask, IDialogCreator dialogCreator, IEntitiesInContainerRetriever entitiesInContainerRetriever, IKeyPathMapper keyPathMapper, IEntityTask entityTask, ICloner cloner, IAnalysableToSimulationAnalysisWorkflowMapper simulationAnalysisWorkflowMapper, ISimulationAnalysisCreator simulationAnalysisCreator, ILazyLoadTask lazyLoadTask) { _templateTask = templateTask; _dialogCreator = dialogCreator; _entitiesInContainerRetriever = entitiesInContainerRetriever; _keyPathMapper = keyPathMapper; _entityTask = entityTask; _cloner = cloner; _simulationAnalysisWorkflowMapper = simulationAnalysisWorkflowMapper; _simulationAnalysisCreator = simulationAnalysisCreator; _lazyLoadTask = lazyLoadTask; }
public SimulationSettingsRetriever( IApplicationController applicationController, IPKSimProjectRetriever projectRetriever, IEntityPathResolver entityPathResolver, IKeyPathMapper keyPathMapper, ICoreUserSettings userSettings, ISimulationPersistableUpdater simulationPersistableUpdater) { _applicationController = applicationController; _projectRetriever = projectRetriever; _entityPathResolver = entityPathResolver; _keyPathMapper = keyPathMapper; _userSettings = userSettings; _simulationPersistableUpdater = simulationPersistableUpdater; }
protected override void Context() { _dimensionFactory = A.Fake <IDimensionFactory>(); _keyPathMapper = new KeyPathMapper(new EntityPathResolverForSpecs(), new ObjectPathFactoryForSpecs()); _dialogCreator = A.Fake <IDialogCreator>(); _cloneManager = A.Fake <ICloneManager>(); _chartUpdater = A.Fake <IChartUpdater>(); sut = new ChartFromTemplateService(_dimensionFactory, _keyPathMapper, _dialogCreator, _cloneManager, _chartUpdater); _chart = new CurveChart(); _dataColumns = new List <DataColumn>(); _template = new CurveChartTemplate(); _timeDimension = A.Fake <IDimension>(); _concentrationDimension = A.Fake <IDimension>(); _baseGrid = new BaseGrid("Time", _timeDimension); _drugColumn = new DataColumn("Drug", _concentrationDimension, _baseGrid); _drugTemplatePathArray = new[] { "Organism", "Liver", "Cells", "Drug", "Concentration" }; var drugPath = new List <string>(_drugTemplatePathArray); drugPath.Insert(0, "Sim"); _drugColumn.QuantityInfo.Path = drugPath; _drugColumn.QuantityInfo.Type = QuantityType.Drug | QuantityType.Observer; _drugColumn.DataInfo.Origin = ColumnOrigins.Calculation; _enzymeColumn = new DataColumn("Enzyme", _concentrationDimension, _baseGrid); _enzymeTemplatePathArray = new[] { "Organism", "Liver", "Cells", "Enzyme", "Concentration" }; var enzymePath = new List <string>(_enzymeTemplatePathArray); enzymePath.Insert(0, "Sim"); _enzymeColumn.QuantityInfo.Path = enzymePath; _enzymeColumn.QuantityInfo.Type = QuantityType.Enzyme; _enzymeColumn.DataInfo.Origin = ColumnOrigins.Calculation; A.CallTo(() => _dimensionFactory.MergedDimensionFor(A <IWithDimension> ._)) .ReturnsLazily(x => x.GetArgument <IWithDimension>(0).Dimension); //always available _dataColumns.Add(_baseGrid); _dataColumns.Add(_drugColumn); _dataColumns.Add(_enzymeColumn); }