protected override void Context()
        {
            _view                           = A.Fake <IIndividualSimulationComparisonView>();
            _chartPresenter                 = A.Fake <IChartEditorAndDisplayPresenter>();
            _pkAnalysisPresenter            = A.Fake <IIndividualPKAnalysisPresenter>();
            _curveNamer                     = A.Fake <ICurveNamer>();
            _chartTask                      = A.Fake <IChartTask>();
            _observedDataTask               = A.Fake <IObservedDataTask>();
            _lazyLoadTask                   = A.Fake <ILazyLoadTask>();
            _chartLayoutTask                = A.Fake <IChartEditorLayoutTask>();
            _chartTemplatingTask            = A.Fake <IChartTemplatingTask>();
            _dataColumnToPathElementsMapper = A.Fake <IDataColumnToPathElementsMapper>();
            _projectRetriever               = A.Fake <IProjectRetriever>();
            _chartPresenterContext          = A.Fake <ChartPresenterContext>();
            _chartUpdateTask                = A.Fake <IChartUpdater>();
            _userSettings                   = A.Fake <IUserSettings>();
            A.CallTo(() => _chartPresenterContext.EditorAndDisplayPresenter).Returns(_chartPresenter);
            A.CallTo(() => _chartPresenterContext.CurveNamer).Returns(_curveNamer);
            A.CallTo(() => _chartPresenterContext.EditorLayoutTask).Returns(_chartLayoutTask);
            A.CallTo(() => _chartPresenterContext.TemplatingTask).Returns(_chartTemplatingTask);
            A.CallTo(() => _chartPresenterContext.ProjectRetriever).Returns(_projectRetriever);

            sut = new IndividualSimulationComparisonPresenter(_view, _chartPresenterContext, _pkAnalysisPresenter,
                                                              _chartTask, _observedDataTask, _lazyLoadTask, _chartTemplatingTask, _chartUpdateTask, _userSettings);
        }
        protected override void Context()
        {
            _lazyLoadTask                = A.Fake <ILazyLoadTask>();
            _pkValuesCalculator          = A.Fake <IPKValuesCalculator>();
            _pkParameterRepository       = A.Fake <IPKParameterRepository>();
            _pkCalculationOptionsFactory = A.Fake <IPKCalculationOptionsFactory>();
            _entityPathResolver          = A.Fake <IEntityPathResolver>();
            _pkMapper            = A.Fake <IPKValuesToPKAnalysisMapper>();
            _dimensionRepository = A.Fake <IDimensionRepository>();
            sut = new PKAnalysesTask(_lazyLoadTask, _pkValuesCalculator, _pkParameterRepository, _pkCalculationOptionsFactory, _entityPathResolver, _pkMapper, _dimensionRepository);

            _populationSimulation = A.Fake <PopulationSimulation>();
            _outputSelections     = new OutputSelections();
            A.CallTo(() => _populationSimulation.OutputSelections).Returns(_outputSelections);
            _allBodyWeights = new List <double>();
            _bodyWeight     = A.Fake <IParameter>();
            var bodyWeightPath = "PATH";

            A.CallTo(() => _populationSimulation.BodyWeight).Returns(_bodyWeight);
            A.CallTo(() => _entityPathResolver.PathFor(_bodyWeight)).Returns(bodyWeightPath);
            A.CallTo(() => _populationSimulation.AllValuesFor(bodyWeightPath)).Returns(_allBodyWeights);
            A.CallTo(() => _populationSimulation.NumberOfItems).Returns(2);
            _individualResult0 = new IndividualResults {
                IndividualId = 0, Time = new QuantityValues {
                    Values = new[] { 1f, 2f }
                }
            };
            _individualResult0.Add(new QuantityValues {
                QuantityPath = _quantityPath1, Values = new[] { 10f, 20f }
            });
            _individualResult0.Add(new QuantityValues {
                QuantityPath = _quantityPath2, Values = new[] { 11f, 21f }
            });
            _individualResult1 = new IndividualResults {
                IndividualId = 1, Time = new QuantityValues {
                    Values = new[] { 3f, 4f }
                }
            };
            _individualResult1.Add(new QuantityValues {
                QuantityPath = _quantityPath1, Values = new[] { 30f, 40f }
            });
            _individualResult1.Add(new QuantityValues {
                QuantityPath = _quantityPath2, Values = new[] { 31f, 41f }
            });
            _simulationResults = new SimulationResults {
                _individualResult0, _individualResult1
            };
            _populationSimulation.Results = _simulationResults;

            _pkParameter1 = new PKParameter {
                Mode = PKParameterMode.Always, Name = "Cmax"
            };
            _pkParameter2 = new PKParameter {
                Mode = PKParameterMode.Always, Name = "tMax"
            };

            A.CallTo(() => _pkParameterRepository.All()).Returns(new[] { _pkParameter1, _pkParameter2 });
        }
Esempio n. 3
0
 protected override void Context()
 {
     _simulation1   = A.Fake <Simulation>();
     _lazyLoadTask  = A.Fake <ILazyLoadTask>();
     _rootContainer = new Container();
     _applications  = new EventGroup {
         Name = Constants.APPLICATIONS, ContainerType = ContainerType.EventGroup
     };
     _applications2 = new EventGroup {
         Name = "APPLICATIONS_2", ContainerType = ContainerType.EventGroup
     };
     _simulation1.Model.Root = _rootContainer;
     _rootContainer.Add(_applications);
     A.CallTo(() => _simulation1.BodyWeight).Returns(DomainHelperForSpecs.ConstantParameterWithValue(50));
     sut = new PKCalculationOptionsFactory(_lazyLoadTask);
 }
Esempio n. 4
0
 public IndividualTeXBuilder(IContainerTask containerTask, IFullPathDisplayResolver fullPathDisplayResolver,
                             ITeXBuilderRepository texBuilderRepository, IReportGenerator reportGenerator, ILazyLoadTask lazyLoadTask) : base(texBuilderRepository, reportGenerator, lazyLoadTask)
 {
     _containerTask           = containerTask;
     _fullPathDisplayResolver = fullPathDisplayResolver;
 }
 public IndividualSimulationComparisonPresenter(IIndividualSimulationComparisonView view, ChartPresenterContext chartPresenterContext, IIndividualPKAnalysisPresenter pkAnalysisPresenter, IChartTask chartTask, IObservedDataTask observedDataTask, ILazyLoadTask lazyLoadTask, IChartTemplatingTask chartTemplatingTask, IUserSettings userSettings) :
     base(view, chartPresenterContext, chartTemplatingTask, pkAnalysisPresenter, chartTask, observedDataTask, userSettings)
 {
     _lazyLoadTask   = lazyLoadTask;
     PresentationKey = PresenterConstants.PresenterKeys.IndividualSimulationComparisonPresenter;
 }