private void setRange(RandomPopulationSettings populationSettings, string parameterName, double min, double max)
        {
            var range = populationSettings.ParameterRange(parameterName);

            range.MinValue = valueFrom(min);
            range.MaxValue = valueFrom(max);
        }
 public void should_add_a_range_for_gestational_age()
 {
     _result.ParameterRange(Constants.Parameters.GESTATIONAL_AGE).ShouldNotBeNull();
 }
 public void should_add_a_range_for_disease_state_parameters()
 {
    var range = _result.ParameterRange("P") as ConstrainedParameterRange;
    range.ShouldNotBeNull();
 }
 public void should_update_the_min_max_for_height()
 {
     _result.ParameterRange(CoreConstants.Parameter.MEAN_HEIGHT).MinValue.ShouldBeEqualTo(_batchPopSettings.MinHeight);
     _result.ParameterRange(CoreConstants.Parameter.MEAN_HEIGHT).MaxValue.ShouldBeEqualTo(_batchPopSettings.MaxHeight);
 }
 public void should_have_updated_the_parameter_as_expected()
 {
     A.CallTo(() => _parameterRangeMapper.MapToModel(_snapshot.Age, _newSettings.ParameterRange(CoreConstants.Parameters.AGE))).MustHaveHappened();
     A.CallTo(() => _parameterRangeMapper.MapToModel(_snapshot.Height, _newSettings.ParameterRange(CoreConstants.Parameters.MEAN_WEIGHT))).MustHaveHappened();
 }
Beispiel #6
0
 public void should_have_updated_the_parameter_as_expected()
 {
     A.CallTo(() => _parameterRangeMapper.MapToModel(_snapshot.Age, A <ParameterRangeSnapshotContext> .That.Matches(x => x.ParameterRange == _newSettings.ParameterRange(CoreConstants.Parameters.AGE)))).MustHaveHappened();
     A.CallTo(() => _parameterRangeMapper.MapToModel(_snapshot.Weight, A <ParameterRangeSnapshotContext> .That.Matches(x => x.ParameterRange == _newSettings.ParameterRange(CoreConstants.Parameters.MEAN_WEIGHT)))).MustHaveHappened();
 }