Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.TestUtil.Test/AssessmentSectionAssemblyTestHelperTest.cs
===================================================================
diff -u -r7112111f042c275b774622464cb27537a6563c66 -rb3ab908fdd85aedcb19ff875c7ccb618c6fd7bae
--- Ringtoets/Integration/test/Ringtoets.Integration.Data.TestUtil.Test/AssessmentSectionAssemblyTestHelperTest.cs (.../AssessmentSectionAssemblyTestHelperTest.cs) (revision 7112111f042c275b774622464cb27537a6563c66)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Data.TestUtil.Test/AssessmentSectionAssemblyTestHelperTest.cs (.../AssessmentSectionAssemblyTestHelperTest.cs) (revision b3ab908fdd85aedcb19ff875c7ccb618c6fd7bae)
@@ -22,14 +22,19 @@
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
+using Ringtoets.AssemblyTool.Data;
using Ringtoets.ClosingStructures.Data;
using Ringtoets.Common.Data.AssessmentSection;
using Ringtoets.Common.Data.FailureMechanism;
+using Ringtoets.DuneErosion.Data;
using Ringtoets.GrassCoverErosionInwards.Data;
+using Ringtoets.GrassCoverErosionOutwards.Data;
using Ringtoets.HeightStructures.Data;
using Ringtoets.MacroStabilityInwards.Data;
using Ringtoets.Piping.Data;
using Ringtoets.StabilityPointStructures.Data;
+using Ringtoets.StabilityStoneCover.Data;
+using Ringtoets.WaveImpactAsphaltCover.Data;
namespace Ringtoets.Integration.Data.TestUtil.Test
{
@@ -55,49 +60,100 @@
}, testCases.Select(tc => tc.TestName));
Assert.IsTrue(testCases.All(tc => tc.Arguments.Length == 1));
+ const double expectedManualProbability = 0.5;
+
var assessmentSectionWithPiping = (AssessmentSection) testCases[0].Arguments[0];
PipingFailureMechanism piping = assessmentSectionWithPiping.Piping;
AssertAssessmentSection(assessmentSectionWithPiping, piping);
PipingFailureMechanismSectionResult pipingSectionResult = piping.SectionResults.Single();
Assert.IsTrue(pipingSectionResult.UseManualAssembly);
- Assert.AreEqual(0.5, pipingSectionResult.ManualAssemblyProbability);
+ Assert.AreEqual(expectedManualProbability, pipingSectionResult.ManualAssemblyProbability);
var assessmentSectionWithMacroStabilityInwards = (AssessmentSection) testCases[1].Arguments[0];
MacroStabilityInwardsFailureMechanism macroStabilityInwards = assessmentSectionWithMacroStabilityInwards.MacroStabilityInwards;
AssertAssessmentSection(assessmentSectionWithMacroStabilityInwards, macroStabilityInwards);
MacroStabilityInwardsFailureMechanismSectionResult macroStabilityInwardsSectionResult = macroStabilityInwards.SectionResults.Single();
Assert.IsTrue(macroStabilityInwardsSectionResult.UseManualAssembly);
- Assert.AreEqual(0.5, macroStabilityInwardsSectionResult.ManualAssemblyProbability);
+ Assert.AreEqual(expectedManualProbability, macroStabilityInwardsSectionResult.ManualAssemblyProbability);
var assessmentSectionWithGrassCoverErosionInwards = (AssessmentSection) testCases[2].Arguments[0];
GrassCoverErosionInwardsFailureMechanism grassCoverErosionInwards = assessmentSectionWithGrassCoverErosionInwards.GrassCoverErosionInwards;
AssertAssessmentSection(assessmentSectionWithGrassCoverErosionInwards, grassCoverErosionInwards);
GrassCoverErosionInwardsFailureMechanismSectionResult grassCoverErosionInwardsSectionResult = grassCoverErosionInwards.SectionResults.Single();
Assert.IsTrue(grassCoverErosionInwardsSectionResult.UseManualAssembly);
- Assert.AreEqual(0.5, grassCoverErosionInwardsSectionResult.ManualAssemblyProbability);
+ Assert.AreEqual(expectedManualProbability, grassCoverErosionInwardsSectionResult.ManualAssemblyProbability);
var assessmentSectionWithClosingStructures = (AssessmentSection) testCases[3].Arguments[0];
ClosingStructuresFailureMechanism closingStructures = assessmentSectionWithClosingStructures.ClosingStructures;
AssertAssessmentSection(assessmentSectionWithClosingStructures, closingStructures);
ClosingStructuresFailureMechanismSectionResult closingStructuresSectionResult = closingStructures.SectionResults.Single();
Assert.IsTrue(closingStructuresSectionResult.UseManualAssembly);
- Assert.AreEqual(0.5, closingStructuresSectionResult.ManualAssemblyProbability);
+ Assert.AreEqual(expectedManualProbability, closingStructuresSectionResult.ManualAssemblyProbability);
var assessmentSectionWithHeightStructures = (AssessmentSection) testCases[4].Arguments[0];
HeightStructuresFailureMechanism heightStructures = assessmentSectionWithHeightStructures.HeightStructures;
AssertAssessmentSection(assessmentSectionWithHeightStructures, heightStructures);
HeightStructuresFailureMechanismSectionResult heightStructuresSectionResult = heightStructures.SectionResults.Single();
Assert.IsTrue(heightStructuresSectionResult.UseManualAssembly);
- Assert.AreEqual(0.5, heightStructuresSectionResult.ManualAssemblyProbability);
+ Assert.AreEqual(expectedManualProbability, heightStructuresSectionResult.ManualAssemblyProbability);
var assessmentSectionWithStabilityPointStructures = (AssessmentSection) testCases[5].Arguments[0];
StabilityPointStructuresFailureMechanism stabilityPointStructures = assessmentSectionWithStabilityPointStructures.StabilityPointStructures;
AssertAssessmentSection(assessmentSectionWithStabilityPointStructures, stabilityPointStructures);
StabilityPointStructuresFailureMechanismSectionResult stabilityPointStructuresSectionResult = stabilityPointStructures.SectionResults.Single();
Assert.IsTrue(stabilityPointStructuresSectionResult.UseManualAssembly);
- Assert.AreEqual(0.5, stabilityPointStructuresSectionResult.ManualAssemblyProbability);
+ Assert.AreEqual(expectedManualProbability, stabilityPointStructuresSectionResult.ManualAssemblyProbability);
}
+ [Test]
+ public void GetConfiguredAssessmentSectionWithGroup3FailureMechanisms_Always_ReturnsExpectedTestCases()
+ {
+ // Call
+ TestCaseData[] testCases = AssessmentSectionAssemblyTestHelper.GetConfiguredAssessmentSectionWithGroup3FailureMechanisms()
+ .ToArray();
+
+ // Assert
+ CollectionAssert.AreEqual(new[]
+ {
+ "DuneErosion",
+ "GrassCoverErosionOutwards",
+ "StabilityStoneCover",
+ "WaveImpactAsphaltCover"
+ }, testCases.Select(tc => tc.TestName));
+ Assert.IsTrue(testCases.All(tc => tc.Arguments.Length == 1));
+
+ const FailureMechanismSectionAssemblyCategoryGroup expectedManualAssemblyCategoryGroup =
+ FailureMechanismSectionAssemblyCategoryGroup.Vv;
+
+ var assessmentSectionWithDuneErosion = (AssessmentSection) testCases[0].Arguments[0];
+ DuneErosionFailureMechanism duneErosion = assessmentSectionWithDuneErosion.DuneErosion;
+ AssertAssessmentSection(assessmentSectionWithDuneErosion, duneErosion);
+ DuneErosionFailureMechanismSectionResult duneErosionSectionResult = duneErosion.SectionResults.Single();
+ Assert.IsTrue(duneErosionSectionResult.UseManualAssembly);
+ Assert.AreEqual(expectedManualAssemblyCategoryGroup, duneErosionSectionResult.ManualAssemblyCategoryGroup);
+
+ var assessmentSectionWithGrassCoverErosionOutwards = (AssessmentSection) testCases[1].Arguments[0];
+ GrassCoverErosionOutwardsFailureMechanism grassCoverErosionOutwards = assessmentSectionWithGrassCoverErosionOutwards.GrassCoverErosionOutwards;
+ AssertAssessmentSection(assessmentSectionWithGrassCoverErosionOutwards, grassCoverErosionOutwards);
+ GrassCoverErosionOutwardsFailureMechanismSectionResult grassCoverErosionOutwardsSectionResult = grassCoverErosionOutwards.SectionResults.Single();
+ Assert.IsTrue(grassCoverErosionOutwardsSectionResult.UseManualAssembly);
+ Assert.AreEqual(expectedManualAssemblyCategoryGroup, grassCoverErosionOutwardsSectionResult.ManualAssemblyCategoryGroup);
+
+ var assessmentSectionWithStabilityStoneCover = (AssessmentSection) testCases[2].Arguments[0];
+ StabilityStoneCoverFailureMechanism stabilityStoneCover = assessmentSectionWithStabilityStoneCover.StabilityStoneCover;
+ AssertAssessmentSection(assessmentSectionWithStabilityStoneCover, stabilityStoneCover);
+ StabilityStoneCoverFailureMechanismSectionResult stabilityStoneCoverSectionResult = stabilityStoneCover.SectionResults.Single();
+ Assert.IsTrue(stabilityStoneCoverSectionResult.UseManualAssembly);
+ Assert.AreEqual(expectedManualAssemblyCategoryGroup, stabilityStoneCoverSectionResult.ManualAssemblyCategoryGroup);
+
+ var assessmentSectionWithWaveImpactAsphaltCover = (AssessmentSection) testCases[3].Arguments[0];
+ WaveImpactAsphaltCoverFailureMechanism waveImpactAsphaltCover = assessmentSectionWithWaveImpactAsphaltCover.WaveImpactAsphaltCover;
+ AssertAssessmentSection(assessmentSectionWithWaveImpactAsphaltCover, waveImpactAsphaltCover);
+ WaveImpactAsphaltCoverFailureMechanismSectionResult waveImpactAsphaltCoverSectionResult = waveImpactAsphaltCover.SectionResults.Single();
+ Assert.IsTrue(waveImpactAsphaltCoverSectionResult.UseManualAssembly);
+ Assert.AreEqual(expectedManualAssemblyCategoryGroup, waveImpactAsphaltCoverSectionResult.ManualAssemblyCategoryGroup);
+ }
+
private static void AssertAssessmentSection(AssessmentSection assessmentSection,
IFailureMechanism relevantFailureMechanism)
{
Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.TestUtil.Test/Ringtoets.Integration.Data.TestUtil.Test.csproj
===================================================================
diff -u -r7112111f042c275b774622464cb27537a6563c66 -rb3ab908fdd85aedcb19ff875c7ccb618c6fd7bae
--- Ringtoets/Integration/test/Ringtoets.Integration.Data.TestUtil.Test/Ringtoets.Integration.Data.TestUtil.Test.csproj (.../Ringtoets.Integration.Data.TestUtil.Test.csproj) (revision 7112111f042c275b774622464cb27537a6563c66)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Data.TestUtil.Test/Ringtoets.Integration.Data.TestUtil.Test.csproj (.../Ringtoets.Integration.Data.TestUtil.Test.csproj) (revision b3ab908fdd85aedcb19ff875c7ccb618c6fd7bae)
@@ -28,6 +28,10 @@
{3BBFD65B-B277-4E50-AE6D-BD24C3434609}
Core.Common.Base
+
+ {420ED9C3-0C33-47EA-B893-121A9C0DB4F1}
+ Ringtoets.AssemblyTool.Data
+
{C6309704-D67B-434C-BC98-9F8910BC1D10}
Ringtoets.ClosingStructures.Data
@@ -36,10 +40,18 @@
{D4200F43-3F72-4F42-AF0A-8CED416A38EC}
Ringtoets.Common.Data
+
+ {D1068432-C172-4AA6-847B-D9DEB4C6DE26}
+ Ringtoets.DuneErosion.Data
+
{90DE728E-48EF-4665-AB38-3D88E41D9F4D}
Ringtoets.GrassCoverErosionInwards.Data
+
+ {E7225477-577F-4A17-B7EC-6721158E1543}
+ Ringtoets.GrassCoverErosionOutwards.Data
+
{1C0017D8-35B5-4CA0-8FC7-A83F46DBDC99}
Ringtoets.HeightStructures.Data
@@ -56,6 +68,14 @@
{3D4B9740-8348-4434-8D77-B611FC6EE57F}
Ringtoets.StabilityPointStructures.Data
+
+ {B479E3AF-7C34-488C-BB73-D324100D36C9}
+ Ringtoets.StabilityStoneCover.Data
+
+
+ {567E0B69-5280-41CE-ADD6-443725A61C86}
+ Ringtoets.WaveImpactAsphaltCover.Data
+
{11F1F874-45AF-43E4-8AE5-15A5C9593E28}
Ringtoets.Integration.Data
Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.TestUtil/AssessmentSectionAssemblyTestHelper.cs
===================================================================
diff -u -r7112111f042c275b774622464cb27537a6563c66 -rb3ab908fdd85aedcb19ff875c7ccb618c6fd7bae
--- Ringtoets/Integration/test/Ringtoets.Integration.Data.TestUtil/AssessmentSectionAssemblyTestHelper.cs (.../AssessmentSectionAssemblyTestHelper.cs) (revision 7112111f042c275b774622464cb27537a6563c66)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Data.TestUtil/AssessmentSectionAssemblyTestHelper.cs (.../AssessmentSectionAssemblyTestHelper.cs) (revision b3ab908fdd85aedcb19ff875c7ccb618c6fd7bae)
@@ -24,14 +24,19 @@
using System.Linq;
using Core.Common.Util.Extensions;
using NUnit.Framework;
+using Ringtoets.AssemblyTool.Data;
using Ringtoets.ClosingStructures.Data;
using Ringtoets.Common.Data.AssessmentSection;
using Ringtoets.Common.Data.TestUtil;
+using Ringtoets.DuneErosion.Data;
using Ringtoets.GrassCoverErosionInwards.Data;
+using Ringtoets.GrassCoverErosionOutwards.Data;
using Ringtoets.HeightStructures.Data;
using Ringtoets.MacroStabilityInwards.Data;
using Ringtoets.Piping.Data;
using Ringtoets.StabilityPointStructures.Data;
+using Ringtoets.StabilityStoneCover.Data;
+using Ringtoets.WaveImpactAsphaltCover.Data;
namespace Ringtoets.Integration.Data.TestUtil
{
@@ -46,13 +51,32 @@
/// failure mechanisms belonging in groups 1 and 2, such that:
///
/// - All other failure mechanisms are marked as irrelevant, except one failure mechanism.
- /// - The aforementioned failure mechanism will have one section which contains manual assembly data.
+ /// - The relevant failure mechanism will have one section which contains manual assembly data.
///
///
/// A collection of configurations.
public static IEnumerable GetConfiguredAssessmentSectionWithGroup1And2FailureMechanisms()
{
- foreach (FailureMechanismConfiguration assessmentSectionConfiguration in GetGroup1And2FailureMechanismConfigurations())
+ return GenerateTestCaseData(GetGroup1And2FailureMechanismConfigurations());
+ }
+
+ ///
+ /// Gets a collection of configurations of
+ /// failure mechanisms belonging in group 3, such that:
+ ///
+ /// - All other failure mechanisms are marked as irrelevant, except one failure mechanism.
+ /// - The relevant failure mechanism will have one section which contains manual assembly data.
+ ///
+ ///
+ /// A collection of configurations.
+ public static IEnumerable GetConfiguredAssessmentSectionWithGroup3FailureMechanisms()
+ {
+ return GenerateTestCaseData(GetGroup3FailureMechanismConfigurations());
+ }
+
+ private static IEnumerable GenerateTestCaseData(IEnumerable configurations)
+ {
+ foreach (FailureMechanismConfiguration assessmentSectionConfiguration in configurations)
{
AssessmentSection assessmentSection = CreateAssessmentSectionWithIrrelevantFailureMechanisms();
assessmentSectionConfiguration.ConfigureAssessmentSection(assessmentSection);
@@ -139,6 +163,56 @@
}, "StabilityPointStructures");
}
+ private static IEnumerable GetGroup3FailureMechanismConfigurations()
+ {
+ const FailureMechanismSectionAssemblyCategoryGroup manualAssemblyCategoryGroup =
+ FailureMechanismSectionAssemblyCategoryGroup.Vv;
+
+ yield return new FailureMechanismConfiguration(section =>
+ {
+ DuneErosionFailureMechanism failureMechanism = section.DuneErosion;
+ failureMechanism.IsRelevant = true;
+ FailureMechanismTestHelper.AddSections(failureMechanism, 1);
+
+ DuneErosionFailureMechanismSectionResult sectionResult = failureMechanism.SectionResults.Single();
+ sectionResult.UseManualAssembly = true;
+ sectionResult.ManualAssemblyCategoryGroup = manualAssemblyCategoryGroup;
+ }, "DuneErosion");
+
+ yield return new FailureMechanismConfiguration(section =>
+ {
+ GrassCoverErosionOutwardsFailureMechanism failureMechanism = section.GrassCoverErosionOutwards;
+ failureMechanism.IsRelevant = true;
+ FailureMechanismTestHelper.AddSections(failureMechanism, 1);
+
+ GrassCoverErosionOutwardsFailureMechanismSectionResult sectionResult = failureMechanism.SectionResults.Single();
+ sectionResult.UseManualAssembly = true;
+ sectionResult.ManualAssemblyCategoryGroup = manualAssemblyCategoryGroup;
+ }, "GrassCoverErosionOutwards");
+
+ yield return new FailureMechanismConfiguration(section =>
+ {
+ StabilityStoneCoverFailureMechanism failureMechanism = section.StabilityStoneCover;
+ failureMechanism.IsRelevant = true;
+ FailureMechanismTestHelper.AddSections(failureMechanism, 1);
+
+ StabilityStoneCoverFailureMechanismSectionResult sectionResult = failureMechanism.SectionResults.Single();
+ sectionResult.UseManualAssembly = true;
+ sectionResult.ManualAssemblyCategoryGroup = manualAssemblyCategoryGroup;
+ }, "StabilityStoneCover");
+
+ yield return new FailureMechanismConfiguration(section =>
+ {
+ WaveImpactAsphaltCoverFailureMechanism failureMechanism = section.WaveImpactAsphaltCover;
+ failureMechanism.IsRelevant = true;
+ FailureMechanismTestHelper.AddSections(failureMechanism, 1);
+
+ WaveImpactAsphaltCoverFailureMechanismSectionResult sectionResult = failureMechanism.SectionResults.Single();
+ sectionResult.UseManualAssembly = true;
+ sectionResult.ManualAssemblyCategoryGroup = manualAssemblyCategoryGroup;
+ }, "WaveImpactAsphaltCover");
+ }
+
private class FailureMechanismConfiguration
{
public FailureMechanismConfiguration(Action configureAssessmentSection,
Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.TestUtil/Ringtoets.Integration.Data.TestUtil.csproj
===================================================================
diff -u -r7112111f042c275b774622464cb27537a6563c66 -rb3ab908fdd85aedcb19ff875c7ccb618c6fd7bae
--- Ringtoets/Integration/test/Ringtoets.Integration.Data.TestUtil/Ringtoets.Integration.Data.TestUtil.csproj (.../Ringtoets.Integration.Data.TestUtil.csproj) (revision 7112111f042c275b774622464cb27537a6563c66)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Data.TestUtil/Ringtoets.Integration.Data.TestUtil.csproj (.../Ringtoets.Integration.Data.TestUtil.csproj) (revision b3ab908fdd85aedcb19ff875c7ccb618c6fd7bae)
@@ -32,6 +32,10 @@
{F49BD8B2-332A-4C91-A196-8CCE0A2C7D98}
Core.Common.Util
+
+ {420ED9C3-0C33-47EA-B893-121A9C0DB4F1}
+ Ringtoets.AssemblyTool.Data
+
{C6309704-D67B-434C-BC98-9F8910BC1D10}
Ringtoets.ClosingStructures.Data
@@ -44,10 +48,18 @@
{4843D6E5-066F-4795-94F5-1D53932DD03C}
Ringtoets.Common.Data.TestUtil
+
+ {D1068432-C172-4AA6-847B-D9DEB4C6DE26}
+ Ringtoets.DuneErosion.Data
+
{90DE728E-48EF-4665-AB38-3D88E41D9F4D}
Ringtoets.GrassCoverErosionInwards.Data
+
+ {E7225477-577F-4A17-B7EC-6721158E1543}
+ Ringtoets.GrassCoverErosionOutwards.Data
+
{1C0017D8-35B5-4CA0-8FC7-A83F46DBDC99}
Ringtoets.HeightStructures.Data
@@ -64,6 +76,14 @@
{3D4B9740-8348-4434-8D77-B611FC6EE57F}
Ringtoets.StabilityPointStructures.Data
+
+ {B479E3AF-7C34-488C-BB73-D324100D36C9}
+ Ringtoets.StabilityStoneCover.Data
+
+
+ {567E0B69-5280-41CE-ADD6-443725A61C86}
+ Ringtoets.WaveImpactAsphaltCover.Data
+
{11F1F874-45AF-43E4-8AE5-15A5C9593E28}
Ringtoets.Integration.Data