protected override void Context() { _speciesRepository = A.Fake <ISpeciesRepository>(); _view = A.Fake <IIndividualSettingsView>(); _defaultValueRetriever = A.Fake <IIndividualDefaultValueRetriever>(); _individualSettingsDTOMapper = A.Fake <IIndividualToIIndividualSettingsDTOMapper>(); _individualMapper = A.Fake <IIndividualSettingsDTOToIndividualMapper>(); _calculationMethodRepository = A.Fake <ICalculationMethodCategoryRepository>(); _subPopulation = A.Fake <IEnumerable <CategoryParameterValueVersionDTO> >(); _editValueOriginPresenter = A.Fake <IEditValueOriginPresenter>(); _individualSettingsDTO = new IndividualSettingsDTO(); _individualPropertiesDTO = new ObjectBaseDTO(); _speciesPopulation = A.Fake <SpeciesPopulation>(); _species = A.Fake <Species>(); _gender = A.Fake <Gender>(); _cmCat1 = new CalculationMethodCategory(); _cmCat2 = new CalculationMethodCategory(); _cmCat1.Add(new CalculationMethod()); _cmCat2.Add(new CalculationMethod()); _individualSettingsDTO.Species = _species; _individualSettingsDTO.SpeciesPopulation = _speciesPopulation; _individualSettingsDTO.Gender = _gender; A.CallTo(() => _defaultValueRetriever.DefaultSettings()).Returns(_individualSettingsDTO); A.CallTo(() => _calculationMethodRepository.All()).Returns(new[] { _cmCat1, _cmCat2 }); _individualSettingsDTO.SubPopulation = _subPopulation; _parentPresenter = A.Fake <IIndividualPresenter>(); sut = new IndividualSettingsPresenter(_view, _speciesRepository, _calculationMethodRepository, _defaultValueRetriever, _individualSettingsDTOMapper, _individualMapper, _editValueOriginPresenter); sut.InitializeWith(_parentPresenter); }
protected override void Context() { _calculationMethodRepository = A.Fake <ICalculationMethodCategoryRepository>(); _allCategories = new List <CalculationMethodCategory>(); A.CallTo(() => _calculationMethodRepository.All()).Returns(_allCategories); sut = new OriginDataTask(_calculationMethodRepository); }
public CalculationMethodCacheMapper( ICalculationMethodRepository calculationMethodRepository, ICalculationMethodCategoryRepository calculationMethodCategoryRepository, IOSPSuiteLogger logger) { _calculationMethodRepository = calculationMethodRepository; _calculationMethodCategoryRepository = calculationMethodCategoryRepository; _logger = logger; }
public IndividualSettingsPresenter(IIndividualSettingsView view, ISpeciesRepository speciesRepository, ICalculationMethodCategoryRepository calculationMethodCategoryRepository, IIndividualDefaultValueRetriever defaultValueRetriever, IIndividualToIIndividualSettingsDTOMapper individualSettingsDTOMapper, IIndividualSettingsDTOToIndividualMapper individualMapper) : base(view) { _speciesRepository = speciesRepository; _calculationMethodCategoryRepository = calculationMethodCategoryRepository; _defaultValueRetriever = defaultValueRetriever; _individualSettingsDTOMapper = individualSettingsDTOMapper; _individualMapper = individualMapper; }
public ModelConfigurationRepository(IFlatModelSpeciesRepository flatModelSpeciesRepo, ISpeciesRepository speciesRepository, ICalculationMethodRepository calculationMethodRepository, ICalculationMethodCategoryRepository calculationMethodCategoryRepository, IFlatModelCalculationMethodRepository flatModelCalculationMethodRepository) { _flatModelSpeciesRepo = flatModelSpeciesRepo; _speciesRepository = speciesRepository; _calculationMethodRepository = calculationMethodRepository; _calculationMethodCategoryRepository = calculationMethodCategoryRepository; _flatModelCalculationMethodRepository = flatModelCalculationMethodRepository; _modelsForSpecies = new Cache <string, IEnumerable <ModelConfiguration> >(s => new List <ModelConfiguration>()); }
protected override Task Context() { _calculationMethodRepository = A.Fake <ICalculationMethodRepository>(); _calculationMethodCategoryRepository = A.Fake <ICalculationMethodCategoryRepository>(); _logger = A.Fake <ILogger>(); sut = new CalculationMethodCacheMapper(_calculationMethodRepository, _calculationMethodCategoryRepository, _logger); _singleCategory = new CalculationMethodCategory { Name = "Multiple" }; _multipleCategory = new CalculationMethodCategory { Name = "Single" }; _calculationMethodWithMultipleOptions = new CalculationMethod { Name = "CM1", DisplayName = "CM1", Category = _multipleCategory.Name }; _calculationMethodWithSingleOption = new CalculationMethod { Name = "CM2", DisplayName = "CM2", Category = _singleCategory.Name }; _anotherCalculationMethodInMultipleOptions = new CalculationMethod { Name = "Another CM", Category = _multipleCategory.Name }; A.CallTo(() => _calculationMethodRepository.All()).Returns(new [] { _calculationMethodWithMultipleOptions, _anotherCalculationMethodInMultipleOptions, _calculationMethodWithSingleOption, }); _singleCategory.Add(_calculationMethodWithSingleOption); _multipleCategory.Add(_calculationMethodWithMultipleOptions); _multipleCategory.Add(_anotherCalculationMethodInMultipleOptions); _calculationMethodCache = new CalculationMethodCache(); _calculationMethodCache.AddCalculationMethod(_calculationMethodWithMultipleOptions); _calculationMethodCache.AddCalculationMethod(_calculationMethodWithSingleOption); A.CallTo(() => _calculationMethodCategoryRepository.FindBy(_singleCategory.Name)).Returns(_singleCategory); A.CallTo(() => _calculationMethodCategoryRepository.FindBy(_multipleCategory.Name)).Returns(_multipleCategory); return(Task.FromResult(true)); }
public IndividualSettingsPresenter( IIndividualSettingsView view, ISpeciesRepository speciesRepository, ICalculationMethodCategoryRepository calculationMethodCategoryRepository, IIndividualDefaultValueRetriever defaultValueRetriever, IIndividualToIIndividualSettingsDTOMapper individualSettingsDTOMapper, IIndividualSettingsDTOToIndividualMapper individualMapper, IEditValueOriginPresenter editValueOriginPresenter) : base(view) { _speciesRepository = speciesRepository; _calculationMethodCategoryRepository = calculationMethodCategoryRepository; _defaultValueRetriever = defaultValueRetriever; _individualSettingsDTOMapper = individualSettingsDTOMapper; _individualMapper = individualMapper; _editValueOriginPresenter = editValueOriginPresenter; _editValueOriginPresenter.ShowCaption = false; AddSubPresenters(_editValueOriginPresenter); _view.AddValueOriginView(_editValueOriginPresenter.View); _editValueOriginPresenter.ValueOriginUpdated = valueOriginUpdated; }
public CalculationMethodCacheMarkdownBuilder(ICalculationMethodCategoryRepository calculationMethodCategoryRepository, IRepresentationInfoRepository representationInfoRepository) { _calculationMethodCategoryRepository = calculationMethodCategoryRepository; _representationInfoRepository = representationInfoRepository; }
public MoleculeCalculationRetriever(ICalculationMethodCategoryRepository calculationMethodCategoryRepository, ICoreCalculationMethodRepository coreCalculationMethodRepository) { _calculationMethodCategoryRepository = calculationMethodCategoryRepository; _coreCalculationMethodRepository = coreCalculationMethodRepository; }
public CompoundCalculationMethodCategoryRepository(ICalculationMethodCategoryRepository calculationMethodCategoryRepository) { _calculationMethodCategoryRepository = calculationMethodCategoryRepository; _allCalculationMethodCategories = new Cache <string, CalculationMethodCategory>(x => x.Name, x => null); }
protected override void Context() { _calculationMethodCategoryRepository = A.Fake <ICalculationMethodCategoryRepository>(); _coreCalculationMethodRepository = A.Fake <ICoreCalculationMethodRepository>(); sut = new MoleculeCalculationRetriever(_calculationMethodCategoryRepository, _coreCalculationMethodRepository); }
public OriginDataTask(ICalculationMethodCategoryRepository calculationMethodRepository) { _calculationMethodRepository = calculationMethodRepository; }