Beispiel #1
0
 public CreateTimeProfileAnalysisPresenter(ICreatePopulationAnalysisView view, ISubPresenterItemManager <IPopulationAnalysisItemPresenter> subPresenterItemManager,
                                           IDialogCreator dialogCreator, IPopulationAnalysisTemplateTask populationAnalysisTemplateTask, IPopulationAnalysisChartFactory populationAnalysisChartFactory, ILazyLoadTask lazyLoadTask, IPopulationAnalysisTask populationAnalysisTask, IPopulationAnalysisFieldFactory populationAnalysisFieldFactory)
     : base(view, subPresenterItemManager, TimeProfileItems.All, dialogCreator, populationAnalysisTemplateTask, populationAnalysisChartFactory, populationAnalysisTask, populationAnalysisFieldFactory)
 {
     _lazyLoadTask = lazyLoadTask;
     View.Image    = ApplicationIcons.TimeProfileAnalysis;
 }
        protected override void Context()
        {
            _view = A.Fake <IPopulationAnalysisFieldsView>();
            _contextMenuFactory             = A.Fake <IPopulationAnalysesContextMenuFactory>();
            _populationAnalysisFieldFactory = A.Fake <IPopulationAnalysisFieldFactory>();
            _eventPublisher = A.Fake <IEventPublisher>();
            _populationAnalysisGroupingFieldCreator = A.Fake <IPopulationAnalysisGroupingFieldCreator>();
            _populationAnalysisTemplateTask         = A.Fake <IPopulationAnalysisTemplateTask>();
            _dialogCreator  = A.Fake <IDialogCreator>();
            _fieldDTOMapper = A.Fake <IPopulationAnalysisFieldToPopulationAnalysisFieldDTOMapper>();
            sut             = new PopulationAnalysisOutputFieldsPresenter(_view, _contextMenuFactory, _populationAnalysisFieldFactory, _eventPublisher, _populationAnalysisGroupingFieldCreator, _populationAnalysisTemplateTask, _dialogCreator, _fieldDTOMapper);

            A.CallTo(() => _view.SelectedField).Returns(null);
            _populationDataCollector = A.Fake <IPopulationDataCollector>();
            _populationAnalysis      = new PopulationPivotAnalysis();
            sut.StartAnalysis(_populationDataCollector, _populationAnalysis);

            _dimension1 = DomainHelperForSpecs.ConcentrationDimensionForSpecs();
            _dimension2 = DomainHelperForSpecs.LengthDimensionForSpecs();

            A.CallTo(() => _populationAnalysisFieldFactory.CreateFor(A <IQuantity> ._, A <string> ._))
            .ReturnsLazily(s => new PopulationAnalysisOutputField {
                Dimension = s.Arguments[0].DowncastTo <IQuantity>().Dimension, Name = s.Arguments[1].ToString()
            });
        }
        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);
        }
 protected CreatePopulationAnalysisPresenter(ICreatePopulationAnalysisView view, ISubPresenterItemManager <IPopulationAnalysisItemPresenter> subPresenterItemManager,
                                             IReadOnlyList <ISubPresenterItem> subPresenterItems, IDialogCreator dialogCreator, IPopulationAnalysisTemplateTask populationAnalysisTemplateTask,
                                             IPopulationAnalysisChartFactory populationAnalysisChartFactory, IPopulationAnalysisTask populationAnalysisTask)
     : base(view, subPresenterItemManager, subPresenterItems, dialogCreator)
 {
     _populationAnalysisTemplateTask = populationAnalysisTemplateTask;
     _populationAnalysisTask         = populationAnalysisTask;
     PopulationAnalysisChart         = populationAnalysisChartFactory.Create <TPopulationAnalysis, TPopulationAnalysisChart>();
 }
Beispiel #5
0
        protected override void Context()
        {
            _view          = A.Fake <ICreatePopulationAnalysisView>();
            _dialogCreator = A.Fake <IDialogCreator>();
            _populationAnalysisTemplateTask = A.Fake <IPopulationAnalysisTemplateTask>();
            _populationAnalysisChartFactory = A.Fake <IPopulationAnalysisChartFactory>();
            _lazyLoadTask           = A.Fake <ILazyLoadTask>();
            _populationAnalysisTask = A.Fake <IPopulationAnalysisTask>();

            _subPresenterManager               = SubPresenterHelper.Create <IPopulationAnalysisItemPresenter>();
            _parameterSelectionPresenter       = _subPresenterManager.CreateFake(TimeProfileItems.ParameterSelection);
            _pkParameterSpecificationPresenter = _subPresenterManager.CreateFake(TimeProfileItems.PKParameterSpecification);

            sut = new CreateTimeProfileAnalysisPresenter(_view, _subPresenterManager, _dialogCreator, _populationAnalysisTemplateTask, _populationAnalysisChartFactory, _lazyLoadTask, _populationAnalysisTask);
        }
 protected PopulationAnalysisFieldsPresenter(IPopulationAnalysisFieldsView view, IReadOnlyList <Type> fieldTypes, IPopulationAnalysesContextMenuFactory contextMenuFactory,
                                             IPopulationAnalysisFieldFactory populationAnalysisFieldFactory, IEventPublisher eventPublisher, IPopulationAnalysisGroupingFieldCreator populationAnalysisGroupingFieldCreator,
                                             IPopulationAnalysisTemplateTask populationAnalysisTemplateTask, IDialogCreator dialogCreator, IPopulationAnalysisFieldToPopulationAnalysisFieldDTOMapper fieldDTOMapper)
     : base(view)
 {
     _fieldTypes                             = fieldTypes;
     _contextMenuFactory                     = contextMenuFactory;
     _populationAnalysisFieldFactory         = populationAnalysisFieldFactory;
     _eventPublisher                         = eventPublisher;
     _populationAnalysisGroupingFieldCreator = populationAnalysisGroupingFieldCreator;
     _populationAnalysisTemplateTask         = populationAnalysisTemplateTask;
     _dialogCreator                          = dialogCreator;
     _fieldDTOMapper                         = fieldDTOMapper;
     view.ColorSelectionVisible              = false;
     view.CreateGroupingButtonVisible        = true;
     EmptySelectionMessage                   = PKSimConstants.UI.ChooseFieldsToDisplay;
 }
      protected override void Context()
      {
         _view = A.Fake<ICreatePopulationAnalysisView>();
         _dialogCreator = A.Fake<IDialogCreator>();
         _populationAnalysisTemplateTask = A.Fake<IPopulationAnalysisTemplateTask>();
         _populationAnalysisChartFactory = A.Fake<IPopulationAnalysisChartFactory>();
         _lazyLoadTask = A.Fake<ILazyLoadTask>();
         _populationAnalysisTask = A.Fake<IPopulationAnalysisTask>();

         _subPresenterManager = SubPresenterHelper.Create<IPopulationAnalysisItemPresenter>();
         _parameterSelectionPresenter = _subPresenterManager.CreateFake(TimeProfileItems.ParameterSelection);
         _pkParameterSpecificationPresenter = _subPresenterManager.CreateFake(TimeProfileItems.PKParameterSpecification);
         _populationAnalysisFieldFactory= A.Fake<IPopulationAnalysisFieldFactory>();
         _populationAnalysisChart = new TimeProfileAnalysisChart {PopulationAnalysis = new PopulationStatisticalAnalysis()};
         A.CallTo(() => _populationAnalysisChartFactory.Create<PopulationStatisticalAnalysis, TimeProfileAnalysisChart>()).Returns(_populationAnalysisChart);
         sut = new CreateTimeProfileAnalysisPresenter(_view, _subPresenterManager, _dialogCreator, _populationAnalysisTemplateTask, _populationAnalysisChartFactory, _lazyLoadTask, _populationAnalysisTask, _populationAnalysisFieldFactory);
      }
Beispiel #8
0
        protected override void Context()
        {
            _view = A.Fake <ICreatePopulationAnalysisView>();
            _subPresenterManager               = A.Fake <ISubPresenterItemManager <IPopulationAnalysisItemPresenter> >();
            _dialogCreator                     = A.Fake <IDialogCreator>();
            _populationAnalysisTemplateTask    = A.Fake <IPopulationAnalysisTemplateTask>();
            _populationAnalysisChartFactory    = A.Fake <IPopulationAnalysisChartFactory>();
            _subPresenterManager               = SubPresenterHelper.Create <IPopulationAnalysisItemPresenter>();
            _parameterSelectionPresenter       = _subPresenterManager.CreateFake(BoxWhiskerItems.ParameterSelection);
            _pkParameterSpecificationPresenter = _subPresenterManager.CreateFake(BoxWhiskerItems.PKParameterSpecification);
            _chartPresenter                    = _subPresenterManager.CreateFake(BoxWhiskerItems.Chart);
            _analysis = new PopulationBoxWhiskerAnalysis();
            _boxWiskerAnalysisChart = new BoxWhiskerAnalysisChart {
                PopulationAnalysis = _analysis
            };
            A.CallTo(_populationAnalysisChartFactory).WithReturnType <BoxWhiskerAnalysisChart>().Returns(_boxWiskerAnalysisChart);
            _populationAnalysisTask = A.Fake <IPopulationAnalysisTask>();

            sut = new CreateBoxWhiskerAnalysisPresenter(_view, _subPresenterManager, _dialogCreator, _populationAnalysisTemplateTask, _populationAnalysisChartFactory, _populationAnalysisTask);
        }
 public CreateScatterAnalysisPresenter(ICreatePopulationAnalysisView view, ISubPresenterItemManager <IPopulationAnalysisItemPresenter> subPresenterItemManager, IDialogCreator dialogCreator, IPopulationAnalysisTemplateTask populationAnalysisTemplateTask, IPopulationAnalysisChartFactory populationAnalysisChartFactory, IPopulationAnalysisTask populationAnalysisTask) :
     base(view, subPresenterItemManager, ScatterItems.All, dialogCreator, populationAnalysisTemplateTask, populationAnalysisChartFactory, populationAnalysisTask)
 {
     View.Image = ApplicationIcons.ScatterAnalysis;
 }
 public PopulationAnalysisOutputFieldsPresenter(IPopulationAnalysisFieldsView view, IPopulationAnalysesContextMenuFactory contextMenuFactory, IPopulationAnalysisFieldFactory populationAnalysisFieldFactory, IEventPublisher eventPublisher, IPopulationAnalysisGroupingFieldCreator populationAnalysisGroupingFieldCreator, IPopulationAnalysisTemplateTask populationAnalysisTemplateTask, IDialogCreator dialogCreator, IPopulationAnalysisFieldToPopulationAnalysisFieldDTOMapper fieldDTOMapper)
     : base(view, new[] { typeof(PopulationAnalysisOutputField) }, contextMenuFactory, populationAnalysisFieldFactory, eventPublisher, populationAnalysisGroupingFieldCreator, populationAnalysisTemplateTask, dialogCreator, fieldDTOMapper)
 {
     view.ColorSelectionVisible       = true;
     view.CreateGroupingButtonVisible = false;
     EmptySelectionMessage            = PKSimConstants.UI.ChooseOutputsToDisplay;
 }
Beispiel #11
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 CreateBoxWhiskerAnalysisPresenter(ICreatePopulationAnalysisView view, ISubPresenterItemManager <IPopulationAnalysisItemPresenter> subPresenterItemManager, IDialogCreator dialogCreator, IPopulationAnalysisTemplateTask populationAnalysisTemplateTask, IPopulationAnalysisChartFactory populationAnalysisChartFactory, IPopulationAnalysisTask populationAnalysisTask, IPopulationAnalysisFieldFactory populationAnalysisFieldFactory)
     : base(view, subPresenterItemManager, BoxWhiskerItems.All, dialogCreator, populationAnalysisTemplateTask, populationAnalysisChartFactory, populationAnalysisTask, populationAnalysisFieldFactory)
 {
     View.ApplicationIcon = ApplicationIcons.BoxWhiskerAnalysis;
 }
Beispiel #13
0
 public LoadPopulationAnalysisWorkflowFromTemplateUICommand(IActiveSubjectRetriever activeSubjectRetriever, IPopulationAnalysisTemplateTask populationAnalysisTemplateTask) : base(activeSubjectRetriever)
 {
     _populationAnalysisTemplateTask = populationAnalysisTemplateTask;
 }