Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/FailureMechanism/FailureMechanismBaseTest.cs =================================================================== diff -u -r05685e09226026b830d0d84359c700b7c61ed64d -rcf98e706be0f7385dcf2082da2fe615e7c66f44e --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/FailureMechanism/FailureMechanismBaseTest.cs (.../FailureMechanismBaseTest.cs) (revision 05685e09226026b830d0d84359c700b7c61ed64d) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/FailureMechanism/FailureMechanismBaseTest.cs (.../FailureMechanismBaseTest.cs) (revision cf98e706be0f7385dcf2082da2fe615e7c66f44e) @@ -146,7 +146,7 @@ // Assert var exception = Assert.Throws(call); - Assert.AreEqual("sections", exception.ParamName); + Assert.AreEqual("failureMechanismSections", exception.ParamName); } [Test] Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -rb7c9234daf5a52422362a7cb3fa1f46a86df63bb -rcf98e706be0f7385dcf2082da2fe615e7c66f44e --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsCalculationGroupContextTreeNodeInfoTest.cs (.../MacroStabilityInwardsCalculationGroupContextTreeNodeInfoTest.cs) (revision b7c9234daf5a52422362a7cb3fa1f46a86df63bb) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsCalculationGroupContextTreeNodeInfoTest.cs (.../MacroStabilityInwardsCalculationGroupContextTreeNodeInfoTest.cs) (revision cf98e706be0f7385dcf2082da2fe615e7c66f44e) @@ -1091,18 +1091,20 @@ surfaceLine1, surfaceLine2 }; - failureMechanism.AddSectionResult(new FailureMechanismSection("Section 1", new List + failureMechanism.AddSections(new[] { - new Point2D(0.0, 0.0), - new Point2D(5.0, 0.0) - })); + new FailureMechanismSection("Section 1", new List + { + new Point2D(0.0, 0.0), + new Point2D(5.0, 0.0) + }), + new FailureMechanismSection("Section 2", new List + { + new Point2D(5.0, 0.0), + new Point2D(10.0, 0.0) + }) + }); - failureMechanism.AddSectionResult(new FailureMechanismSection("Section 2", new List - { - new Point2D(5.0, 0.0), - new Point2D(10.0, 0.0) - })); - var nodeData = new MacroStabilityInwardsCalculationGroupContext(failureMechanism.CalculationsGroup, null, surfaceLines, @@ -1200,18 +1202,20 @@ surfaceLine1, surfaceLine2 }; - failureMechanism.AddSectionResult(new FailureMechanismSection("Section 1", new List + failureMechanism.AddSections(new[] { - new Point2D(0.0, 0.0), - new Point2D(5.0, 0.0) - })); + new FailureMechanismSection("Section 1", new List + { + new Point2D(0.0, 0.0), + new Point2D(5.0, 0.0) + }), + new FailureMechanismSection("Section 2", new List + { + new Point2D(5.0, 0.0), + new Point2D(10.0, 0.0) + }) + }); - failureMechanism.AddSectionResult(new FailureMechanismSection("Section 2", new List - { - new Point2D(5.0, 0.0), - new Point2D(10.0, 0.0) - })); - var nodeData = new MacroStabilityInwardsCalculationGroupContext(group, null, surfaceLines, Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PropertyClasses/StabilityPointStructuresInputContextPropertiesTest.cs =================================================================== diff -u -rea7fd6455177ea93f8419e6a29fc00d1d3167359 -rcf98e706be0f7385dcf2082da2fe615e7c66f44e --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PropertyClasses/StabilityPointStructuresInputContextPropertiesTest.cs (.../StabilityPointStructuresInputContextPropertiesTest.cs) (revision ea7fd6455177ea93f8419e6a29fc00d1d3167359) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PropertyClasses/StabilityPointStructuresInputContextPropertiesTest.cs (.../StabilityPointStructuresInputContextPropertiesTest.cs) (revision cf98e706be0f7385dcf2082da2fe615e7c66f44e) @@ -31,7 +31,6 @@ using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.DikeProfiles; -using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Forms.PropertyClasses; @@ -1457,11 +1456,14 @@ var handler = new SetPropertyValueAfterConfirmationParameterTester(Enumerable.Empty()); var properties = new StabilityPointStructuresInputContextProperties(inputContext, handler); - failureMechanism.AddSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] + failureMechanism.AddSections(new[] { - new Point2D(-10.0, -10.0), - new Point2D(10.0, 10.0) - })); + FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] + { + new Point2D(-10.0, -10.0), + new Point2D(10.0, 10.0) + }) + }); failureMechanism.CalculationsGroup.Children.Add(calculation); // Call Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/FileImporters/StabilityPointStructuresUpdateDataStrategyTest.cs =================================================================== diff -u -r93ba687d7de78eb3e5835a34843b3057c76336bf -rcf98e706be0f7385dcf2082da2fe615e7c66f44e --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/FileImporters/StabilityPointStructuresUpdateDataStrategyTest.cs (.../StabilityPointStructuresUpdateDataStrategyTest.cs) (revision 93ba687d7de78eb3e5835a34843b3057c76336bf) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/FileImporters/StabilityPointStructuresUpdateDataStrategyTest.cs (.../StabilityPointStructuresUpdateDataStrategyTest.cs) (revision cf98e706be0f7385dcf2082da2fe615e7c66f44e) @@ -140,7 +140,7 @@ }, sourceFilePath); var readStructure = new TestStabilityPointStructure("read id"); - var importedStructures = new[] + TestStabilityPointStructure[] importedStructures = { readStructure }; @@ -176,7 +176,7 @@ }, sourceFilePath); var readStructure = new TestStabilityPointStructure(commonId, "new name"); - var importedStructures = new[] + TestStabilityPointStructure[] importedStructures = { readStructure }; @@ -216,7 +216,7 @@ var structureToUpdateFrom = new TestStabilityPointStructure(commonId, "new name"); var addedStructure = new TestStabilityPointStructure("added id"); - var importedStructures = new[] + TestStabilityPointStructure[] importedStructures = { structureToUpdateFrom, addedStructure @@ -696,11 +696,14 @@ removedStructure }, sourceFilePath); - failureMechanism.AddSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] + failureMechanism.AddSections(new[] { - originalMatchingPoint, - new Point2D(10, 10) - })); + FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] + { + originalMatchingPoint, + new Point2D(10, 10) + }) + }); StabilityPointStructuresHelper.UpdateCalculationToSectionResultAssignments(failureMechanism); StabilityPointStructuresFailureMechanismSectionResult[] sectionResults = failureMechanism.SectionResults.ToArray(); Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Service.Test/StabilityPointStructuresDataSynchronizationServiceTest.cs =================================================================== diff -u -r8ba37153259674b9368d4cd2297a54843b181d75 -rcf98e706be0f7385dcf2082da2fe615e7c66f44e --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Service.Test/StabilityPointStructuresDataSynchronizationServiceTest.cs (.../StabilityPointStructuresDataSynchronizationServiceTest.cs) (revision 8ba37153259674b9368d4cd2297a54843b181d75) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Service.Test/StabilityPointStructuresDataSynchronizationServiceTest.cs (.../StabilityPointStructuresDataSynchronizationServiceTest.cs) (revision cf98e706be0f7385dcf2082da2fe615e7c66f44e) @@ -102,19 +102,23 @@ calculationWithStructureAAndOutput }); - failureMechanism.AddSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] + failureMechanism.AddSections(new[] { - locationStructureA, - new Point2D(1, 1) - })); + FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] + { + locationStructureA, + new Point2D(1, 1) + }), + FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] + { + new Point2D(1, 1), + locationStructureB + }) + }); + StabilityPointStructuresFailureMechanismSectionResult sectionWithCalculationAtStructureA = failureMechanism.SectionResults.ElementAt(0); sectionWithCalculationAtStructureA.Calculation = calculationWithStructureA; - failureMechanism.AddSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] - { - new Point2D(1, 1), - locationStructureB - })); StabilityPointStructuresFailureMechanismSectionResult sectionWithCalculationAtStructureB = failureMechanism.SectionResults.ElementAt(1); sectionWithCalculationAtStructureB.Calculation = calculationWithStructureBAndOutput; Index: Ringtoets/Storage/test/Ringtoets.Storage.Core.Test/Create/MacroStabilityInwards/MacroStabilityInwardsFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -rb7c9234daf5a52422362a7cb3fa1f46a86df63bb -rcf98e706be0f7385dcf2082da2fe615e7c66f44e --- Ringtoets/Storage/test/Ringtoets.Storage.Core.Test/Create/MacroStabilityInwards/MacroStabilityInwardsFailureMechanismCreateExtensionsTest.cs (.../MacroStabilityInwardsFailureMechanismCreateExtensionsTest.cs) (revision b7c9234daf5a52422362a7cb3fa1f46a86df63bb) +++ Ringtoets/Storage/test/Ringtoets.Storage.Core.Test/Create/MacroStabilityInwards/MacroStabilityInwardsFailureMechanismCreateExtensionsTest.cs (.../MacroStabilityInwardsFailureMechanismCreateExtensionsTest.cs) (revision cf98e706be0f7385dcf2082da2fe615e7c66f44e) @@ -25,6 +25,7 @@ using Core.Common.TestUtil; using NUnit.Framework; using Ringtoets.Common.Data.Calculation; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.TestUtil; using Ringtoets.MacroStabilityInwards.Data; using Ringtoets.MacroStabilityInwards.Data.SoilProfile; @@ -239,8 +240,11 @@ { // Setup var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - var testFailureMechanismSection = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); - failureMechanism.AddSectionResult(testFailureMechanismSection); + FailureMechanismSection testFailureMechanismSection = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); + failureMechanism.AddSections(new[] + { + testFailureMechanismSection + }); // Call FailureMechanismEntity entity = failureMechanism.Create(new PersistenceRegistry()); Index: Ringtoets/Storage/test/Ringtoets.Storage.Core.TestUtil/RingtoetsProjectTestHelper.cs =================================================================== diff -u -r2d41276aeba8f80eb646aee2a6812dddc4110c56 -rcf98e706be0f7385dcf2082da2fe615e7c66f44e --- Ringtoets/Storage/test/Ringtoets.Storage.Core.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision 2d41276aeba8f80eb646aee2a6812dddc4110c56) +++ Ringtoets/Storage/test/Ringtoets.Storage.Core.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision cf98e706be0f7385dcf2082da2fe615e7c66f44e) @@ -306,21 +306,24 @@ private static void AddSections(IFailureMechanism failureMechanism) { - failureMechanism.AddSection(new FailureMechanismSection("section 1", new[] + failureMechanism.AddSections(new[] { - new Point2D(0, 2), - new Point2D(2, 3) - })); - failureMechanism.AddSection(new FailureMechanismSection("section 2", new[] - { - new Point2D(2, 3), - new Point2D(4, 5) - })); - failureMechanism.AddSection(new FailureMechanismSection("section 3", new[] - { - new Point2D(4, 5), - new Point2D(2, 3) - })); + new FailureMechanismSection("section 1", new[] + { + new Point2D(0, 2), + new Point2D(2, 3) + }), + new FailureMechanismSection("section 2", new[] + { + new Point2D(2, 3), + new Point2D(4, 5) + }), + new FailureMechanismSection("section 3", new[] + { + new Point2D(4, 5), + new Point2D(2, 3) + }) + }); } private static void AddForeshoreProfiles(ForeshoreProfileCollection foreshoreProfiles)