Index: Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.Forms/GrassCoverErosionOutwardsWaveConditionsCalculationHelper.cs =================================================================== diff -u -r87bd836d55d336e37e3d80f9a1521feb83ddc475 -r023acb8e66cd1950889e7221138f9abc0f89e17f --- Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.Forms/GrassCoverErosionOutwardsWaveConditionsCalculationHelper.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationHelper.cs) (revision 87bd836d55d336e37e3d80f9a1521feb83ddc475) +++ Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.Forms/GrassCoverErosionOutwardsWaveConditionsCalculationHelper.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationHelper.cs) (revision 023acb8e66cd1950889e7221138f9abc0f89e17f) @@ -95,7 +95,7 @@ HydraulicBoundaryLocation = hydraulicBoundaryLocation } }; - WaveConditionsInputHelper.SetCategoryType(calculation.InputParameters, normType); + WaveConditionsInputHelper.SetWaterLevelType(calculation.InputParameters, normType); return calculation; } } Index: Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs =================================================================== diff -u -rb488cc05750d849cd91fb36920d8ad346889c7c3 -r023acb8e66cd1950889e7221138f9abc0f89e17f --- Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision b488cc05750d849cd91fb36920d8ad346889c7c3) +++ Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision 023acb8e66cd1950889e7221138f9abc0f89e17f) @@ -566,8 +566,8 @@ RiskeerCommonDataResources.Calculation_DefaultName, c => c.Name) }; - WaveConditionsInputHelper.SetCategoryType(calculation.InputParameters, - nodeData.AssessmentSection.FailureMechanismContribution.NormativeNorm); + WaveConditionsInputHelper.SetWaterLevelType(calculation.InputParameters, + nodeData.AssessmentSection.FailureMechanismContribution.NormativeNorm); nodeData.WrappedData.Children.Add(calculation); nodeData.WrappedData.NotifyObservers(); } Index: Riskeer/Revetment/src/Riskeer.Revetment.Data/WaveConditionsInputHelper.cs =================================================================== diff -u -r70eafcba912d9408a1d85915af63d672dab17690 -r023acb8e66cd1950889e7221138f9abc0f89e17f --- Riskeer/Revetment/src/Riskeer.Revetment.Data/WaveConditionsInputHelper.cs (.../WaveConditionsInputHelper.cs) (revision 70eafcba912d9408a1d85915af63d672dab17690) +++ Riskeer/Revetment/src/Riskeer.Revetment.Data/WaveConditionsInputHelper.cs (.../WaveConditionsInputHelper.cs) (revision 023acb8e66cd1950889e7221138f9abc0f89e17f) @@ -26,7 +26,6 @@ using Core.Common.Base.Data; using Riskeer.Common.Data.AssessmentSection; using Riskeer.Common.Data.Contribution; -using Riskeer.Common.Data.FailureMechanism; using Riskeer.Common.Data.Hydraulics; namespace Riskeer.Revetment.Data @@ -54,7 +53,7 @@ /// based on the . /// /// The - /// to set the category type for. + /// to set the water level type for. /// The to set the for. /// Thrown when is null. /// Thrown when is an invalid value. @@ -89,18 +88,18 @@ } /// - /// Sets the of the + /// Sets the of the /// based on the . /// /// The - /// to set the category type for. + /// to set the water level type for. /// The to set the for. /// Thrown when is null. /// Thrown when is an invalid value. /// Thrown when is a valid value, /// but unsupported. - public static void SetCategoryType(FailureMechanismCategoryWaveConditionsInput waveConditionsInput, - NormType normType) + public static void SetWaterLevelType(FailureMechanismCategoryWaveConditionsInput waveConditionsInput, + NormType normType) { if (waveConditionsInput == null) { @@ -117,10 +116,10 @@ switch (normType) { case NormType.LowerLimit: - waveConditionsInput.CategoryType = FailureMechanismCategoryType.MechanismSpecificLowerLimitNorm; + waveConditionsInput.WaterLevelType = WaveConditionsInputWaterLevelType.LowerLimit; break; case NormType.Signaling: - waveConditionsInput.CategoryType = FailureMechanismCategoryType.MechanismSpecificSignalingNorm; + waveConditionsInput.WaterLevelType = WaveConditionsInputWaterLevelType.Signaling; break; default: throw new NotSupportedException(); Index: Riskeer/Revetment/test/Riskeer.Revetment.Data.Test/WaveConditionsInputHelperTest.cs =================================================================== diff -u -rb88c0fa6501453763807bfcd52fe3a1203f4da37 -r023acb8e66cd1950889e7221138f9abc0f89e17f --- Riskeer/Revetment/test/Riskeer.Revetment.Data.Test/WaveConditionsInputHelperTest.cs (.../WaveConditionsInputHelperTest.cs) (revision b88c0fa6501453763807bfcd52fe3a1203f4da37) +++ Riskeer/Revetment/test/Riskeer.Revetment.Data.Test/WaveConditionsInputHelperTest.cs (.../WaveConditionsInputHelperTest.cs) (revision 023acb8e66cd1950889e7221138f9abc0f89e17f) @@ -61,8 +61,7 @@ var random = new Random(21); // Call - void Call() => WaveConditionsInputHelper.SetWaterLevelType(null, - random.NextEnumValue()); + void Call() => WaveConditionsInputHelper.SetWaterLevelType((AssessmentSectionCategoryWaveConditionsInput) null, random.NextEnumValue()); // Assert var exception = Assert.Throws(Call); @@ -108,22 +107,22 @@ var random = new Random(21); // Call - void Call() => WaveConditionsInputHelper.SetCategoryType(null, - random.NextEnumValue()); + void Call() => WaveConditionsInputHelper.SetWaterLevelType((FailureMechanismCategoryWaveConditionsInput) null, + random.NextEnumValue()); // Assert var exception = Assert.Throws(Call); Assert.AreEqual("waveConditionsInput", exception.ParamName); } [Test] - public void SetCategoryType_WithFailureMechanismCategoryWaveConditionsInputAndInvalidNormType_ThrowsInvalidEnumArgumentException() + public void SetWaterLevelType_WithFailureMechanismCategoryWaveConditionsInputAndInvalidNormType_ThrowsInvalidEnumArgumentException() { // Setup const NormType normType = (NormType) 99; // Call - void Call() => WaveConditionsInputHelper.SetCategoryType(new FailureMechanismCategoryWaveConditionsInput(), normType); + void Call() => WaveConditionsInputHelper.SetWaterLevelType(new FailureMechanismCategoryWaveConditionsInput(), normType); // Assert var expectedMessage = $"The value of argument 'normType' ({(int) normType}) is invalid for Enum type '{nameof(NormType)}'."; @@ -134,15 +133,15 @@ [Test] [TestCase(NormType.Signaling, FailureMechanismCategoryType.MechanismSpecificSignalingNorm)] [TestCase(NormType.LowerLimit, FailureMechanismCategoryType.MechanismSpecificLowerLimitNorm)] - public void SetCategoryType_WithFailureMechanismCategoryWaveConditionsInputAndVariousNormTypes_SetsCategoryType( + public void SetWaterLevelType_WithFailureMechanismCategoryWaveConditionsInputAndVariousNormTypes_SetsCategoryType( NormType normType, FailureMechanismCategoryType expectedFailureMechanismCategoryType) { // Setup var waveConditionsInput = new FailureMechanismCategoryWaveConditionsInput(); // Call - WaveConditionsInputHelper.SetCategoryType(waveConditionsInput, normType); + WaveConditionsInputHelper.SetWaterLevelType(waveConditionsInput, normType); // Assert Assert.AreEqual(expectedFailureMechanismCategoryType, waveConditionsInput.CategoryType);