Index: Core/Common/src/Core.Common.Base/Properties/Resources.Designer.cs =================================================================== diff -u -rd2753c88b67dda711ab593c1d8a45ed472049d81 -r2f20d373b18e86839cee118d7922eb41454af394 --- Core/Common/src/Core.Common.Base/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision d2753c88b67dda711ab593c1d8a45ed472049d81) +++ Core/Common/src/Core.Common.Base/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 2f20d373b18e86839cee118d7922eb41454af394) @@ -127,46 +127,6 @@ } /// - /// Looks up a localized string similar to De variatiecoëfficient voor '{0}' moet groter zijn dan of gelijk aan 0.. - /// - public static string DistributionValidationService_ValidateDistribution_CoefficientOfVariation_Of_0_must_be_larger_or_equal_to_0 { - get { - return ResourceManager.GetString("DistributionValidationService_ValidateDistribution_CoefficientOfVariation_Of_0_mu" + - "st_be_larger_or_equal_to_0", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to De verwachtingswaarde voor '{0}' moet een geldig getal zijn.. - /// - public static string DistributionValidationService_ValidateDistribution_Mean_of_0_must_be_a_valid_number { - get { - return ResourceManager.GetString("DistributionValidationService_ValidateDistribution_Mean_of_0_must_be_a_valid_numb" + - "er", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to De verwachtingswaarde voor '{0}' moet een positief getal zijn.. - /// - public static string DistributionValidationService_ValidateDistribution_Mean_of_0_must_be_positive_value { - get { - return ResourceManager.GetString("DistributionValidationService_ValidateDistribution_Mean_of_0_must_be_positive_val" + - "ue", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to De standaard afwijking voor '{0}' moet groter zijn dan of gelijk aan 0.. - /// - public static string DistributionValidationService_ValidateDistribution_StandardDeviation_of_0_must_be_larger_or_equal_to_0 { - get { - return ResourceManager.GetString("DistributionValidationService_ValidateDistribution_StandardDeviation_of_0_must_be" + - "_larger_or_equal_to_0", resourceCulture); - } - } - - /// /// Looks up a localized string similar to Fout. /// public static string Error { Index: Core/Common/src/Core.Common.Base/Properties/Resources.resx =================================================================== diff -u -rd2753c88b67dda711ab593c1d8a45ed472049d81 -r2f20d373b18e86839cee118d7922eb41454af394 --- Core/Common/src/Core.Common.Base/Properties/Resources.resx (.../Resources.resx) (revision d2753c88b67dda711ab593c1d8a45ed472049d81) +++ Core/Common/src/Core.Common.Base/Properties/Resources.resx (.../Resources.resx) (revision 2f20d373b18e86839cee118d7922eb41454af394) @@ -174,16 +174,4 @@ Fout - - De variatiecoëfficient voor '{0}' moet groter zijn dan of gelijk aan 0. - - - De verwachtingswaarde voor '{0}' moet een geldig getal zijn. - - - De verwachtingswaarde voor '{0}' moet een positief getal zijn. - - - De standaard afwijking voor '{0}' moet groter zijn dan of gelijk aan 0. - \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Service/DistributionValidationService.cs =================================================================== diff -u -rd2753c88b67dda711ab593c1d8a45ed472049d81 -r2f20d373b18e86839cee118d7922eb41454af394 --- Ringtoets/Common/src/Ringtoets.Common.Service/DistributionValidationService.cs (.../DistributionValidationService.cs) (revision d2753c88b67dda711ab593c1d8a45ed472049d81) +++ Ringtoets/Common/src/Ringtoets.Common.Service/DistributionValidationService.cs (.../DistributionValidationService.cs) (revision 2f20d373b18e86839cee118d7922eb41454af394) @@ -21,8 +21,8 @@ using System.Collections.Generic; using Core.Common.Base.Data; -using Core.Common.Base.Properties; using Ringtoets.Common.Data.Probabilistics; +using Ringtoets.Common.Service.Properties; namespace Ringtoets.Common.Service { @@ -32,11 +32,18 @@ public static class DistributionValidationService { /// - /// Performs the validation of a + /// Performs the validation of a . /// - /// - /// - /// + /// The distribution to validate. + /// The name of the parameter. + /// Returns an empty string array if the distribution is valid, else: + /// + /// A message indicating that the for + /// must be a valid number, when it is NaN or Infinity. + /// A message indicating that the for + /// must be larger or equal to 0, when it is NaN or Infinity. + /// + /// public static string[] ValidateDistribution(NormalDistribution distribution, string parameterName) { var validationResult = new List(); @@ -54,6 +61,19 @@ return validationResult.ToArray(); } + /// + /// Performs the validation of a . + /// + /// The distribution to validate. + /// The name of the parameter. + /// Returns an empty string array if the distribution is valid, else: + /// + /// A message indicating that the for + /// must be a positive number, when it is NaN or Infinity. + /// A message indicating that the for + /// must be larger or equal to 0, when it is NaN or Infinity. + /// + /// public static string[] ValidateDistribution(LogNormalDistribution distribution, string parameterName) { var validationResult = new List(); @@ -71,6 +91,19 @@ return validationResult.ToArray(); } + /// + /// Performs the validation of a . + /// + /// The distribution to validate. + /// The name of the parameter. + /// Returns an empty string array if the distribution is valid, else: + /// + /// A message indicating that the for + /// must be a valid number, when it is NaN or Infinity. + /// A message indicating that the + /// for must be larger or equal to 0, when it is NaN or Infinity. + /// + /// public static string[] ValidateDistribution(VariationCoefficientNormalDistribution distribution, string parameterName) { var validationResult = new List(); @@ -88,6 +121,19 @@ return validationResult.ToArray(); } + /// + /// Performs the validation of a . + /// + /// The distribution to validate. + /// The name of the parameter. + /// Returns an empty string array if the distribution is valid, else: + /// + /// A message indicating that the for + /// must be a positive number, when it is NaN or Infinity. + /// A message indicating that the + /// for must be larger or equal to 0, when it is NaN or Infinity. + /// + /// public static string[] ValidateDistribution(VariationCoefficientLogNormalDistribution distribution, string parameterName) { var validationResult = new List(); Index: Ringtoets/Common/src/Ringtoets.Common.Service/Properties/Resources.Designer.cs =================================================================== diff -u -r7d6e4c28a40fb056c182d0691dda2b2e88aeebfd -r2f20d373b18e86839cee118d7922eb41454af394 --- Ringtoets/Common/src/Ringtoets.Common.Service/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 7d6e4c28a40fb056c182d0691dda2b2e88aeebfd) +++ Ringtoets/Common/src/Ringtoets.Common.Service/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 2f20d373b18e86839cee118d7922eb41454af394) @@ -157,6 +157,46 @@ } /// + /// Looks up a localized string similar to De variatiecoëfficient voor '{0}' moet groter zijn dan of gelijk zijn aan 0.. + /// + public static string DistributionValidationService_ValidateDistribution_CoefficientOfVariation_Of_0_must_be_larger_or_equal_to_0 { + get { + return ResourceManager.GetString("DistributionValidationService_ValidateDistribution_CoefficientOfVariation_Of_0_mu" + + "st_be_larger_or_equal_to_0", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De verwachtingswaarde voor '{0}' moet een geldig getal zijn.. + /// + public static string DistributionValidationService_ValidateDistribution_Mean_of_0_must_be_a_valid_number { + get { + return ResourceManager.GetString("DistributionValidationService_ValidateDistribution_Mean_of_0_must_be_a_valid_numb" + + "er", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De verwachtingswaarde voor '{0}' moet een positief getal zijn.. + /// + public static string DistributionValidationService_ValidateDistribution_Mean_of_0_must_be_positive_value { + get { + return ResourceManager.GetString("DistributionValidationService_ValidateDistribution_Mean_of_0_must_be_positive_val" + + "ue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De standaard afwijking voor '{0}' moet groter zijn dan of gelijk zijn aan 0.. + /// + public static string DistributionValidationService_ValidateDistribution_StandardDeviation_of_0_must_be_larger_or_equal_to_0 { + get { + return ResourceManager.GetString("DistributionValidationService_ValidateDistribution_StandardDeviation_of_0_must_be" + + "_larger_or_equal_to_0", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Validatie mislukt: {0}. /// public static string Error_in_validation_0 { Index: Ringtoets/Common/src/Ringtoets.Common.Service/Properties/Resources.resx =================================================================== diff -u -r7d6e4c28a40fb056c182d0691dda2b2e88aeebfd -r2f20d373b18e86839cee118d7922eb41454af394 --- Ringtoets/Common/src/Ringtoets.Common.Service/Properties/Resources.resx (.../Resources.resx) (revision 7d6e4c28a40fb056c182d0691dda2b2e88aeebfd) +++ Ringtoets/Common/src/Ringtoets.Common.Service/Properties/Resources.resx (.../Resources.resx) (revision 2f20d373b18e86839cee118d7922eb41454af394) @@ -165,4 +165,16 @@ Er is geen hydraulische randvoorwaardendatabase geïmporteerd. + + De variatiecoëfficient voor '{0}' moet groter zijn dan of gelijk zijn aan 0. + + + De verwachtingswaarde voor '{0}' moet een geldig getal zijn. + + + De verwachtingswaarde voor '{0}' moet een positief getal zijn. + + + De standaard afwijking voor '{0}' moet groter zijn dan of gelijk zijn aan 0. + \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/DistributionValidationServiceTest.cs =================================================================== diff -u -rd2753c88b67dda711ab593c1d8a45ed472049d81 -r2f20d373b18e86839cee118d7922eb41454af394 --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/DistributionValidationServiceTest.cs (.../DistributionValidationServiceTest.cs) (revision d2753c88b67dda711ab593c1d8a45ed472049d81) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/DistributionValidationServiceTest.cs (.../DistributionValidationServiceTest.cs) (revision 2f20d373b18e86839cee118d7922eb41454af394) @@ -158,7 +158,7 @@ public void ValidateDistribution_InvalidStandardDeviationNormalDistribution_ErrorMessage(double value) { // Setup - var expectedMessage = string.Format("De standaard afwijking voor '{0}' moet groter zijn dan of gelijk aan 0.", paramName); + var expectedMessage = string.Format("De standaard afwijking voor '{0}' moet groter zijn dan of gelijk zijn aan 0.", paramName); var distribution = new NormalDistribution(2) { StandardDeviation = (RoundedDouble)value @@ -178,7 +178,7 @@ public void ValidateDistribution_InvalidStandardDeviationLogNormalDistribution_ErrorMessage(double value) { // Setup - var expectedMessage = string.Format("De standaard afwijking voor '{0}' moet groter zijn dan of gelijk aan 0.", paramName); + var expectedMessage = string.Format("De standaard afwijking voor '{0}' moet groter zijn dan of gelijk zijn aan 0.", paramName); var distribution = new LogNormalDistribution(2) { StandardDeviation = (RoundedDouble)value @@ -198,7 +198,7 @@ public void ValidateDistribution_InvalidVariationCoefficientNormalDistribution_ErrorMessage(double value) { // Setup - var expectedMessage = string.Format("De variatiecoëfficient voor '{0}' moet groter zijn dan of gelijk aan 0.", paramName); + var expectedMessage = string.Format("De variatiecoëfficient voor '{0}' moet groter zijn dan of gelijk zijn aan 0.", paramName); var distribution = new VariationCoefficientNormalDistribution(2) { CoefficientOfVariation = (RoundedDouble)value @@ -218,7 +218,7 @@ public void ValidateDistribution_InvalidVariationCoefficientLogNormalDistribution_ErrorMessage(double value) { // Setup - var expectedMessage = string.Format("De variatiecoëfficient voor '{0}' moet groter zijn dan of gelijk aan 0.", paramName); + var expectedMessage = string.Format("De variatiecoëfficient voor '{0}' moet groter zijn dan of gelijk zijn aan 0.", paramName); var distribution = new VariationCoefficientLogNormalDistribution(2) { CoefficientOfVariation = (RoundedDouble)value