Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/SurfaceLineEntityReadExtensions.cs =================================================================== diff -u -r7f82fd637dc8796f3d270cb0fa6d9ab18548c6f4 -r091da501e5dd61cf05b94c4d4f075c1e73b3d950 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/SurfaceLineEntityReadExtensions.cs (.../SurfaceLineEntityReadExtensions.cs) (revision 7f82fd637dc8796f3d270cb0fa6d9ab18548c6f4) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/SurfaceLineEntityReadExtensions.cs (.../SurfaceLineEntityReadExtensions.cs) (revision 091da501e5dd61cf05b94c4d4f075c1e73b3d950) @@ -48,10 +48,6 @@ /// Thrown when any input parameter is null. /// Thrown when /// of is empty. - /// Thrown when the - /// contains an invalid type of characteristic point. - /// Thrown when the contains a - /// characteristic point that is not supported. public static PipingSurfaceLine ReadAsPipingSurfaceLine(this SurfaceLineEntity entity, ReadConversionCollector collector) { @@ -93,10 +89,6 @@ /// Thrown when any input parameter is null. /// Thrown when /// of is empty. - /// Thrown when the - /// contains an invalid type of characteristic point. - /// Thrown when the contains a - /// characteristic point that is not supported. public static MacroStabilityInwardsSurfaceLine ReadAsMacroStabilityInwardsSurfaceLine( this SurfaceLineEntity entity, ReadConversionCollector collector) @@ -134,16 +126,6 @@ entity.ReferenceLineIntersectionY.ToNullAsNaN()); } - /// - /// Reads the characteristic points from the and sets these - /// to the . - /// - /// The entity to read. - /// The surface line to set the characteristic point on. - /// Thrown when the - /// contains an invalid type of characteristic point. - /// Thrown when the contains a - /// characteristic point that is not supported. private static void ReadCharacteristicPoints(this SurfaceLineEntity entity, PipingSurfaceLine surfaceLine) { var characteristicPoints = new Dictionary(); @@ -157,16 +139,6 @@ characteristicPoints.ForEachElementDo(cp => SetCharacteristicPoint(surfaceLine, cp.Key, cp.Value)); } - /// - /// Reads the characteristic points from the and sets these - /// to the . - /// - /// The entity to read. - /// The surface line to set the characteristic point on. - /// Thrown when the - /// contains an invalid type of characteristic point. - /// Thrown when the contains a - /// characteristic point that is not supported. private static void ReadCharacteristicPoints(this SurfaceLineEntity entity, MacroStabilityInwardsSurfaceLine surfaceLine) { var characteristicPoints = new Dictionary(); @@ -180,16 +152,6 @@ characteristicPoints.ForEachElementDo(cp => SetCharacteristicPoint(surfaceLine, cp.Key, cp.Value)); } - - /// - /// Sets the characteristic point and its coordinate to the . - /// - /// The surface line to set the characteristic point on. - /// The type of characteristic point. - /// The point associated with the characteristic point. - /// Thrown when is not - /// a valid . - /// Thrown when is not supported. private static void SetCharacteristicPoint(PipingSurfaceLine surfaceLine, PipingCharacteristicPointType type, Point3D geometryPoint) @@ -226,15 +188,6 @@ } } - /// - /// Sets the characteristic point and its coordinate to the . - /// - /// The surface line to set the characteristic point on. - /// The type of characteristic point. - /// The point associated with the characteristic point. - /// Thrown when is not - /// a valid . - /// Thrown when is not supported. private static void SetCharacteristicPoint(MacroStabilityInwardsSurfaceLine surfaceLine, MacroStabilityInwardsCharacteristicPointType type, Point3D geometryPoint) Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/SurfaceLineEntityReadExtensionsTest.cs =================================================================== diff -u -r7f82fd637dc8796f3d270cb0fa6d9ab18548c6f4 -r091da501e5dd61cf05b94c4d4f075c1e73b3d950 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/SurfaceLineEntityReadExtensionsTest.cs (.../SurfaceLineEntityReadExtensionsTest.cs) (revision 7f82fd637dc8796f3d270cb0fa6d9ab18548c6f4) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/SurfaceLineEntityReadExtensionsTest.cs (.../SurfaceLineEntityReadExtensionsTest.cs) (revision 091da501e5dd61cf05b94c4d4f075c1e73b3d950) @@ -20,13 +20,11 @@ // All rights reserved. using System; -using System.ComponentModel; using System.Linq; using Application.Ringtoets.Storage.DbContext; using Application.Ringtoets.Storage.Read; using Application.Ringtoets.Storage.Serializers; using Core.Common.Base.Geometry; -using Core.Common.TestUtil; using NUnit.Framework; using Ringtoets.MacroStabilityInwards.Primitives; using Ringtoets.Piping.Primitives; @@ -299,39 +297,6 @@ } [Test] - public void ReadAsPipingSurfaceLine_WithInvalidPipingCharacteristicPointType_ThrowsInvalidEnumArgumentException() - { - // Setup - var random = new Random(31); - - var points = new[] - { - CreatePoint3D(random) - }; - - const byte invalidCharacteristicPointType = 37; - var entity = new SurfaceLineEntity - { - Name = "Better name.", - ReferenceLineIntersectionX = random.NextDouble(), - ReferenceLineIntersectionY = random.NextDouble(), - PointsXml = new Point3DXmlSerializer().ToXml(points), - PipingCharacteristicPointEntities = - { - CreatePipingCharacteristicPointEntity(points[0], (PipingCharacteristicPointType) invalidCharacteristicPointType) - } - }; - - // Call - TestDelegate call = () => entity.ReadAsPipingSurfaceLine(new ReadConversionCollector()); - - // Assert - string exoectedMessage = $"The value of argument 'type' ({invalidCharacteristicPointType}) is invalid for Enum type '{nameof(PipingCharacteristicPointType)}'."; - string parameterName = TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, exoectedMessage).ParamName; - Assert.AreEqual("type", parameterName); - } - - [Test] public void ReadAsPipingSurfaceLine_SurfaceLineEntityReadMultipleTimes_ReturnSameSurfaceLine() { // Setup @@ -653,39 +618,6 @@ } [Test] - public void ReadAsMacroStabilityInwardsSurfaceLine_WithInvalidMacroStabilityCharacteristicPointType_ThrowsInvalidEnumArgumentException() - { - // Setup - var random = new Random(31); - - var points = new[] - { - CreatePoint3D(random) - }; - - const byte invalidCharacteristicPointType = 37; - var entity = new SurfaceLineEntity - { - Name = "Better name.", - ReferenceLineIntersectionX = random.NextDouble(), - ReferenceLineIntersectionY = random.NextDouble(), - PointsXml = new Point3DXmlSerializer().ToXml(points), - MacroStabilityInwardsCharacteristicPointEntities = - { - CreateMacroStabilityInwardsCharacteristicPointEntity(points[0], (MacroStabilityInwardsCharacteristicPointType) invalidCharacteristicPointType) - } - }; - - // Call - TestDelegate call = () => entity.ReadAsMacroStabilityInwardsSurfaceLine(new ReadConversionCollector()); - - // Assert - string exoectedMessage = $"The value of argument 'type' ({invalidCharacteristicPointType}) is invalid for Enum type '{nameof(MacroStabilityInwardsCharacteristicPointType)}'."; - string parameterName = TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, exoectedMessage).ParamName; - Assert.AreEqual("type", parameterName); - } - - [Test] public void ReadAsMacroStabilityInwardsSurfaceLine_SurfaceLineEntityReadMultipleTimes_ReturnSameSurfaceLine() { // Setup Index: Core/Common/src/Core.Common.Gui/DialogBasedInquiryHelper.cs =================================================================== diff -u -rac96d7c315129af851634ed5a4a6800b59ede718 -r091da501e5dd61cf05b94c4d4f075c1e73b3d950 --- Core/Common/src/Core.Common.Gui/DialogBasedInquiryHelper.cs (.../DialogBasedInquiryHelper.cs) (revision ac96d7c315129af851634ed5a4a6800b59ede718) +++ Core/Common/src/Core.Common.Gui/DialogBasedInquiryHelper.cs (.../DialogBasedInquiryHelper.cs) (revision 091da501e5dd61cf05b94c4d4f075c1e73b3d950) @@ -124,7 +124,7 @@ case DialogResult.No: return OptionalStepResult.SkipOptionalStep; default: - throw new NotImplementedException("Dialogbox should only return the above values."); + throw new NotSupportedException("Dialogbox should only return the above values."); } } } Index: Ringtoets/Common/src/Ringtoets.Common.Data/AssessmentSection/IAssessmentSection.cs =================================================================== diff -u -rca0345432ea951a80e3e956a8d485840c0897e1d -r091da501e5dd61cf05b94c4d4f075c1e73b3d950 --- Ringtoets/Common/src/Ringtoets.Common.Data/AssessmentSection/IAssessmentSection.cs (.../IAssessmentSection.cs) (revision ca0345432ea951a80e3e956a8d485840c0897e1d) +++ Ringtoets/Common/src/Ringtoets.Common.Data/AssessmentSection/IAssessmentSection.cs (.../IAssessmentSection.cs) (revision 091da501e5dd61cf05b94c4d4f075c1e73b3d950) @@ -85,10 +85,6 @@ /// and the failure mechanisms returned by . /// /// The new composition description. - /// Thrown when - /// is not a valid enum value of . - /// Thrown when - /// is not supported. void ChangeComposition(AssessmentSectionComposition newComposition); } } \ No newline at end of file Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSection.cs =================================================================== diff -u -rca0345432ea951a80e3e956a8d485840c0897e1d -r091da501e5dd61cf05b94c4d4f075c1e73b3d950 --- Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSection.cs (.../AssessmentSection.cs) (revision ca0345432ea951a80e3e956a8d485840c0897e1d) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSection.cs (.../AssessmentSection.cs) (revision 091da501e5dd61cf05b94c4d4f075c1e73b3d950) @@ -251,12 +251,17 @@ yield return TechnicalInnovation; } + /// + /// Thrown when + /// is not a valid enum value of . + /// Thrown when + /// is not supported. public void ChangeComposition(AssessmentSectionComposition newComposition) { if (!Enum.IsDefined(typeof(AssessmentSectionComposition), newComposition)) { throw new InvalidEnumArgumentException(nameof(newComposition), - (int)newComposition, + (int) newComposition, typeof(AssessmentSectionComposition)); }