Fisheye: Tag db2a21e6d5285bfd38f4797c30ed4d7c71b3215e refers to a dead (removed) revision in file `Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.Data/CombinedAssemblyFailureMechanismInput.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.Data/Ringtoets.AssemblyTool.Data.csproj =================================================================== diff -u -r62f92dde2608e60a2be161f4757e4d643196d7b4 -rdb2a21e6d5285bfd38f4797c30ed4d7c71b3215e --- Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.Data/Ringtoets.AssemblyTool.Data.csproj (.../Ringtoets.AssemblyTool.Data.csproj) (revision 62f92dde2608e60a2be161f4757e4d643196d7b4) +++ Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.Data/Ringtoets.AssemblyTool.Data.csproj (.../Ringtoets.AssemblyTool.Data.csproj) (revision db2a21e6d5285bfd38f4797c30ed4d7c71b3215e) @@ -16,7 +16,6 @@ - Index: Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Calculators/Assembly/AssessmentSectionAssemblyCalculator.cs =================================================================== diff -u -rd300264590cc3df96f6968a54ff20578a83f6419 -rdb2a21e6d5285bfd38f4797c30ed4d7c71b3215e --- Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Calculators/Assembly/AssessmentSectionAssemblyCalculator.cs (.../AssessmentSectionAssemblyCalculator.cs) (revision d300264590cc3df96f6968a54ff20578a83f6419) +++ Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Calculators/Assembly/AssessmentSectionAssemblyCalculator.cs (.../AssessmentSectionAssemblyCalculator.cs) (revision db2a21e6d5285bfd38f4797c30ed4d7c71b3215e) @@ -108,7 +108,7 @@ } public IEnumerable AssembleCombinedFailureMechanismSections( - IEnumerable input, double assessmentSectionLength) + IEnumerable> input, double assessmentSectionLength) { try { Index: Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Calculators/Assembly/IAssessmentSectionAssemblyCalculator.cs =================================================================== diff -u -rd300264590cc3df96f6968a54ff20578a83f6419 -rdb2a21e6d5285bfd38f4797c30ed4d7c71b3215e --- Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Calculators/Assembly/IAssessmentSectionAssemblyCalculator.cs (.../IAssessmentSectionAssemblyCalculator.cs) (revision d300264590cc3df96f6968a54ff20578a83f6419) +++ Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Calculators/Assembly/IAssessmentSectionAssemblyCalculator.cs (.../IAssessmentSectionAssemblyCalculator.cs) (revision db2a21e6d5285bfd38f4797c30ed4d7c71b3215e) @@ -68,13 +68,12 @@ /// /// Assembles the combined assessment section for the given input. /// - /// The collection of collections of failure mechanism assembly category groups - /// to assemble for. + /// The collection of failure mechanism section collections to assemble for. /// The length of the assessment section. /// A collection of . /// Thrown when /// an error occurs while assembling. - IEnumerable AssembleCombinedFailureMechanismSections(IEnumerable input, + IEnumerable AssembleCombinedFailureMechanismSections(IEnumerable> input, double assessmentSectionLength); } } \ No newline at end of file Index: Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Creators/FailureMechanismSectionListCreator.cs =================================================================== diff -u -r77a4cd48837cf3f5b03973a33453fafd140a53ec -rdb2a21e6d5285bfd38f4797c30ed4d7c71b3215e --- Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Creators/FailureMechanismSectionListCreator.cs (.../FailureMechanismSectionListCreator.cs) (revision 77a4cd48837cf3f5b03973a33453fafd140a53ec) +++ Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Creators/FailureMechanismSectionListCreator.cs (.../FailureMechanismSectionListCreator.cs) (revision db2a21e6d5285bfd38f4797c30ed4d7c71b3215e) @@ -36,27 +36,27 @@ { /// /// Creates a collection of based on the - /// given . + /// given . /// - /// The failure mechanisms to create the failure mechanism - /// section lists for. + /// The collection of failure mechanism + /// section collections to create the failure mechanism section lists for. /// A collection of . - /// Thrown when + /// Thrown when /// is null. - public static IEnumerable Create(IEnumerable failureMechanisms) + public static IEnumerable Create( + IEnumerable> failureMechanismSectionsCollection) { - if (failureMechanisms == null) + if (failureMechanismSectionsCollection == null) { - throw new ArgumentNullException(nameof(failureMechanisms)); + throw new ArgumentNullException(nameof(failureMechanismSectionsCollection)); } - return failureMechanisms.Select(fm => new FailureMechanismSectionList( - new FailureMechanism( - fm.N, fm.FailureMechanismContribution), - fm.Sections.Select(s => new FmSectionWithDirectCategory( - s.SectionStart, s.SectionEnd, - ConvertCategoryGroup(s.CategoryGroup))))) - .ToArray(); + return failureMechanismSectionsCollection.Select(sectionCollection => new FailureMechanismSectionList( + new FailureMechanism(1, 0), + sectionCollection.Select(s => new FmSectionWithDirectCategory( + s.SectionStart, s.SectionEnd, + ConvertCategoryGroup(s.CategoryGroup))))) + .ToArray(); } private static EFmSectionCategory ConvertCategoryGroup(FailureMechanismSectionAssemblyCategoryGroup category) Fisheye: Tag db2a21e6d5285bfd38f4797c30ed4d7c71b3215e refers to a dead (removed) revision in file `Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.Data.Test/CombinedAssemblyFailureMechanismInputTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.Data.Test/Ringtoets.AssemblyTool.Data.Test.csproj =================================================================== diff -u -r62f92dde2608e60a2be161f4757e4d643196d7b4 -rdb2a21e6d5285bfd38f4797c30ed4d7c71b3215e --- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.Data.Test/Ringtoets.AssemblyTool.Data.Test.csproj (.../Ringtoets.AssemblyTool.Data.Test.csproj) (revision 62f92dde2608e60a2be161f4757e4d643196d7b4) +++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.Data.Test/Ringtoets.AssemblyTool.Data.Test.csproj (.../Ringtoets.AssemblyTool.Data.Test.csproj) (revision db2a21e6d5285bfd38f4797c30ed4d7c71b3215e) @@ -19,7 +19,6 @@ - Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/AssessmentSectionAssemblyCalculatorTest.cs =================================================================== diff -u -r7c355e20c39e28c6837702bbbf7dcfea5cae6c7b -rdb2a21e6d5285bfd38f4797c30ed4d7c71b3215e --- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/AssessmentSectionAssemblyCalculatorTest.cs (.../AssessmentSectionAssemblyCalculatorTest.cs) (revision 7c355e20c39e28c6837702bbbf7dcfea5cae6c7b) +++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/AssessmentSectionAssemblyCalculatorTest.cs (.../AssessmentSectionAssemblyCalculatorTest.cs) (revision db2a21e6d5285bfd38f4797c30ed4d7c71b3215e) @@ -507,10 +507,10 @@ // Call TestDelegate test = () => calculator.AssembleCombinedFailureMechanismSections(new[] { - new CombinedAssemblyFailureMechanismInput(random.NextDouble(1, 2), random.NextDouble(), new[] + new[] { new CombinedAssemblyFailureMechanismSection(0, 1, (FailureMechanismSectionAssemblyCategoryGroup) 99) - }) + } }, random.Next()); // Assert @@ -528,10 +528,10 @@ var random = new Random(39); var input = new[] { - new CombinedAssemblyFailureMechanismInput(random.NextDouble(1, 2), random.NextDouble(), new[] + new[] { new CombinedAssemblyFailureMechanismSection(0, 1, random.NextEnumValue()) - }) + } }; double assessmentSectionLength = random.NextDouble(); @@ -588,10 +588,10 @@ // Call CombinedFailureMechanismSectionAssembly[] output = calculator.AssembleCombinedFailureMechanismSections(new[] { - new CombinedAssemblyFailureMechanismInput(random.NextDouble(1, 2), random.NextDouble(), new[] + new[] { new CombinedAssemblyFailureMechanismSection(0, 1, random.NextEnumValue()) - }) + } }, random.NextDouble()).ToArray(); // Assert @@ -625,10 +625,10 @@ // Call TestDelegate test = () => calculator.AssembleCombinedFailureMechanismSections(new[] { - new CombinedAssemblyFailureMechanismInput(random.NextDouble(1, 2), random.NextDouble(), new[] + new[] { new CombinedAssemblyFailureMechanismSection(0, 1, random.NextEnumValue()) - }) + } }, random.NextDouble()).ToArray(); // Assert @@ -656,10 +656,10 @@ // Call TestDelegate test = () => calculator.AssembleCombinedFailureMechanismSections(new[] { - new CombinedAssemblyFailureMechanismInput(random.NextDouble(1, 2), random.NextDouble(), new[] + new[] { new CombinedAssemblyFailureMechanismSection(0, 1, random.NextEnumValue()) - }) + } }, random.NextDouble()).ToArray(); // Assert Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.Test/Creators/FailureMechanismSectionListCreatorTest.cs =================================================================== diff -u -rc19058d1084b7a7f5e05e43f121f4d1c685838ad -rdb2a21e6d5285bfd38f4797c30ed4d7c71b3215e --- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.Test/Creators/FailureMechanismSectionListCreatorTest.cs (.../FailureMechanismSectionListCreatorTest.cs) (revision c19058d1084b7a7f5e05e43f121f4d1c685838ad) +++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.Test/Creators/FailureMechanismSectionListCreatorTest.cs (.../FailureMechanismSectionListCreatorTest.cs) (revision db2a21e6d5285bfd38f4797c30ed4d7c71b3215e) @@ -37,14 +37,14 @@ public class FailureMechanismSectionListCreatorTest { [Test] - public void Create_FailureMechanismsNull_ThrowsArgumentNullException() + public void Create_FailureMechanismSectionsCollectionNull_ThrowsArgumentNullException() { // Call TestDelegate call = () => FailureMechanismSectionListCreator.Create(null); // Assert var exception = Assert.Throws(call); - Assert.AreEqual("failureMechanisms", exception.ParamName); + Assert.AreEqual("failureMechanismSectionsCollection", exception.ParamName); } [Test] @@ -54,11 +54,11 @@ var random = new Random(21); var combinedAssemblyFailureMechanismInputs = new[] { - new CombinedAssemblyFailureMechanismInput(random.NextDouble(1, 2), random.NextDouble(), new[] + new[] { new CombinedAssemblyFailureMechanismSection(0, 1, random.NextEnumValue()), new CombinedAssemblyFailureMechanismSection(1, 2, random.NextEnumValue()) - }) + } }; // Call @@ -71,16 +71,13 @@ [Test] public void Create_InvalidGroup_ThrowsInvalidEnumArgumentException() { - // Setup - var random = new Random(21); - // Call TestDelegate test = () => FailureMechanismSectionListCreator.Create(new[] { - new CombinedAssemblyFailureMechanismInput(random.NextDouble(1, 2), random.NextDouble(), new[] + new[] { new CombinedAssemblyFailureMechanismSection(0, 1, (FailureMechanismSectionAssemblyCategoryGroup) 99) - }) + } }); // Assert @@ -100,16 +97,13 @@ [TestCase(FailureMechanismSectionAssemblyCategoryGroup.VIIv, EFmSectionCategory.VIIv)] public void Create_ValidGroup_ReturnEFmSectionCategory(FailureMechanismSectionAssemblyCategoryGroup originalGroup, EFmSectionCategory expectedGroup) { - // Setup - var random = new Random(21); - // Call IEnumerable output = FailureMechanismSectionListCreator.Create(new[] { - new CombinedAssemblyFailureMechanismInput(random.NextDouble(1, 2), random.NextDouble(), new[] + new[] { new CombinedAssemblyFailureMechanismSection(0, 1, originalGroup) - }) + } }); // Assert Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Test/Calculators/Assembly/AssessmentSectionAssemblyCalculatorStubTest.cs =================================================================== diff -u -re12f90a0794936d2ccfaf229de252b9f1aeb634c -rdb2a21e6d5285bfd38f4797c30ed4d7c71b3215e --- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Test/Calculators/Assembly/AssessmentSectionAssemblyCalculatorStubTest.cs (.../AssessmentSectionAssemblyCalculatorStubTest.cs) (revision e12f90a0794936d2ccfaf229de252b9f1aeb634c) +++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Test/Calculators/Assembly/AssessmentSectionAssemblyCalculatorStubTest.cs (.../AssessmentSectionAssemblyCalculatorStubTest.cs) (revision db2a21e6d5285bfd38f4797c30ed4d7c71b3215e) @@ -274,7 +274,7 @@ // Call CombinedFailureMechanismSectionAssembly[] output = - calculator.AssembleCombinedFailureMechanismSections(Enumerable.Empty(), + calculator.AssembleCombinedFailureMechanismSections(Enumerable.Empty(), new Random(21).NextDouble()).ToArray(); // Assert @@ -314,7 +314,7 @@ // Call IEnumerable output = - calculator.AssembleCombinedFailureMechanismSections(Enumerable.Empty(), + calculator.AssembleCombinedFailureMechanismSections(Enumerable.Empty(), random.NextDouble()); // Assert @@ -325,7 +325,7 @@ public void AssembleCombinedFailureMechanismSections_ThrowExceptionOnCalculateFalse_SetsInput() { // Setup - IEnumerable failureMechanismSections = Enumerable.Empty(); + IEnumerable> failureMechanismSections = Enumerable.Empty(); double assessmentSectionLength = new Random(21).NextDouble(); var calculator = new AssessmentSectionAssemblyCalculatorStub(); @@ -347,7 +347,7 @@ }; // Call - TestDelegate call = () => calculator.AssembleCombinedFailureMechanismSections(Enumerable.Empty(), + TestDelegate call = () => calculator.AssembleCombinedFailureMechanismSections(Enumerable.Empty(), new Random(21).NextDouble()); // Assert Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.TestUtil/Calculators/Assembly/AssessmentSectionAssemblyCalculatorStub.cs =================================================================== diff -u -r28bcc5f05ac19148d432c3051a88758c60c9dc0c -rdb2a21e6d5285bfd38f4797c30ed4d7c71b3215e --- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.TestUtil/Calculators/Assembly/AssessmentSectionAssemblyCalculatorStub.cs (.../AssessmentSectionAssemblyCalculatorStub.cs) (revision 28bcc5f05ac19148d432c3051a88758c60c9dc0c) +++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.TestUtil/Calculators/Assembly/AssessmentSectionAssemblyCalculatorStub.cs (.../AssessmentSectionAssemblyCalculatorStub.cs) (revision db2a21e6d5285bfd38f4797c30ed4d7c71b3215e) @@ -68,7 +68,7 @@ /// /// Gets the combined failure mechanism sections input. /// - public IEnumerable CombinedFailureMechanismSectionsInput { get; private set; } + public IEnumerable> CombinedFailureMechanismSectionsInput { get; private set; } /// /// Gets the assessment section length input. @@ -156,7 +156,7 @@ return AssembleAssessmentSectionCategoryGroupOutput.Value; } - public IEnumerable AssembleCombinedFailureMechanismSections(IEnumerable input, + public IEnumerable AssembleCombinedFailureMechanismSections(IEnumerable> input, double assessmentSectionLength) { if (ThrowExceptionOnCalculate) Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.TestUtil/CombinedFailureMechanismSectionsInputAssert.cs =================================================================== diff -u -rc19058d1084b7a7f5e05e43f121f4d1c685838ad -rdb2a21e6d5285bfd38f4797c30ed4d7c71b3215e --- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.TestUtil/CombinedFailureMechanismSectionsInputAssert.cs (.../CombinedFailureMechanismSectionsInputAssert.cs) (revision c19058d1084b7a7f5e05e43f121f4d1c685838ad) +++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.TestUtil/CombinedFailureMechanismSectionsInputAssert.cs (.../CombinedFailureMechanismSectionsInputAssert.cs) (revision db2a21e6d5285bfd38f4797c30ed4d7c71b3215e) @@ -36,22 +36,20 @@ /// /// Asserts whether is equal to . /// - /// The original collection of . + /// The original collection of + /// collections. /// The actual collection of . /// Thrown when /// is not equal to . - public static void AssertCombinedFailureMechanismInput(CombinedAssemblyFailureMechanismInput[] original, FailureMechanismSectionList[] actual) + public static void AssertCombinedFailureMechanismInput(CombinedAssemblyFailureMechanismSection[][] original, FailureMechanismSectionList[] actual) { Assert.AreEqual(original.Length, actual.Length); for (var i = 0; i < original.Length; i++) { - CombinedAssemblyFailureMechanismInput failureMechanism = original[i]; + CombinedAssemblyFailureMechanismSection[] sections = original[i]; FailureMechanismSectionList sectionList = actual[i]; - Assert.AreEqual(failureMechanism.N, sectionList.FailureMechanism.LengthEffectFactor); - Assert.AreEqual(failureMechanism.FailureMechanismContribution, sectionList.FailureMechanism.FailureProbabilityMarginFactor); - - AssertSections(failureMechanism.Sections.ToArray(), sectionList.Results.ToArray()); + AssertSections(sections.ToArray(), sectionList.Results.ToArray()); } } Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/Assembly/CombinedAssemblyFailureMechanismInputFactory.cs =================================================================== diff -u -ref0e5ea77ce26ac99b951f06e657013850d36d8a -rdb2a21e6d5285bfd38f4797c30ed4d7c71b3215e --- Ringtoets/Integration/src/Ringtoets.Integration.Data/Assembly/CombinedAssemblyFailureMechanismInputFactory.cs (.../CombinedAssemblyFailureMechanismInputFactory.cs) (revision ef0e5ea77ce26ac99b951f06e657013850d36d8a) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/Assembly/CombinedAssemblyFailureMechanismInputFactory.cs (.../CombinedAssemblyFailureMechanismInputFactory.cs) (revision db2a21e6d5285bfd38f4797c30ed4d7c71b3215e) @@ -24,7 +24,6 @@ using System.Linq; using Ringtoets.AssemblyTool.Data; using Ringtoets.Common.Data.FailureMechanism; -using Ringtoets.Common.Data.Probability; using Ringtoets.GrassCoverErosionInwards.Data; using Ringtoets.Integration.Data.StandAlone; using Ringtoets.Integration.Data.StandAlone.AssemblyFactories; @@ -35,19 +34,19 @@ namespace Ringtoets.Integration.Data.Assembly { /// - /// Factory that creates instances. + /// Factory that creates instances. /// internal static class CombinedAssemblyFailureMechanismInputFactory { /// - /// Creates a collection of . + /// Creates a collection of collections. /// /// The assessment section to use. /// The failure mechanisms to build input for. - /// An of . + /// A collection of collections. /// Thrown when any parameter is null. - public static IEnumerable CreateInput(AssessmentSection assessmentSection, - IEnumerable failureMechanisms) + public static IEnumerable> CreateInput(AssessmentSection assessmentSection, + IEnumerable failureMechanisms) { if (assessmentSection == null) { @@ -59,64 +58,43 @@ throw new ArgumentNullException(nameof(failureMechanisms)); } - var inputs = new List(); + var inputs = new List>(); PipingFailureMechanism pipingFailureMechanism = assessmentSection.Piping; if (failureMechanisms.Contains(pipingFailureMechanism)) { - inputs.Add(CreateCombinedAssemblyFailureMechanismInputItem(fm => fm.PipingProbabilityAssessmentInput.GetN( - fm.PipingProbabilityAssessmentInput.SectionLength), - pipingFailureMechanism, - CreateCombinedSections(pipingFailureMechanism.SectionResults, - assessmentSection, PipingAssemblyFunc) - .ToArray())); + inputs.Add(CreateCombinedSections(pipingFailureMechanism.SectionResults, + assessmentSection, PipingAssemblyFunc) + .ToArray()); } GrassCoverErosionInwardsFailureMechanism grassInwardsFailureMechanism = assessmentSection.GrassCoverErosionInwards; if (failureMechanisms.Contains(grassInwardsFailureMechanism)) { - inputs.Add(CreateCombinedAssemblyFailureMechanismInputItem(fm => fm.GeneralInput.N, - grassInwardsFailureMechanism, - CreateCombinedSections(grassInwardsFailureMechanism.SectionResults, - assessmentSection, GrassCoverErosionInwardsAssemblyFunc) - .ToArray())); + inputs.Add(CreateCombinedSections(grassInwardsFailureMechanism.SectionResults, + assessmentSection, GrassCoverErosionInwardsAssemblyFunc) + .ToArray()); } MacroStabilityInwardsFailureMechanism macroStabilityInwardsFailureMechanism = assessmentSection.MacroStabilityInwards; if (failureMechanisms.Contains(macroStabilityInwardsFailureMechanism)) { - inputs.Add(CreateCombinedAssemblyFailureMechanismInputItem(fm => fm.MacroStabilityInwardsProbabilityAssessmentInput.GetN( - fm.MacroStabilityInwardsProbabilityAssessmentInput.SectionLength), - macroStabilityInwardsFailureMechanism, - CreateCombinedSections(macroStabilityInwardsFailureMechanism.SectionResults, - assessmentSection, MacroStabilityInwardsAssemblyFunc) - .ToArray())); + inputs.Add(CreateCombinedSections(macroStabilityInwardsFailureMechanism.SectionResults, + assessmentSection, MacroStabilityInwardsAssemblyFunc) + .ToArray()); } MacroStabilityOutwardsFailureMechanism macroStabilityOutwardsFailureMechanism = assessmentSection.MacroStabilityOutwards; if (failureMechanisms.Contains(macroStabilityOutwardsFailureMechanism)) { - inputs.Add(CreateCombinedAssemblyFailureMechanismInputItem(fm => fm.MacroStabilityOutwardsProbabilityAssessmentInput.GetN( - fm.MacroStabilityOutwardsProbabilityAssessmentInput.SectionLength), - macroStabilityOutwardsFailureMechanism, - CreateCombinedSections(macroStabilityOutwardsFailureMechanism.SectionResults, - assessmentSection, MacroStabilityOutwardsAssemblyFunc) - .ToArray())); + inputs.Add(CreateCombinedSections(macroStabilityOutwardsFailureMechanism.SectionResults, + assessmentSection, MacroStabilityOutwardsAssemblyFunc) + .ToArray()); } return inputs; } - private static CombinedAssemblyFailureMechanismInput CreateCombinedAssemblyFailureMechanismInputItem( - Func getLengthEffectFunc, TFailureMechanism failureMechanism, - IEnumerable combinedAssemblyFailureMechanismSections) - where TFailureMechanism : IFailureMechanism - { - return new CombinedAssemblyFailureMechanismInput(getLengthEffectFunc(failureMechanism), - failureMechanism.Contribution, - combinedAssemblyFailureMechanismSections); - } - private static IEnumerable CreateCombinedSections( IEnumerable sectionResults, AssessmentSection assessmentSection, Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Assembly/CombinedAssemblyFailureMechanismInputFactoryTest.cs =================================================================== diff -u -ref0e5ea77ce26ac99b951f06e657013850d36d8a -rdb2a21e6d5285bfd38f4797c30ed4d7c71b3215e --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Assembly/CombinedAssemblyFailureMechanismInputFactoryTest.cs (.../CombinedAssemblyFailureMechanismInputFactoryTest.cs) (revision ef0e5ea77ce26ac99b951f06e657013850d36d8a) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Assembly/CombinedAssemblyFailureMechanismInputFactoryTest.cs (.../CombinedAssemblyFailureMechanismInputFactoryTest.cs) (revision db2a21e6d5285bfd38f4797c30ed4d7c71b3215e) @@ -20,14 +20,14 @@ // All rights reserved. using System; +using System.Collections.Generic; using System.Linq; using Core.Common.TestUtil; using NUnit.Framework; using Ringtoets.AssemblyTool.Data; using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.FailureMechanism; -using Ringtoets.Common.Data.Probability; using Ringtoets.Integration.Data.Assembly; using Ringtoets.Integration.TestUtil; @@ -73,30 +73,18 @@ using (new AssemblyToolCalculatorFactoryConfig()) { // Call - CombinedAssemblyFailureMechanismInput[] inputs = CombinedAssemblyFailureMechanismInputFactory.CreateInput( + IEnumerable[] inputs = CombinedAssemblyFailureMechanismInputFactory.CreateInput( assessmentSection, failureMechanisms).ToArray(); // Assert Assert.AreEqual(4, inputs.Length); - AssertInput(assessmentSection.Piping, fm => fm.PipingProbabilityAssessmentInput.GetN(fm.PipingProbabilityAssessmentInput.SectionLength), inputs[0]); - AssertInput(assessmentSection.GrassCoverErosionInwards, fm => fm.GeneralInput.N, inputs[1]); - AssertInput(assessmentSection.MacroStabilityInwards, fm => fm.MacroStabilityInwardsProbabilityAssessmentInput.GetN(fm.MacroStabilityInwardsProbabilityAssessmentInput.SectionLength), inputs[2]); - AssertInput(assessmentSection.MacroStabilityOutwards, fm => fm.MacroStabilityOutwardsProbabilityAssessmentInput.GetN(fm.MacroStabilityOutwardsProbabilityAssessmentInput.SectionLength), inputs[3]); + AssertSections(assessmentSection.Piping.SectionResults.ToArray(), inputs[0].ToArray()); + AssertSections(assessmentSection.GrassCoverErosionInwards.SectionResults.ToArray(), inputs[1].ToArray()); + AssertSections(assessmentSection.MacroStabilityInwards.SectionResults.ToArray(), inputs[2].ToArray()); + AssertSections(assessmentSection.MacroStabilityOutwards.SectionResults.ToArray(), inputs[3].ToArray()); } } - private static void AssertInput(TFailureMechanism pipingFailureMechanism, - Func getExpectedNFunc, - CombinedAssemblyFailureMechanismInput input) - where TFailureMechanism : IFailureMechanism, IHasSectionResults - { - double expectedN = getExpectedNFunc(pipingFailureMechanism); - Assert.AreEqual(expectedN, input.N); - Assert.AreEqual(pipingFailureMechanism.Contribution, input.FailureMechanismContribution); - - AssertSections(pipingFailureMechanism.SectionResults.ToArray(), input.Sections.ToArray()); - } - private static void AssertSections(T[] originalSectionResults, CombinedAssemblyFailureMechanismSection[] inputSections) where T : FailureMechanismSectionResult {