Index: Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableAssessmentSectionFactory.cs =================================================================== diff -u -r67ccd648ef0db4b9e75c60d2e060128fa8f54691 -r0f5e45d747682ab3f96a29761c2bb758acc4ebab --- Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableAssessmentSectionFactory.cs (.../ExportableAssessmentSectionFactory.cs) (revision 67ccd648ef0db4b9e75c60d2e060128fa8f54691) +++ Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableAssessmentSectionFactory.cs (.../ExportableAssessmentSectionFactory.cs) (revision 0f5e45d747682ab3f96a29761c2bb758acc4ebab) @@ -36,7 +36,7 @@ assessmentSection.ReferenceLine.Points, CreateExportableAssessmentSectionAssemblyResult(assessmentSection), CreateExportableFailureMechanismsWithProbability(assessmentSection), - Enumerable.Empty>(), + CreateExportableFailureMechanismsWithoutProbability(assessmentSection), new ExportableCombinedSectionAssemblyCollection(Enumerable.Empty(), Enumerable.Empty())); } @@ -58,13 +58,12 @@ /// /// Creates a collection of - /// for failure mechanisms with an assembly result that contains a probability. - /// based on . + /// for failure mechanisms with an assembly result with a probability based on . /// - /// The assessment section to create a - /// collection of with probability for. + /// The assessment section to create a collection of + /// with probability for. /// A a collection of based on failure - /// mechanisms with assembly results that have a probability. + /// mechanisms with assembly results with a probability. /// Thrown when assembly results cannot be created /// for . private static IEnumerable> CreateExportableFailureMechanismsWithProbability(AssessmentSection assessmentSection) @@ -79,5 +78,23 @@ ExportableStabilityPointStructuresFailureMechanismFactory.CreateExportableStabilityPointStructuresFailureMechanism(assessmentSection.StabilityPointStructures, assessmentSection) }; } + + /// + /// Creates a collection of + /// for failure mechanisms with an assembly result without a probability based on . + /// + /// The assessment section to create a collection of + /// with probability for. + /// A a collection of based on failure + /// mechanisms with assembly results without a probability. + /// Thrown when assembly results cannot be created + /// for . + private static IEnumerable> CreateExportableFailureMechanismsWithoutProbability(AssessmentSection assessmentSection) + { + return new[] + { + ExportableStabilityStoneCoverFailureMechanismFactory.CreateExportableStabilityStoneCoverFailureMechanism(assessmentSection.StabilityStoneCover) + }; + } } } \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.IO.Test/Factories/ExportableAssessmentSectionFactoryTest.cs =================================================================== diff -u -r096c1fd0ef21402d3ca4f249f576595cc7214b40 -r0f5e45d747682ab3f96a29761c2bb758acc4ebab --- Ringtoets/Integration/test/Ringtoets.Integration.IO.Test/Factories/ExportableAssessmentSectionFactoryTest.cs (.../ExportableAssessmentSectionFactoryTest.cs) (revision 096c1fd0ef21402d3ca4f249f576595cc7214b40) +++ Ringtoets/Integration/test/Ringtoets.Integration.IO.Test/Factories/ExportableAssessmentSectionFactoryTest.cs (.../ExportableAssessmentSectionFactoryTest.cs) (revision 0f5e45d747682ab3f96a29761c2bb758acc4ebab) @@ -18,6 +18,7 @@ using Ringtoets.MacroStabilityInwards.Data; using Ringtoets.Piping.Data; using Ringtoets.StabilityPointStructures.Data; +using Ringtoets.StabilityStoneCover.Data; namespace Ringtoets.Integration.IO.Test.Factories { @@ -62,6 +63,8 @@ FailureMechanismTestHelper.AddSections(assessmentSection.ClosingStructures, random.Next(1, 10)); FailureMechanismTestHelper.AddSections(assessmentSection.StabilityPointStructures, random.Next(1, 10)); + FailureMechanismTestHelper.AddSections(assessmentSection.StabilityStoneCover, random.Next(1, 10)); + using (new AssemblyToolCalculatorFactoryConfig()) { var calculatorfactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance; @@ -83,7 +86,10 @@ failureMechanismAssemblyCalculator, assessmentSection); - CollectionAssert.IsEmpty(exportableAssessmentSection.FailureMechanismsWithoutProbability); + AssertExportableFailureMechanismsWithoutProbability(exportableAssessmentSection.FailureMechanismsWithoutProbability, + failureMechanismAssemblyCalculator, + assessmentSection); + Assert.IsNotNull(exportableAssessmentSection.CombinedSectionAssemblyResults); } } @@ -149,5 +155,21 @@ Assert.AreEqual(stabilityPointStructures.Sections.Count(), stabilityPointStructures.Sections.Count()); Assert.AreEqual(stabilityPointStructures.SectionResults.Count(), exportableStabilityPointStructures.SectionAssemblyResults.Count()); } + + private static void AssertExportableFailureMechanismsWithoutProbability( + IEnumerable> exportableFailureMechanisms, + FailureMechanismAssemblyCalculatorStub failureMechanismAssemblyCalculator, + AssessmentSection assessmentSection) + { + Assert.AreEqual(1, exportableFailureMechanisms.Count()); + + ExportableFailureMechanism exportableStabilityStoneCover = exportableFailureMechanisms.First(); + Assert.AreEqual(failureMechanismAssemblyCalculator.FailureMechanismAssemblyCategoryGroupOutput, exportableStabilityStoneCover.FailureMechanismAssembly.AssemblyCategory); + Assert.AreEqual(ExportableFailureMechanismType.ZST, exportableStabilityStoneCover.Code); + Assert.AreEqual(ExportableFailureMechanismGroup.Group3, exportableStabilityStoneCover.Group); + StabilityStoneCoverFailureMechanism stabilityStoneCover = assessmentSection.StabilityStoneCover; + Assert.AreEqual(stabilityStoneCover.Sections.Count(), exportableStabilityStoneCover.Sections.Count()); + Assert.AreEqual(stabilityStoneCover.SectionResults.Count(), exportableStabilityStoneCover.SectionAssemblyResults.Count()); + } } } \ No newline at end of file