示例#1
0
 public override void InitializeWith(ICommandCollector commandRegister)
 {
     base.InitializeWith(commandRegister);
     _distributionPresenter        = PresenterAt(DistributionPresenterItem);
     _advancedParametersPresenter  = PresenterAt(AdvancedParameterPresenterItem);
     _populationMoleculesPresenter = PresenterAt(MoleculesPresenterItem);
     _settingsPresenter            = PresenterAt(SettingPresenterItem);
 }
 public override void InitializeWith(ICommandCollector commandCollector)
 {
     base.InitializeWith(commandCollector);
     _advancedParametersPresenter = PresenterAt(AdvancedParametersPresenterItem);
     _moleculesPresenter          = PresenterAt(MoleculesPresenterItem);
     _populationSettingsPresenter = RetrieveSettingsPresenter();
     _distributionPresenter       = PresenterAt(DistributionPresenterItem);
     _populationSettingsPresenter.PopulationCreationFinished += editPopulation;
 }
示例#3
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);
 }
 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();
 }