protected override Task Context()
        {
            _advancedParameterMapper        = A.Fake <AdvancedParameterMapper>();
            _randomPopulationFactory        = A.Fake <IRandomPopulationFactory>();
            _randomPopulationSettingsMapper = A.Fake <RandomPopulationSettingsMapper>();
            sut = new PopulationMapper(_advancedParameterMapper, _randomPopulationSettingsMapper, _randomPopulationFactory);

            _advancedParameters = new AdvancedParameterCollection();
            _advancedParameter  = new AdvancedParameter
            {
                DistributedParameter = DomainHelperForSpecs.NormalDistributedParameter()
            };

            _advancedParameters.AddAdvancedParameter(_advancedParameter);
            _advancedParameterSnapshot = new Snapshots.AdvancedParameter();
            A.CallTo(() => _advancedParameterMapper.MapToSnapshot(_advancedParameter)).Returns(_advancedParameterSnapshot);


            _population = CreateRandomPopulation();

            _settingsSnapshot = new PopulationSettings();
            A.CallTo(() => _randomPopulationSettingsMapper.MapToSnapshot(_population.Settings)).Returns(_settingsSnapshot);

            return(Task.FromResult(true));
        }
 public PopulationMapper(AdvancedParameterMapper advancedParameterMapper,
                         RandomPopulationSettingsMapper randomPopulationSettingsMapper,
                         IRandomPopulationFactory randomPopulationFactory)
 {
     _advancedParameterMapper        = advancedParameterMapper;
     _randomPopulationSettingsMapper = randomPopulationSettingsMapper;
     _randomPopulationFactory        = randomPopulationFactory;
 }
 protected override void Context()
 {
     _view = A.Fake <IRandomPopulationSettingsView>();
     _populationSettingsMapper = A.Fake <IPopulationSettingsDTOMapper>();
     _randomPopulationFactory  = A.Fake <IRandomPopulationFactory>();
     _lazyLoadTask             = A.Fake <ILazyLoadTask>();
     sut = new RandomPopulationSettingsPresenter(_view, _randomPopulationFactory, _populationSettingsMapper, _lazyLoadTask);
 }
Ejemplo n.º 4
0
 public RandomPopulationSettingsPresenter(IRandomPopulationSettingsView view, IRandomPopulationFactory randomPopulationFactory, IPopulationSettingsDTOMapper populationSettingsMapper,
                                          ILazyLoadTask lazyLoadTask)
     : base(view)
 {
     _randomPopulationFactory  = randomPopulationFactory;
     _populationSettingsMapper = populationSettingsMapper;
     _lazyLoadTask             = lazyLoadTask;
 }
Ejemplo n.º 5
0
 public MatlabPopulationFactory(IMatlabPopulationSettingsToPopulationSettingsMapper populationSettingsMapper, IRandomPopulationFactory randomPopulationFactory,
                                IOntogenyRepository ontogenyRepository, IMoleculeOntogenyVariabilityUpdater ontogenyVariabilityUpdater, IIndividualEnzymeFactory individualEnzymeFactory)
 {
     _populationSettingsMapper   = populationSettingsMapper;
     _randomPopulationFactory    = randomPopulationFactory;
     _ontogenyRepository         = ontogenyRepository;
     _ontogenyVariabilityUpdater = ontogenyVariabilityUpdater;
     _individualEnzymeFactory    = individualEnzymeFactory;
 }
Ejemplo n.º 6
0
 public MatlabPopulationFactory(IMatlabPopulationSettingsToPopulationSettingsMapper populationSettingsMapper, IRandomPopulationFactory randomPopulationFactory)
 {
     _populationSettingsMapper = populationSettingsMapper;
     _randomPopulationFactory  = randomPopulationFactory;
 }