Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/AssemblyFactories/GrassCoverSlipOffInwardsFailureMechanismAssemblyFactory.cs =================================================================== diff -u -r3572a31496e52519625d925c5ad6d6f670b182ae -ra0c229e36b60ff177f0fe3cdf4d696a860a5c218 --- Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/AssemblyFactories/GrassCoverSlipOffInwardsFailureMechanismAssemblyFactory.cs (.../GrassCoverSlipOffInwardsFailureMechanismAssemblyFactory.cs) (revision 3572a31496e52519625d925c5ad6d6f670b182ae) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/AssemblyFactories/GrassCoverSlipOffInwardsFailureMechanismAssemblyFactory.cs (.../GrassCoverSlipOffInwardsFailureMechanismAssemblyFactory.cs) (revision a0c229e36b60ff177f0fe3cdf4d696a860a5c218) @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using Ringtoets.AssemblyTool.Data; using Ringtoets.AssemblyTool.KernelWrapper.Calculators; @@ -196,9 +197,16 @@ throw new ArgumentNullException(nameof(failureMechanismSectionResult)); } - return failureMechanismSectionResult.UseManualAssemblyCategoryGroup - ? ManualFailureMechanismSectionAssemblyCategoryGroupConverter.Convert(failureMechanismSectionResult.ManualAssemblyCategoryGroup) - : AssembleCombinedAssessment(failureMechanismSectionResult); + try + { + return failureMechanismSectionResult.UseManualAssemblyCategoryGroup + ? ManualFailureMechanismSectionAssemblyCategoryGroupConverter.Convert(failureMechanismSectionResult.ManualAssemblyCategoryGroup) + : AssembleCombinedAssessment(failureMechanismSectionResult); + } + catch (Exception e) when (e is NotSupportedException || e is InvalidEnumArgumentException) + { + throw new AssemblyException(e.Message, e); + } } /// Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/AssemblyFactories/GrassCoverSlipOffOutwardsFailureMechanismAssemblyFactory.cs =================================================================== diff -u -rf32ce1e738e1e0b3870f041fef8ede91ef79ca9d -ra0c229e36b60ff177f0fe3cdf4d696a860a5c218 --- Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/AssemblyFactories/GrassCoverSlipOffOutwardsFailureMechanismAssemblyFactory.cs (.../GrassCoverSlipOffOutwardsFailureMechanismAssemblyFactory.cs) (revision f32ce1e738e1e0b3870f041fef8ede91ef79ca9d) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/AssemblyFactories/GrassCoverSlipOffOutwardsFailureMechanismAssemblyFactory.cs (.../GrassCoverSlipOffOutwardsFailureMechanismAssemblyFactory.cs) (revision a0c229e36b60ff177f0fe3cdf4d696a860a5c218) @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using Ringtoets.AssemblyTool.Data; using Ringtoets.AssemblyTool.KernelWrapper.Calculators; @@ -153,9 +154,16 @@ throw new ArgumentNullException(nameof(failureMechanismSectionResult)); } - return failureMechanismSectionResult.UseManualAssemblyCategoryGroup - ? ManualFailureMechanismSectionAssemblyCategoryGroupConverter.Convert(failureMechanismSectionResult.ManualAssemblyCategoryGroup) - : AssembleCombinedAssessment(failureMechanismSectionResult); + try + { + return failureMechanismSectionResult.UseManualAssemblyCategoryGroup + ? ManualFailureMechanismSectionAssemblyCategoryGroupConverter.Convert(failureMechanismSectionResult.ManualAssemblyCategoryGroup) + : AssembleCombinedAssessment(failureMechanismSectionResult); + } + catch (Exception e) when (e is NotSupportedException || e is InvalidEnumArgumentException) + { + throw new AssemblyException(e.Message, e); + } } /// Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/AssemblyFactories/MacroStabilityOutwardsFailureMechanismAssemblyFactory.cs =================================================================== diff -u -r1bd451bcc87eda8fc3c7f28ed66c03a23611d760 -ra0c229e36b60ff177f0fe3cdf4d696a860a5c218 --- Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/AssemblyFactories/MacroStabilityOutwardsFailureMechanismAssemblyFactory.cs (.../MacroStabilityOutwardsFailureMechanismAssemblyFactory.cs) (revision 1bd451bcc87eda8fc3c7f28ed66c03a23611d760) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/AssemblyFactories/MacroStabilityOutwardsFailureMechanismAssemblyFactory.cs (.../MacroStabilityOutwardsFailureMechanismAssemblyFactory.cs) (revision a0c229e36b60ff177f0fe3cdf4d696a860a5c218) @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using Ringtoets.AssemblyTool.Data; using Ringtoets.AssemblyTool.KernelWrapper.Calculators; @@ -265,11 +266,18 @@ throw new ArgumentNullException(nameof(assessmentSection)); } - return failureMechanismSectionResult.UseManualAssemblyCategoryGroup - ? ManualFailureMechanismSectionAssemblyCategoryGroupConverter.Convert(failureMechanismSectionResult.ManualAssemblyCategoryGroup) - : AssembleCombinedAssessment(failureMechanismSectionResult, - failureMechanism, - assessmentSection); + try + { + return failureMechanismSectionResult.UseManualAssemblyCategoryGroup + ? ManualFailureMechanismSectionAssemblyCategoryGroupConverter.Convert(failureMechanismSectionResult.ManualAssemblyCategoryGroup) + : AssembleCombinedAssessment(failureMechanismSectionResult, + failureMechanism, + assessmentSection); + } + catch (Exception e) when (e is NotSupportedException || e is InvalidEnumArgumentException) + { + throw new AssemblyException(e.Message, e); + } } /// Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/AssemblyFactories/MicrostabilityFailureMechanismAssemblyFactory.cs =================================================================== diff -u -r155b57bdd33a2432fb26c0aa89b27b4da0fbd1e0 -ra0c229e36b60ff177f0fe3cdf4d696a860a5c218 --- Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/AssemblyFactories/MicrostabilityFailureMechanismAssemblyFactory.cs (.../MicrostabilityFailureMechanismAssemblyFactory.cs) (revision 155b57bdd33a2432fb26c0aa89b27b4da0fbd1e0) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/AssemblyFactories/MicrostabilityFailureMechanismAssemblyFactory.cs (.../MicrostabilityFailureMechanismAssemblyFactory.cs) (revision a0c229e36b60ff177f0fe3cdf4d696a860a5c218) @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using Ringtoets.AssemblyTool.Data; using Ringtoets.AssemblyTool.KernelWrapper.Calculators; @@ -196,9 +197,16 @@ throw new ArgumentNullException(nameof(failureMechanismSectionResult)); } - return failureMechanismSectionResult.UseManualAssemblyCategoryGroup - ? ManualFailureMechanismSectionAssemblyCategoryGroupConverter.Convert(failureMechanismSectionResult.ManualAssemblyCategoryGroup) - : AssembleCombinedAssessment(failureMechanismSectionResult); + try + { + return failureMechanismSectionResult.UseManualAssemblyCategoryGroup + ? ManualFailureMechanismSectionAssemblyCategoryGroupConverter.Convert(failureMechanismSectionResult.ManualAssemblyCategoryGroup) + : AssembleCombinedAssessment(failureMechanismSectionResult); + } + catch (Exception e) when (e is NotSupportedException || e is InvalidEnumArgumentException) + { + throw new AssemblyException(e.Message, e); + } } /// Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/AssemblyFactories/PipingStructureFailureMechanismAssemblyFactory.cs =================================================================== diff -u -r0a0efdb6629e1ba905bcfae3da484a9448d3c5ed -ra0c229e36b60ff177f0fe3cdf4d696a860a5c218 --- Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/AssemblyFactories/PipingStructureFailureMechanismAssemblyFactory.cs (.../PipingStructureFailureMechanismAssemblyFactory.cs) (revision 0a0efdb6629e1ba905bcfae3da484a9448d3c5ed) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/AssemblyFactories/PipingStructureFailureMechanismAssemblyFactory.cs (.../PipingStructureFailureMechanismAssemblyFactory.cs) (revision a0c229e36b60ff177f0fe3cdf4d696a860a5c218) @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using Ringtoets.AssemblyTool.Data; using Ringtoets.AssemblyTool.KernelWrapper.Calculators; @@ -196,9 +197,16 @@ throw new ArgumentNullException(nameof(failureMechanismSectionResult)); } - return failureMechanismSectionResult.UseManualAssemblyCategoryGroup - ? ManualFailureMechanismSectionAssemblyCategoryGroupConverter.Convert(failureMechanismSectionResult.ManualAssemblyCategoryGroup) - : AssembleCombinedAssessment(failureMechanismSectionResult); + try + { + return failureMechanismSectionResult.UseManualAssemblyCategoryGroup + ? ManualFailureMechanismSectionAssemblyCategoryGroupConverter.Convert(failureMechanismSectionResult.ManualAssemblyCategoryGroup) + : AssembleCombinedAssessment(failureMechanismSectionResult); + } + catch (Exception e) when (e is NotSupportedException || e is InvalidEnumArgumentException) + { + throw new AssemblyException(e.Message, e); + } } /// Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/AssemblyFactories/StrengthStabilityLengthwiseConstructionFailureMechanismAssemblyFactory.cs =================================================================== diff -u -r2a4390996dcafa47b869be130b46a395c90b5abb -ra0c229e36b60ff177f0fe3cdf4d696a860a5c218 --- Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/AssemblyFactories/StrengthStabilityLengthwiseConstructionFailureMechanismAssemblyFactory.cs (.../StrengthStabilityLengthwiseConstructionFailureMechanismAssemblyFactory.cs) (revision 2a4390996dcafa47b869be130b46a395c90b5abb) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/AssemblyFactories/StrengthStabilityLengthwiseConstructionFailureMechanismAssemblyFactory.cs (.../StrengthStabilityLengthwiseConstructionFailureMechanismAssemblyFactory.cs) (revision a0c229e36b60ff177f0fe3cdf4d696a860a5c218) @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using Ringtoets.AssemblyTool.Data; using Ringtoets.AssemblyTool.KernelWrapper.Calculators; @@ -162,9 +163,16 @@ throw new ArgumentNullException(nameof(failureMechanismSectionResult)); } - return failureMechanismSectionResult.UseManualAssemblyCategoryGroup - ? ManualFailureMechanismSectionAssemblyCategoryGroupConverter.Convert(failureMechanismSectionResult.ManualAssemblyCategoryGroup) - : AssembleCombinedAssessment(failureMechanismSectionResult); + try + { + return failureMechanismSectionResult.UseManualAssemblyCategoryGroup + ? ManualFailureMechanismSectionAssemblyCategoryGroupConverter.Convert(failureMechanismSectionResult.ManualAssemblyCategoryGroup) + : AssembleCombinedAssessment(failureMechanismSectionResult); + } + catch (Exception e) when (e is NotSupportedException || e is InvalidEnumArgumentException) + { + throw new AssemblyException(e.Message, e); + } } /// Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/AssemblyFactories/TechnicalInnovationFailureMechanismAssemblyFactory.cs =================================================================== diff -u -rc03d261f67b4fccb343a8be6224c0133cbd3edfb -ra0c229e36b60ff177f0fe3cdf4d696a860a5c218 --- Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/AssemblyFactories/TechnicalInnovationFailureMechanismAssemblyFactory.cs (.../TechnicalInnovationFailureMechanismAssemblyFactory.cs) (revision c03d261f67b4fccb343a8be6224c0133cbd3edfb) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/AssemblyFactories/TechnicalInnovationFailureMechanismAssemblyFactory.cs (.../TechnicalInnovationFailureMechanismAssemblyFactory.cs) (revision a0c229e36b60ff177f0fe3cdf4d696a860a5c218) @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using Ringtoets.AssemblyTool.Data; using Ringtoets.AssemblyTool.KernelWrapper.Calculators; @@ -162,9 +163,16 @@ throw new ArgumentNullException(nameof(failureMechanismSectionResult)); } - return failureMechanismSectionResult.UseManualAssemblyCategoryGroup - ? ManualFailureMechanismSectionAssemblyCategoryGroupConverter.Convert(failureMechanismSectionResult.ManualAssemblyCategoryGroup) - : AssembleCombinedAssessment(failureMechanismSectionResult); + try + { + return failureMechanismSectionResult.UseManualAssemblyCategoryGroup + ? ManualFailureMechanismSectionAssemblyCategoryGroupConverter.Convert(failureMechanismSectionResult.ManualAssemblyCategoryGroup) + : AssembleCombinedAssessment(failureMechanismSectionResult); + } + catch (Exception e) when (e is NotSupportedException || e is InvalidEnumArgumentException) + { + throw new AssemblyException(e.Message, e); + } } /// Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/AssemblyFactories/WaterPressureAsphaltCoverFailureMechanismAssemblyFactory.cs =================================================================== diff -u -r7067c14b776869db0ee508758b5ebed71b06045c -ra0c229e36b60ff177f0fe3cdf4d696a860a5c218 --- Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/AssemblyFactories/WaterPressureAsphaltCoverFailureMechanismAssemblyFactory.cs (.../WaterPressureAsphaltCoverFailureMechanismAssemblyFactory.cs) (revision 7067c14b776869db0ee508758b5ebed71b06045c) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/AssemblyFactories/WaterPressureAsphaltCoverFailureMechanismAssemblyFactory.cs (.../WaterPressureAsphaltCoverFailureMechanismAssemblyFactory.cs) (revision a0c229e36b60ff177f0fe3cdf4d696a860a5c218) @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using Ringtoets.AssemblyTool.Data; using Ringtoets.AssemblyTool.KernelWrapper.Calculators; @@ -162,9 +163,16 @@ throw new ArgumentNullException(nameof(failureMechanismSectionResult)); } - return failureMechanismSectionResult.UseManualAssemblyCategoryGroup - ? ManualFailureMechanismSectionAssemblyCategoryGroupConverter.Convert(failureMechanismSectionResult.ManualAssemblyCategoryGroup) - : AssembleCombinedAssessment(failureMechanismSectionResult); + try + { + return failureMechanismSectionResult.UseManualAssemblyCategoryGroup + ? ManualFailureMechanismSectionAssemblyCategoryGroupConverter.Convert(failureMechanismSectionResult.ManualAssemblyCategoryGroup) + : AssembleCombinedAssessment(failureMechanismSectionResult); + } + catch (Exception e) when (e is NotSupportedException || e is InvalidEnumArgumentException) + { + throw new AssemblyException(e.Message, e); + } } /// Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/GrassCoverSlipOffInwardsFailureMechanismAssemblyFactoryTest.cs =================================================================== diff -u -rc1ad8e8431d65da2f22adeb93f9deddd9fae77e3 -ra0c229e36b60ff177f0fe3cdf4d696a860a5c218 --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/GrassCoverSlipOffInwardsFailureMechanismAssemblyFactoryTest.cs (.../GrassCoverSlipOffInwardsFailureMechanismAssemblyFactoryTest.cs) (revision c1ad8e8431d65da2f22adeb93f9deddd9fae77e3) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/GrassCoverSlipOffInwardsFailureMechanismAssemblyFactoryTest.cs (.../GrassCoverSlipOffInwardsFailureMechanismAssemblyFactoryTest.cs) (revision a0c229e36b60ff177f0fe3cdf4d696a860a5c218) @@ -20,6 +20,7 @@ // All rights reserved. using System; +using System.ComponentModel; using System.Linq; using Core.Common.TestUtil; using NUnit.Framework; @@ -511,6 +512,26 @@ } } + [Test] + public void GetSectionAssemblyCategoryGroup_WithManualInputAndInvalidManualFailureMechanismSectionAssemblyCategoryGroup_ThrowsAssemblyException() + { + // Setup + var sectionResult = new GrassCoverSlipOffInwardsFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()) + { + UseManualAssemblyCategoryGroup = true, + ManualAssemblyCategoryGroup = (ManualFailureMechanismSectionAssemblyCategoryGroup) 99 + }; + + // Call + TestDelegate call = () => GrassCoverSlipOffInwardsFailureMechanismAssemblyFactory.GetSectionAssemblyCategoryGroup(sectionResult); + + // Assert + var exception = Assert.Throws(call); + Exception innerException = exception.InnerException; + Assert.IsInstanceOf(innerException); + Assert.AreEqual(innerException.Message, exception.Message); + } + #endregion #region Failure Mechanism Assembly Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/GrassCoverSlipOffOutwardsFailureMechanismAssemblyFactoryTest.cs =================================================================== diff -u -rc1ad8e8431d65da2f22adeb93f9deddd9fae77e3 -ra0c229e36b60ff177f0fe3cdf4d696a860a5c218 --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/GrassCoverSlipOffOutwardsFailureMechanismAssemblyFactoryTest.cs (.../GrassCoverSlipOffOutwardsFailureMechanismAssemblyFactoryTest.cs) (revision c1ad8e8431d65da2f22adeb93f9deddd9fae77e3) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/GrassCoverSlipOffOutwardsFailureMechanismAssemblyFactoryTest.cs (.../GrassCoverSlipOffOutwardsFailureMechanismAssemblyFactoryTest.cs) (revision a0c229e36b60ff177f0fe3cdf4d696a860a5c218) @@ -20,6 +20,7 @@ // All rights reserved. using System; +using System.ComponentModel; using System.Linq; using Core.Common.TestUtil; using NUnit.Framework; @@ -510,6 +511,26 @@ } } + [Test] + public void GetSectionAssemblyCategoryGroup_WithManualInputAndInvalidManualFailureMechanismSectionAssemblyCategoryGroup_ThrowsAssemblyException() + { + // Setup + var sectionResult = new GrassCoverSlipOffOutwardsFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()) + { + UseManualAssemblyCategoryGroup = true, + ManualAssemblyCategoryGroup = (ManualFailureMechanismSectionAssemblyCategoryGroup) 99 + }; + + // Call + TestDelegate call = () => GrassCoverSlipOffOutwardsFailureMechanismAssemblyFactory.GetSectionAssemblyCategoryGroup(sectionResult); + + // Assert + var exception = Assert.Throws(call); + Exception innerException = exception.InnerException; + Assert.IsInstanceOf(innerException); + Assert.AreEqual(innerException.Message, exception.Message); + } + #endregion #region Failure Mechanism Assembly Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/MacroStabilityOutwardsFailureMechanismAssemblyFactoryTest.cs =================================================================== diff -u -r1bd451bcc87eda8fc3c7f28ed66c03a23611d760 -ra0c229e36b60ff177f0fe3cdf4d696a860a5c218 --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/MacroStabilityOutwardsFailureMechanismAssemblyFactoryTest.cs (.../MacroStabilityOutwardsFailureMechanismAssemblyFactoryTest.cs) (revision 1bd451bcc87eda8fc3c7f28ed66c03a23611d760) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/MacroStabilityOutwardsFailureMechanismAssemblyFactoryTest.cs (.../MacroStabilityOutwardsFailureMechanismAssemblyFactoryTest.cs) (revision a0c229e36b60ff177f0fe3cdf4d696a860a5c218) @@ -20,6 +20,7 @@ // All rights reserved. using System; +using System.ComponentModel; using System.Linq; using Core.Common.TestUtil; using NUnit.Framework; @@ -839,6 +840,34 @@ } } + [Test] + public void GetSectionAssemblyCategoryGroup_WithManualInputAndInvalidManualFailureMechanismSectionAssemblyCategoryGroup_ThrowsAssemblyException() + { + // Setup + var failureMechanism = new MacroStabilityOutwardsFailureMechanism(); + var sectionResult = new MacroStabilityOutwardsFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()) + { + UseManualAssemblyCategoryGroup = true, + ManualAssemblyCategoryGroup = (ManualFailureMechanismSectionAssemblyCategoryGroup) 99 + }; + + var mocks = new MockRepository(); + IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, mocks); + mocks.ReplayAll(); + + // Call + TestDelegate call = () => MacroStabilityOutwardsFailureMechanismAssemblyFactory.GetSectionAssemblyCategoryGroup( + sectionResult, + failureMechanism, + assessmentSection); + + // Assert + var exception = Assert.Throws(call); + Exception innerException = exception.InnerException; + Assert.IsInstanceOf(innerException); + Assert.AreEqual(innerException.Message, exception.Message); + } + #endregion #region Failure Mechanism Assembly Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/MicrostabilityFailureMechanismAssemblyFactoryTest.cs =================================================================== diff -u -r1bd451bcc87eda8fc3c7f28ed66c03a23611d760 -ra0c229e36b60ff177f0fe3cdf4d696a860a5c218 --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/MicrostabilityFailureMechanismAssemblyFactoryTest.cs (.../MicrostabilityFailureMechanismAssemblyFactoryTest.cs) (revision 1bd451bcc87eda8fc3c7f28ed66c03a23611d760) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/MicrostabilityFailureMechanismAssemblyFactoryTest.cs (.../MicrostabilityFailureMechanismAssemblyFactoryTest.cs) (revision a0c229e36b60ff177f0fe3cdf4d696a860a5c218) @@ -20,6 +20,7 @@ // All rights reserved. using System; +using System.ComponentModel; using System.Linq; using Core.Common.TestUtil; using NUnit.Framework; @@ -511,6 +512,26 @@ } } + [Test] + public void GetSectionAssemblyCategoryGroup_WithManualInputAndInvalidManualFailureMechanismSectionAssemblyCategoryGroup_ThrowsAssemblyException() + { + // Setup + var sectionResult = new MicrostabilityFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()) + { + UseManualAssemblyCategoryGroup = true, + ManualAssemblyCategoryGroup = (ManualFailureMechanismSectionAssemblyCategoryGroup) 99 + }; + + // Call + TestDelegate call = () => MicrostabilityFailureMechanismAssemblyFactory.GetSectionAssemblyCategoryGroup(sectionResult); + + // Assert + var exception = Assert.Throws(call); + Exception innerException = exception.InnerException; + Assert.IsInstanceOf(innerException); + Assert.AreEqual(innerException.Message, exception.Message); + } + #endregion #region Failure Mechanism Assembly Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/PipingStructureFailureMechanismAssemblyFactoryTest.cs =================================================================== diff -u -rc1ad8e8431d65da2f22adeb93f9deddd9fae77e3 -ra0c229e36b60ff177f0fe3cdf4d696a860a5c218 --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/PipingStructureFailureMechanismAssemblyFactoryTest.cs (.../PipingStructureFailureMechanismAssemblyFactoryTest.cs) (revision c1ad8e8431d65da2f22adeb93f9deddd9fae77e3) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/PipingStructureFailureMechanismAssemblyFactoryTest.cs (.../PipingStructureFailureMechanismAssemblyFactoryTest.cs) (revision a0c229e36b60ff177f0fe3cdf4d696a860a5c218) @@ -20,6 +20,7 @@ // All rights reserved. using System; +using System.ComponentModel; using System.Linq; using Core.Common.TestUtil; using NUnit.Framework; @@ -511,6 +512,26 @@ } } + [Test] + public void GetSectionAssemblyCategoryGroup_WithManualInputAndInvalidManualFailureMechanismSectionAssemblyCategoryGroup_ThrowsAssemblyException() + { + // Setup + var sectionResult = new PipingStructureFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()) + { + UseManualAssemblyCategoryGroup = true, + ManualAssemblyCategoryGroup = (ManualFailureMechanismSectionAssemblyCategoryGroup) 99 + }; + + // Call + TestDelegate call = () => PipingStructureFailureMechanismAssemblyFactory.GetSectionAssemblyCategoryGroup(sectionResult); + + // Assert + var exception = Assert.Throws(call); + Exception innerException = exception.InnerException; + Assert.IsInstanceOf(innerException); + Assert.AreEqual(innerException.Message, exception.Message); + } + #endregion #region Failure Mechanism Assembly Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/StrengthStabilityLengthwiseConstructionFailureMechanismAssemblyFactoryTest.cs =================================================================== diff -u -rc1ad8e8431d65da2f22adeb93f9deddd9fae77e3 -ra0c229e36b60ff177f0fe3cdf4d696a860a5c218 --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/StrengthStabilityLengthwiseConstructionFailureMechanismAssemblyFactoryTest.cs (.../StrengthStabilityLengthwiseConstructionFailureMechanismAssemblyFactoryTest.cs) (revision c1ad8e8431d65da2f22adeb93f9deddd9fae77e3) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/StrengthStabilityLengthwiseConstructionFailureMechanismAssemblyFactoryTest.cs (.../StrengthStabilityLengthwiseConstructionFailureMechanismAssemblyFactoryTest.cs) (revision a0c229e36b60ff177f0fe3cdf4d696a860a5c218) @@ -20,6 +20,7 @@ // All rights reserved. using System; +using System.ComponentModel; using System.Linq; using Core.Common.TestUtil; using NUnit.Framework; @@ -429,6 +430,27 @@ } } + [Test] + public void GetSectionAssemblyCategoryGroup_WithManualInputAndInvalidManualFailureMechanismSectionAssemblyCategoryGroup_ThrowsAssemblyException() + { + // Setup + var sectionResult = new StrengthStabilityLengthwiseConstructionFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()) + { + UseManualAssemblyCategoryGroup = true, + ManualAssemblyCategoryGroup = (ManualFailureMechanismSectionAssemblyCategoryGroup) 99 + }; + + // Call + TestDelegate call = () => StrengthStabilityLengthwiseConstructionFailureMechanismAssemblyFactory.GetSectionAssemblyCategoryGroup( + sectionResult); + + // Assert + var exception = Assert.Throws(call); + Exception innerException = exception.InnerException; + Assert.IsInstanceOf(innerException); + Assert.AreEqual(innerException.Message, exception.Message); + } + #endregion #region Failure Mechanism Assembly Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/TechnicalInnovationFailureMechanismAssemblyFactoryTest.cs =================================================================== diff -u -rc1ad8e8431d65da2f22adeb93f9deddd9fae77e3 -ra0c229e36b60ff177f0fe3cdf4d696a860a5c218 --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/TechnicalInnovationFailureMechanismAssemblyFactoryTest.cs (.../TechnicalInnovationFailureMechanismAssemblyFactoryTest.cs) (revision c1ad8e8431d65da2f22adeb93f9deddd9fae77e3) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/TechnicalInnovationFailureMechanismAssemblyFactoryTest.cs (.../TechnicalInnovationFailureMechanismAssemblyFactoryTest.cs) (revision a0c229e36b60ff177f0fe3cdf4d696a860a5c218) @@ -20,6 +20,7 @@ // All rights reserved. using System; +using System.ComponentModel; using System.Linq; using Core.Common.TestUtil; using NUnit.Framework; @@ -427,6 +428,26 @@ } } + [Test] + public void GetSectionAssemblyCategoryGroup_WithManualInputAndInvalidManualFailureMechanismSectionAssemblyCategoryGroup_ThrowsAssemblyException() + { + // Setup + var sectionResult = new TechnicalInnovationFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()) + { + UseManualAssemblyCategoryGroup = true, + ManualAssemblyCategoryGroup = (ManualFailureMechanismSectionAssemblyCategoryGroup) 99 + }; + + // Call + TestDelegate call = () => TechnicalInnovationFailureMechanismAssemblyFactory.GetSectionAssemblyCategoryGroup(sectionResult); + + // Assert + var exception = Assert.Throws(call); + Exception innerException = exception.InnerException; + Assert.IsInstanceOf(innerException); + Assert.AreEqual(innerException.Message, exception.Message); + } + #endregion #region Failure Mechanism Assembly Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/WaterPressureAsphaltCoverFailureMechanismAssemblyFactoryTest.cs =================================================================== diff -u -rc1ad8e8431d65da2f22adeb93f9deddd9fae77e3 -ra0c229e36b60ff177f0fe3cdf4d696a860a5c218 --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/WaterPressureAsphaltCoverFailureMechanismAssemblyFactoryTest.cs (.../WaterPressureAsphaltCoverFailureMechanismAssemblyFactoryTest.cs) (revision c1ad8e8431d65da2f22adeb93f9deddd9fae77e3) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/WaterPressureAsphaltCoverFailureMechanismAssemblyFactoryTest.cs (.../WaterPressureAsphaltCoverFailureMechanismAssemblyFactoryTest.cs) (revision a0c229e36b60ff177f0fe3cdf4d696a860a5c218) @@ -20,6 +20,7 @@ // All rights reserved. using System; +using System.ComponentModel; using System.Linq; using Core.Common.TestUtil; using NUnit.Framework; @@ -427,6 +428,26 @@ } } + [Test] + public void GetSectionAssemblyCategoryGroup_WithManualInputAndInvalidManualFailureMechanismSectionAssemblyCategoryGroup_ThrowsAssemblyException() + { + // Setup + var sectionResult = new WaterPressureAsphaltCoverFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()) + { + UseManualAssemblyCategoryGroup = true, + ManualAssemblyCategoryGroup = (ManualFailureMechanismSectionAssemblyCategoryGroup) 99 + }; + + // Call + TestDelegate call = () => WaterPressureAsphaltCoverFailureMechanismAssemblyFactory.GetSectionAssemblyCategoryGroup(sectionResult); + + // Assert + var exception = Assert.Throws(call); + Exception innerException = exception.InnerException; + Assert.IsInstanceOf(innerException); + Assert.AreEqual(innerException.Message, exception.Message); + } + #endregion #region Failure Mechanism Assembly