예제 #1
0
        protected override void Context()
        {
            _view = A.Fake <IConfigureSimulationView>();
            _subPresenterManager    = SubPresenterHelper.Create <ISimulationItemPresenter>();
            _simulationModelCreator = A.Fake <ISimulationModelCreator>();
            _heavyWorkManager       = new HeavyWorkManagerForSpecs();
            _cloner        = A.Fake <ICloner>();
            _dialogCreator = A.Fake <IDialogCreator>();
            _simulationParametersUpdater           = A.Fake <ISimulationParametersUpdater>();
            _fullPathDisplayResolver               = A.Fake <IFullPathDisplayResolver>();
            _buildingBlockInSimulationSynchronizer = A.Fake <IBuildingBlockInSimulationSynchronizer>();
            _validationResult = new ValidationResult();

            _simulationModelConfigurationPresenter = _subPresenterManager.CreateFake(SimulationItems.Model);
            _simulationCompoundsPresenter          = _subPresenterManager.CreateFake(SimulationItems.Compounds);
            _simulationCompoundProtocolsPresenter  = _subPresenterManager.CreateFake(SimulationItems.CompoundProtocols);
            _simulationCompoundProcessesPresenter  = _subPresenterManager.CreateFake(SimulationItems.CompoundsProcesses);
            _simulationEventsPresenter             = _subPresenterManager.CreateFake(SimulationItems.Events);

            sut = new ConfigureSimulationPresenter(_view, _subPresenterManager, _simulationModelCreator, _heavyWorkManager, _cloner, _dialogCreator, _simulationParametersUpdater, _fullPathDisplayResolver, _buildingBlockInSimulationSynchronizer);

            _originalSimulation = A.Fake <Simulation>();
            _clonedSimulation   = A.Fake <Simulation>();
            A.CallTo(() => _cloner.CloneForModel(_originalSimulation)).Returns(_clonedSimulation);
            A.CallTo(() => _simulationModelConfigurationPresenter.Simulation).Returns(_clonedSimulation);

            A.CallTo(_simulationParametersUpdater).WithReturnType <ValidationResult>().Returns(_validationResult);
        }
        protected override void Context()
        {
            _subPresenterManager = SubPresenterHelper.Create <IIndividualItemPresenter>();
            _view                                  = A.Fake <IScaleIndividualView>();
            _propertiesMapper                      = A.Fake <IBuildingBlockPropertiesMapper>();
            _workspace                             = A.Fake <IWorkspace>();
            _individualExpressionsUpdater          = A.Fake <IIndividualExpressionsUpdater>();
            _cloner                                = A.Fake <ICloner>();
            _sourceIndividual                      = A.Fake <Individual>();
            _cloneIndividual                       = A.Fake <Individual>();
            _scaledIndividual                      = A.Fake <Individual>();
            _objectBaseDTOFactory                  = A.Fake <IObjectBaseDTOFactory>();
            _settingPresenter                      = _subPresenterManager.CreateFake(ScaleIndividualItems.Settings);
            _parameterPresenter                    = _subPresenterManager.CreateFake(ScaleIndividualItems.Parameters);
            _scalingConfigurationPresenter         = _subPresenterManager.CreateFake(ScaleIndividualItems.Scaling);
            _moleculePresenter                     = _subPresenterManager.CreateFake(ScaleIndividualItems.Expressions);
            ScaleIndividualItems.Expressions.Index = 3;
            A.CallTo(() => _cloner.Clone(_sourceIndividual)).Returns(_cloneIndividual);
            _individualSettingsDTO = new IndividualSettingsDTO();

            _dialogCreator = A.Fake <IDialogCreator>();
            A.CallTo(() => _settingPresenter.Individual).Returns(_scaledIndividual);
            _scaleIndividualPropertiesDTO = new ObjectBaseDTO();
            A.CallTo(() => _objectBaseDTOFactory.CreateFor <Individual>()).Returns(_scaleIndividualPropertiesDTO);

            sut = new ScaleIndividualPresenter(_view, _subPresenterManager, _dialogCreator, _individualExpressionsUpdater,
                                               _objectBaseDTOFactory, _propertiesMapper, _cloner);
            sut.Initialize();
        }
 protected override void Context()
 {
     _view = A.Fake <IEditObserverSetView>();
     _subPresenterManager = SubPresenterHelper.Create <IObserverSetItemPresenter>();
     _observerSet         = new ObserverSet().WithName("TOTO");
     sut = new EditObserverSetPresenter(_view, _subPresenterManager);
     _importObserverSetSettings = _subPresenterManager.CreateFake(ObserverSetItems.ImportSettings);
     _importObserverSetSettings.ShowFilePath = true;
     sut.Edit(_observerSet);
 }
        protected override void Context()
        {
            _simulationFactory = A.Fake <ISimulationFactory>();
            _view = A.Fake <ISimulationModelConfigurationView>();
            _subPresenterManager = SubPresenterHelper.Create <ISimulationModelConfigurationItemPresenter>();
            _simulationSubjectConfigurationPresenter = _subPresenterManager.CreateFake(SimulationModelConfigurationItems.Subject);
            _simulationModelSelectionPresenter       = _subPresenterManager.CreateFake(SimulationModelConfigurationItems.ModelSelection);

            sut = new SimulationModelConfigurationPresenter(_view, _subPresenterManager, _simulationFactory);
        }
 protected override void Context()
 {
     _view = A.Fake <IEditProtocolView>();
     _subPresenterManager       = SubPresenterHelper.Create <IProtocolItemPresenter>();
     _simpleProtocolPresenter   = _subPresenterManager.CreateFake(ProtocolItems.Simple);
     _advancedProtocolPresenter = _subPresenterManager.CreateFake(ProtocolItems.Advanced);
     _protocolChartPresenter    = A.Fake <IProtocolChartPresenter>();
     _schemaTask      = A.Fake <ISchemaTask>();
     _protocolUpdater = A.Fake <IProtocolUpdater>();
     _dialogCreator   = A.Fake <IDialogCreator>();
     sut = new EditProtocolPresenter(_view, _subPresenterManager, _protocolChartPresenter, _schemaTask, _protocolUpdater, _dialogCreator);
 }
 protected override void Context()
 {
     _view = A.Fake <ICreateEventView>();
     _subPresenterManager = SubPresenterHelper.Create <IEventItemPresenter>();
     _dtoFactory          = A.Fake <IObjectBaseDTOFactory>();
     _eventFactory        = A.Fake <IEventFactory>();
     _propertiesMapper    = A.Fake <IBuildingBlockPropertiesMapper>();
     _dialogCreator       = A.Fake <IDialogCreator>();
     _eventSettings       = _subPresenterManager.CreateFake(EventItems.Settings);
     sut = new CreateEventPresenter(_view, _subPresenterManager, _dialogCreator, _dtoFactory, _eventFactory, _propertiesMapper);
     sut.Initialize();
 }
예제 #7
0
        protected override void Context()
        {
            _subPresenterManager     = SubPresenterHelper.Create <ISettingsItemPresenter>();
            _userSettings            = _subPresenterManager.CreateFake(SettingsItems.UserGeneralSettings);
            _appSettings             = _subPresenterManager.CreateFake(SettingsItems.ApplicationSettings);
            _userDisplayUnitSettings = _subPresenterManager.CreateFake(SettingsItems.UserDisplayUnitsSettings);

            _dialogCreator = A.Fake <IDialogCreator>();
            _workspace     = A.Fake <ICoreWorkspace>();
            _view          = A.Fake <ISettingsView>();
            sut            = new SettingsPresenter(_view, _subPresenterManager, _dialogCreator, _workspace);
        }
예제 #8
0
 protected override void Context()
 {
     _workspace                     = A.Fake <IWorkspace>();
     _view                          = A.Fake <IEditRandomPopulationView>();
     _subPresenterManager           = SubPresenterHelper.Create <IPopulationItemPresenter>();
     _popSettingsPresenter          = _subPresenterManager.CreateFake(RamdomPopulationItems.Settings);
     _popAdvancedParameterPresenter = _subPresenterManager.CreateFake(RamdomPopulationItems.AdvancedParameters);
     _popDistributionPresenter      = _subPresenterManager.CreateFake(RamdomPopulationItems.ParameterDistribution);
     //This line is required because of some generic issues
     A.CallTo(_subPresenterManager).WithReturnType <IPopulationSettingsPresenter <RandomPopulation> >().Returns(_popSettingsPresenter);
     _randomPopulation = A.Fake <RandomPopulation>();
     A.CallTo(() => _popSettingsPresenter.Population).Returns(_randomPopulation);
     sut = new EditRandomPopulationPresenter(_view, _subPresenterManager);
     sut.InitializeWith(_workspace);
 }
예제 #9
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 override void Context()
 {
     _subPresenterManager          = SubPresenterHelper.Create <IIndividualItemPresenter>();
     _propertiesMapper             = A.Fake <IBuildingBlockPropertiesMapper>();
     _buildingBlockDTOFactory      = A.Fake <IObjectBaseDTOFactory>();
     _individualSettingsPresenter  = _subPresenterManager.CreateFake(IndividualItems.Settings);
     _individualParameterPresenter = _subPresenterManager.CreateFake(IndividualItems.Parameters);
     _individualMoleculesPresenter = _subPresenterManager.CreateFake(IndividualItems.Expression);
     _dialogCreator           = A.Fake <IDialogCreator>();
     _individualPropertiesDTO = new ObjectBaseDTO();
     _view = A.Fake <ICreateIndividualView>();
     A.CallTo(() => _buildingBlockDTOFactory.CreateFor <Individual>()).Returns(_individualPropertiesDTO);
     sut = new CreateIndividualPresenter(_view, _subPresenterManager, _dialogCreator, _propertiesMapper, _buildingBlockDTOFactory);
     sut.Initialize();
 }
 protected override void Context()
 {
     _buildingBlockDTOFactory = A.Fake <IObjectBaseDTOFactory>();
     _subPresenterManager     = SubPresenterHelper.Create <IPopulationItemPresenter>();
     _propertiesMapper        = A.Fake <IBuildingBlockPropertiesMapper>();
     _view = A.Fake <ICreateRandomPopulationView>();
     _popSettingsPresenter          = _subPresenterManager.CreateFake(RamdomPopulationItems.Settings);
     _popAdvancedParameterPresenter = _subPresenterManager.CreateFake(RamdomPopulationItems.AdvancedParameters);
     _popDistributionPresenter      = _subPresenterManager.CreateFake(RamdomPopulationItems.ParameterDistribution);
     _buildingBlockRepository       = A.Fake <IBuildingBlockRepository>();
     _dialogCreator  = A.Fake <IDialogCreator>();
     _allIndividuals = new List <Individual>();
     A.CallTo(() => _buildingBlockRepository.All <Individual>()).Returns(_allIndividuals);
     sut = new CreateRandomPopulationPresenter(_view, _subPresenterManager, _dialogCreator, _propertiesMapper, _buildingBlockDTOFactory, _buildingBlockRepository);
     sut.Initialize();
 }
      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);
      }
        protected override void Context()
        {
            _simulationPropertiesDTO = new ObjectBaseDTO();
            _subPresenterManager     = SubPresenterHelper.Create <ISimulationItemPresenter>();
            _simulationModelConfigurationPresenter             = _subPresenterManager.CreateFake(SimulationItems.Model);
            _simulationCompoundConfigurationCollectorPresenter = _subPresenterManager.CreateFake(SimulationItems.Compounds);
            _simulationCompoundProtocolCollectorPresenter      = _subPresenterManager.CreateFake(SimulationItems.CompoundProtocols);
            _simulationCompoundProcessCollectorPresenter       = _subPresenterManager.CreateFake(SimulationItems.CompoundsProcesses);
            _simulationEventsConfigurationPresenter            = _subPresenterManager.CreateFake(SimulationItems.Events);
            _view = A.Fake <ICreateSimulationView>();
            _buildingBlockDTOFactory    = A.Fake <IObjectBaseDTOFactory>();
            _simulationPropertiesMapper = A.Fake <IBuildingBlockPropertiesMapper>();
            A.CallTo(() => _buildingBlockDTOFactory.CreateFor <Simulation>()).Returns(_simulationPropertiesDTO);
            _simulationModelCreator = A.Fake <ISimulationModelCreator>();
            _heavyWorkManager       = new HeavyWorkManagerForSpecs();
            _dialogCreator          = A.Fake <IDialogCreator>();

            sut = new CreateSimulationPresenter(_view, _subPresenterManager, _simulationModelCreator, _heavyWorkManager, _simulationPropertiesMapper, _buildingBlockDTOFactory, _dialogCreator);
            sut.Initialize();
        }
예제 #14
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);
        }