Index: Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableAssessmentSection.cs =================================================================== diff -u -r7d9a50c849077865822160e024ee7b5ed66905a0 -rc4e097264cc3ed8c5d1c3119200dfe26ad3f3833 --- Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableAssessmentSection.cs (.../ExportableAssessmentSection.cs) (revision 7d9a50c849077865822160e024ee7b5ed66905a0) +++ Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableAssessmentSection.cs (.../ExportableAssessmentSection.cs) (revision c4e097264cc3ed8c5d1c3119200dfe26ad3f3833) @@ -112,6 +112,7 @@ FailureMechanismAssemblyWithoutProbability = failureMechanismAssemblyWithoutProbability; FailureMechanismsWithProbability = failureMechanismsWithProbability; FailureMechanismsWithoutProbability = failureMechanismsWithoutProbability; + CombinedSectionAssemblies = combinedSectionAssemblyResults; } /// Index: Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableAssessmentSectionFactory.cs =================================================================== diff -u -r66b39e30bcc260749e86dd91aeddc1bcb57cb01e -rc4e097264cc3ed8c5d1c3119200dfe26ad3f3833 --- Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableAssessmentSectionFactory.cs (.../ExportableAssessmentSectionFactory.cs) (revision 66b39e30bcc260749e86dd91aeddc1bcb57cb01e) +++ Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableAssessmentSectionFactory.cs (.../ExportableAssessmentSectionFactory.cs) (revision c4e097264cc3ed8c5d1c3119200dfe26ad3f3833) @@ -166,7 +166,7 @@ /// The assessment section to an for. /// A . /// Thrown when assembly results cannot be created for . - private static ExportableCombinedSectionAssemblyCollection CreateExportableCombinedSectionAssemblyCollection(AssessmentSection assessmentSection) + private static IEnumerable CreateExportableCombinedSectionAssemblyCollection(AssessmentSection assessmentSection) { IEnumerable assemblyResults = AssessmentSectionAssemblyFactory.AssembleCombinedPerFailureMechanismSection(assessmentSection); return ExportableCombinedSectionAssemblyCollectionFactory.CreateExportableCombinedSectionAssemblyCollection(assemblyResults, assessmentSection.ReferenceLine); Index: Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableCombinedSectionAssemblyCollectionFactory.cs =================================================================== diff -u -r66b39e30bcc260749e86dd91aeddc1bcb57cb01e -rc4e097264cc3ed8c5d1c3119200dfe26ad3f3833 --- Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableCombinedSectionAssemblyCollectionFactory.cs (.../ExportableCombinedSectionAssemblyCollectionFactory.cs) (revision 66b39e30bcc260749e86dd91aeddc1bcb57cb01e) +++ Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableCombinedSectionAssemblyCollectionFactory.cs (.../ExportableCombinedSectionAssemblyCollectionFactory.cs) (revision c4e097264cc3ed8c5d1c3119200dfe26ad3f3833) @@ -30,20 +30,20 @@ namespace Ringtoets.Integration.IO.Factories { /// - /// Factory to create instances of + /// Factory to create a collection of /// public static class ExportableCombinedSectionAssemblyCollectionFactory { /// - /// Creates an new instance of + /// Creates a collection of /// based on . /// /// A collection of combined section results to - /// create an for. + /// create a collection of for. /// The reference line to map the sections to. - /// An . + /// A collection of . /// Thrown when any parameter is null. - public static ExportableCombinedSectionAssemblyCollection CreateExportableCombinedSectionAssemblyCollection( + public static IEnumerable CreateExportableCombinedSectionAssemblyCollection( IEnumerable combinedSectionAssemblyResults, ReferenceLine referenceLine) { @@ -57,9 +57,7 @@ throw new ArgumentNullException(nameof(referenceLine)); } - var sections = new List(); var sectionResults = new List(); - foreach (CombinedFailureMechanismSectionAssemblyResult assemblyResult in combinedSectionAssemblyResults) { var exportableSection = new ExportableCombinedFailureMechanismSection( @@ -74,11 +72,10 @@ assemblyResult.TotalResult), CreateFailureMechanismCombinedSectionAssemblyResults(assemblyResult)); - sections.Add(exportableSection); sectionResults.Add(exportableSectionResult); } - return new ExportableCombinedSectionAssemblyCollection(sections, sectionResults); + return sectionResults; } private static IEnumerable CreateFailureMechanismCombinedSectionAssemblyResults( Index: Ringtoets/Integration/test/Ringtoets.Integration.IO.Test/Factories/ExportableCombinedSectionAssemblyCollectionFactoryTest.cs =================================================================== diff -u -r56c8a2399c8a7006b84a36019af1e37dd639bca4 -rc4e097264cc3ed8c5d1c3119200dfe26ad3f3833 --- Ringtoets/Integration/test/Ringtoets.Integration.IO.Test/Factories/ExportableCombinedSectionAssemblyCollectionFactoryTest.cs (.../ExportableCombinedSectionAssemblyCollectionFactoryTest.cs) (revision 56c8a2399c8a7006b84a36019af1e37dd639bca4) +++ Ringtoets/Integration/test/Ringtoets.Integration.IO.Test/Factories/ExportableCombinedSectionAssemblyCollectionFactoryTest.cs (.../ExportableCombinedSectionAssemblyCollectionFactoryTest.cs) (revision c4e097264cc3ed8c5d1c3119200dfe26ad3f3833) @@ -77,7 +77,7 @@ }; // Call - ExportableCombinedSectionAssemblyCollection exportableCombinedSectionAssembly = + IEnumerable exportableCombinedSectionAssembly = ExportableCombinedSectionAssemblyCollectionFactory.CreateExportableCombinedSectionAssemblyCollection(assemblyResults, referenceLine); // Assert @@ -114,17 +114,17 @@ }); } - private static void AssertCombinedFailureMechanismSectionAssemblyResults(IEnumerable expectedSections, - ExportableCombinedSectionAssemblyCollection collection, + private static void AssertCombinedFailureMechanismSectionAssemblyResults(IEnumerable expectedSectionResults, + IEnumerable combinedSectionAssemblies, ReferenceLine referenceLine) { - int expectedNrOfSections = expectedSections.Count(); - Assert.AreEqual(expectedNrOfSections, collection.CombinedSectionAssemblyResults.Count()); + int expectedNrOfSections = expectedSectionResults.Count(); + Assert.AreEqual(expectedNrOfSections, combinedSectionAssemblies.Count()); for (var i = 0; i < expectedNrOfSections; i++) { - CombinedFailureMechanismSectionAssemblyResult expectedSection = expectedSections.ElementAt(i); - ExportableCombinedSectionAssembly actualSectionResult = collection.CombinedSectionAssemblyResults.ElementAt(i); + CombinedFailureMechanismSectionAssemblyResult expectedSection = expectedSectionResults.ElementAt(i); + ExportableCombinedSectionAssembly actualSectionResult = combinedSectionAssemblies.ElementAt(i); AssertExportableCombinedFailureMechanismSection(expectedSection, actualSectionResult.Section, referenceLine); AssertExportableCombinedFailureMechanismSectionResult(actualSectionResult, actualSectionResult.Section, expectedSection);