Пример #1
0
 protected override void Context()
 {
     base.Context();
     _selectedDistribution = new ParameterDistributionSettingsCache();
     _selectedDistribution.Add("PATH", new ParameterDistributionSettings {
         Settings = new DistributionSettings()
     });
     A.CallTo(() => _population.SelectedDistributions).Returns(_selectedDistribution);
     _parameter = A.Fake <IParameter>();
     A.CallTo(() => _parametersPresenter.SelectedParameter).Returns(_parameter);
     A.CallTo(() => _entityPathResolver.PathFor(_parameter)).Returns("PATH");
     sut.EditPopulation(_population);
 }
Пример #2
0
        public void UseSelectedParameterInReport(bool useInReport)
        {
            var selectedParameter = _parametersPresenter.SelectedParameter;

            if (selectedParameter == null)
            {
                return;
            }

            var parameterPath = parameterPathFor(selectedParameter);

            if (!useInReport)
            {
                _selectedDistribution.Remove(parameterPath);
            }
            else
            {
                _selectedDistribution.Add(createSettingsFor(parameterPath));
            }

            refresh();
            _defaultSettings.UseInReport = false;
            _projectChangedNotifier.NotifyChangedFor(_vectorialParametersContainer);
        }