Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/FileImporters/ClosingStructureUpdateDataStrategyTest.cs =================================================================== diff -u -rea7fd6455177ea93f8419e6a29fc00d1d3167359 -r93ba687d7de78eb3e5835a34843b3057c76336bf --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/FileImporters/ClosingStructureUpdateDataStrategyTest.cs (.../ClosingStructureUpdateDataStrategyTest.cs) (revision ea7fd6455177ea93f8419e6a29fc00d1d3167359) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/FileImporters/ClosingStructureUpdateDataStrategyTest.cs (.../ClosingStructureUpdateDataStrategyTest.cs) (revision 93ba687d7de78eb3e5835a34843b3057c76336bf) @@ -132,7 +132,7 @@ const string duplicateId = "I am a duplicate id"; var expectedStructure = new TestClosingStructure(duplicateId, "expectedStructure"); - var expectedCollection = new[] + TestClosingStructure[] expectedCollection = { expectedStructure }; @@ -174,7 +174,7 @@ }, sourceFilePath); var readStructure = new TestClosingStructure("read id"); - var importedStructures = new[] + TestClosingStructure[] importedStructures = { readStructure }; @@ -210,7 +210,7 @@ }, sourceFilePath); var readStructure = new TestClosingStructure(commonId, "new name"); - var importedStructures = new[] + TestClosingStructure[] importedStructures = { readStructure }; @@ -250,7 +250,7 @@ var structureToUpdateFrom = new TestClosingStructure(commonId, "new name"); var addedStructure = new TestClosingStructure("added id"); - var importedStructures = new[] + TestClosingStructure[] importedStructures = { structureToUpdateFrom, addedStructure @@ -647,16 +647,19 @@ }, sourceFilePath); var intersectionPoint = new Point2D(10, 10); - failureMechanism.AddSectionResult(new FailureMechanismSection("OldSection", new[] + failureMechanism.AddSections(new[] { - originalMatchingPoint, - intersectionPoint - })); - failureMechanism.AddSectionResult(new FailureMechanismSection("NewSection", new[] - { - intersectionPoint, - updatedMatchingPoint - })); + new FailureMechanismSection("OldSection", new[] + { + originalMatchingPoint, + intersectionPoint + }), + new FailureMechanismSection("NewSection", new[] + { + intersectionPoint, + updatedMatchingPoint + }) + }); ClosingStructuresHelper.UpdateCalculationToSectionResultAssignments(failureMechanism); @@ -723,11 +726,14 @@ removedStructure }, sourceFilePath); - failureMechanism.AddSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] + failureMechanism.AddSections(new[] { - originalMatchingPoint, - new Point2D(10, 10) - })); + FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] + { + originalMatchingPoint, + new Point2D(10, 10) + }) + }); ClosingStructuresHelper.UpdateCalculationToSectionResultAssignments(failureMechanism); Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructureDataSynchronizationServiceTest.cs =================================================================== diff -u -r8ba37153259674b9368d4cd2297a54843b181d75 -r93ba687d7de78eb3e5835a34843b3057c76336bf --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructureDataSynchronizationServiceTest.cs (.../ClosingStructureDataSynchronizationServiceTest.cs) (revision 8ba37153259674b9368d4cd2297a54843b181d75) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructureDataSynchronizationServiceTest.cs (.../ClosingStructureDataSynchronizationServiceTest.cs) (revision 93ba687d7de78eb3e5835a34843b3057c76336bf) @@ -118,19 +118,23 @@ calculationWithStructureToRemoveAndOutput }); - failureMechanism.AddSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] + failureMechanism.AddSections(new[] { - locationStructureToRemove, - new Point2D(1, 1) - })); + FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] + { + locationStructureToRemove, + new Point2D(1, 1) + }), + FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] + { + new Point2D(1, 1), + locationStructureToKeep + }) + }); + ClosingStructuresFailureMechanismSectionResult sectionWithCalculationAtStructureToRemove = failureMechanism.SectionResults.ElementAt(0); sectionWithCalculationAtStructureToRemove.Calculation = calculationWithStructureToRemove; - failureMechanism.AddSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] - { - new Point2D(1, 1), - locationStructureToKeep - })); ClosingStructuresFailureMechanismSectionResult sectionWithCalculationAtStructureToKeep = failureMechanism.SectionResults.ElementAt(1); sectionWithCalculationAtStructureToKeep.Calculation = calculationWithStructureToKeepAndOutput; @@ -226,19 +230,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 + }) + }); + ClosingStructuresFailureMechanismSectionResult sectionWithCalculationAtStructureA = failureMechanism.SectionResults.ElementAt(0); sectionWithCalculationAtStructureA.Calculation = calculationWithStructureA; - failureMechanism.AddSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] - { - new Point2D(1, 1), - locationStructureB - })); ClosingStructuresFailureMechanismSectionResult sectionWithCalculationAtStructureB = failureMechanism.SectionResults.ElementAt(1); sectionWithCalculationAtStructureB.Calculation = calculationWithStructureBAndOutput; Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/Configurations/GrassCoverErosionInwardsCalculationConfigurationImporterTest.cs =================================================================== diff -u -rea7fd6455177ea93f8419e6a29fc00d1d3167359 -r93ba687d7de78eb3e5835a34843b3057c76336bf --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/Configurations/GrassCoverErosionInwardsCalculationConfigurationImporterTest.cs (.../GrassCoverErosionInwardsCalculationConfigurationImporterTest.cs) (revision ea7fd6455177ea93f8419e6a29fc00d1d3167359) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/Configurations/GrassCoverErosionInwardsCalculationConfigurationImporterTest.cs (.../GrassCoverErosionInwardsCalculationConfigurationImporterTest.cs) (revision 93ba687d7de78eb3e5835a34843b3057c76336bf) @@ -581,11 +581,14 @@ var failureMechanism = new GrassCoverErosionInwardsFailureMechanism(); - failureMechanism.AddSectionResult(new FailureMechanismSection("name", new[] + failureMechanism.AddSections(new[] { - new Point2D(0, 0), - new Point2D(10, 10) - })); + new FailureMechanismSection("name", new[] + { + new Point2D(0, 0), + new Point2D(10, 10) + }) + }); var calculation = new GrassCoverErosionInwardsCalculation { Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Integration.Test/GrassCoverErosionInwardsInputContextPropertiesIntegrationTest.cs =================================================================== diff -u -rea7fd6455177ea93f8419e6a29fc00d1d3167359 -r93ba687d7de78eb3e5835a34843b3057c76336bf --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Integration.Test/GrassCoverErosionInwardsInputContextPropertiesIntegrationTest.cs (.../GrassCoverErosionInwardsInputContextPropertiesIntegrationTest.cs) (revision ea7fd6455177ea93f8419e6a29fc00d1d3167359) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Integration.Test/GrassCoverErosionInwardsInputContextPropertiesIntegrationTest.cs (.../GrassCoverErosionInwardsInputContextPropertiesIntegrationTest.cs) (revision 93ba687d7de78eb3e5835a34843b3057c76336bf) @@ -74,16 +74,18 @@ failureMechanism.CalculationsGroup.Children.Add(calculation); - failureMechanism.AddSectionResult(new FailureMechanismSection("firstSection", new List + failureMechanism.AddSections(new[] { - new Point2D(0.0, 0.0), - new Point2D(1.1, 1.1) - })); - failureMechanism.AddSectionResult(new FailureMechanismSection("secondSection", new List - { - new Point2D(1.1, 1.1), - new Point2D(2.2, 2.2) - })); + new FailureMechanismSection("firstSection", new List + { + new Point2D(0.0, 0.0), + new Point2D(1.1, 1.1) + }), new FailureMechanismSection("secondSection", new List + { + new Point2D(1.1, 1.1), + new Point2D(2.2, 2.2) + }) + }); GrassCoverErosionInwardsFailureMechanismSectionResult[] sectionResults = failureMechanism.SectionResults.ToArray(); sectionResults[0].Calculation = calculation; @@ -140,16 +142,18 @@ failureMechanism.CalculationsGroup.Children.Add(calculation1); failureMechanism.CalculationsGroup.Children.Add(calculation2); - failureMechanism.AddSectionResult(new FailureMechanismSection("firstSection", new List + failureMechanism.AddSections(new[] { - new Point2D(0.0, 0.0), - new Point2D(1.1, 1.1) - })); - failureMechanism.AddSectionResult(new FailureMechanismSection("secondSection", new List - { - new Point2D(1.1, 1.1), - new Point2D(2.2, 2.2) - })); + new FailureMechanismSection("firstSection", new List + { + new Point2D(0.0, 0.0), + new Point2D(1.1, 1.1) + }), new FailureMechanismSection("secondSection", new List + { + new Point2D(1.1, 1.1), + new Point2D(2.2, 2.2) + }) + }); GrassCoverErosionInwardsFailureMechanismSectionResult[] sectionResults = failureMechanism.SectionResults.ToArray(); sectionResults[0].Calculation = calculation1; Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/FileImporters/GrassCoverErosionInwardsDikeProfileReplaceDataStrategyTest.cs =================================================================== diff -u -rea7fd6455177ea93f8419e6a29fc00d1d3167359 -r93ba687d7de78eb3e5835a34843b3057c76336bf --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/FileImporters/GrassCoverErosionInwardsDikeProfileReplaceDataStrategyTest.cs (.../GrassCoverErosionInwardsDikeProfileReplaceDataStrategyTest.cs) (revision ea7fd6455177ea93f8419e6a29fc00d1d3167359) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/FileImporters/GrassCoverErosionInwardsDikeProfileReplaceDataStrategyTest.cs (.../GrassCoverErosionInwardsDikeProfileReplaceDataStrategyTest.cs) (revision 93ba687d7de78eb3e5835a34843b3057c76336bf) @@ -121,7 +121,7 @@ public void UpdateDikeProfilesWithImportedData_CollectionEmptyAndImportedCollectionNotEmpty_AddsNewDikeProfiles() { // Setup - var importedDikeProfiles = new[] + DikeProfile[] importedDikeProfiles = { DikeProfileTestFactory.CreateDikeProfile() }; @@ -169,7 +169,7 @@ failureMechanism.DikeProfiles }, affectedObjects); - var expectedDikeProfiles = new[] + DikeProfile[] expectedDikeProfiles = { readDikeProfile }; @@ -258,11 +258,14 @@ var failureMechanism = new GrassCoverErosionInwardsFailureMechanism(); failureMechanism.CalculationsGroup.Children.Add(affectedCalculation); - failureMechanism.AddSectionResult(new FailureMechanismSection("Section", new[] + failureMechanism.AddSections(new[] { - matchingPoint, - new Point2D(10, 10) - })); + new FailureMechanismSection("Section", new[] + { + matchingPoint, + new Point2D(10, 10) + }) + }); GrassCoverErosionInwardsHelper.UpdateCalculationToSectionResultAssignments( failureMechanism.SectionResults, Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/FileImporters/GrassCoverErosionInwardsDikeProfileUpdateDataStrategyTest.cs =================================================================== diff -u -rea7fd6455177ea93f8419e6a29fc00d1d3167359 -r93ba687d7de78eb3e5835a34843b3057c76336bf --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/FileImporters/GrassCoverErosionInwardsDikeProfileUpdateDataStrategyTest.cs (.../GrassCoverErosionInwardsDikeProfileUpdateDataStrategyTest.cs) (revision ea7fd6455177ea93f8419e6a29fc00d1d3167359) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/FileImporters/GrassCoverErosionInwardsDikeProfileUpdateDataStrategyTest.cs (.../GrassCoverErosionInwardsDikeProfileUpdateDataStrategyTest.cs) (revision 93ba687d7de78eb3e5835a34843b3057c76336bf) @@ -159,13 +159,13 @@ DikeProfile expectedDikeProfile = DikeProfileTestFactory.CreateDikeProfile("expectedName", duplicateId); var targetCollection = new DikeProfileCollection(); - var expectedTargetCollection = new[] + DikeProfile[] expectedTargetCollection = { expectedDikeProfile }; targetCollection.AddRange(expectedTargetCollection, sourceFilePath); - var importedTargetCollection = new[] + DikeProfile[] importedTargetCollection = { DeepCloneAndModify(expectedDikeProfile), DeepCloneAndModify(expectedDikeProfile) @@ -201,7 +201,7 @@ }, sourceFilePath); DikeProfile readDikeProfile = DeepCloneAndModify(targetDikeProfile); - var readDikeProfiles = new[] + DikeProfile[] readDikeProfiles = { readDikeProfile }; @@ -233,7 +233,7 @@ const string readDikeProfileId = "Read ID"; DikeProfile readDikeProfile = DikeProfileTestFactory.CreateDikeProfile(string.Empty, readDikeProfileId); - var readDikeProfiles = new[] + DikeProfile[] readDikeProfiles = { readDikeProfile }; @@ -283,7 +283,7 @@ DikeProfile dikeProfileToUpdateFrom = DeepCloneAndModify(dikeProfileToBeUpdated); DikeProfile dikeProfileToBeAdded = DikeProfileTestFactory.CreateDikeProfile(commonName, addedDikeProfileId); - var readDikeProfiles = new[] + DikeProfile[] readDikeProfiles = { dikeProfileToBeAdded, dikeProfileToUpdateFrom @@ -297,7 +297,7 @@ // Assert Assert.AreEqual(2, dikeProfiles.Count); - var expectedDikeProfiles = new[] + DikeProfile[] expectedDikeProfiles = { dikeProfileToBeAdded, dikeProfileToBeUpdated @@ -537,6 +537,7 @@ const string dikeProfileId = "ID of updated profile"; var originalMatchingPoint = new Point2D(0, 0); + var updatedMatchingPoint = new Point2D(20, 20); DikeProfile affectedProfile = DikeProfileTestFactory.CreateDikeProfile(originalMatchingPoint, dikeProfileId); var affectedCalculation = new GrassCoverErosionInwardsCalculation { @@ -550,17 +551,20 @@ failureMechanism.CalculationsGroup.Children.Add(affectedCalculation); var intersectionPoint = new Point2D(10, 10); - failureMechanism.AddSectionResult(new FailureMechanismSection("OldSection", new[] + failureMechanism.AddSections(new[] { - originalMatchingPoint, - intersectionPoint - })); - var updatedMatchingPoint = new Point2D(20, 20); - failureMechanism.AddSectionResult(new FailureMechanismSection("NewSection", new[] - { - intersectionPoint, - updatedMatchingPoint - })); + new FailureMechanismSection("OldSection", new[] + { + originalMatchingPoint, + intersectionPoint + }), + new FailureMechanismSection("NewSection", new[] + { + intersectionPoint, + updatedMatchingPoint + }) + }); + GrassCoverErosionInwardsHelper.UpdateCalculationToSectionResultAssignments( failureMechanism.SectionResults, failureMechanism.Calculations @@ -623,11 +627,14 @@ var failureMechanism = new GrassCoverErosionInwardsFailureMechanism(); failureMechanism.CalculationsGroup.Children.Add(affectedCalculation); - failureMechanism.AddSectionResult(new FailureMechanismSection("Section", new[] + failureMechanism.AddSections(new[] { - matchingPoint, - new Point2D(10, 10) - })); + new FailureMechanismSection("Section", new[] + { + matchingPoint, + new Point2D(10, 10) + }) + }); GrassCoverErosionInwardsHelper.UpdateCalculationToSectionResultAssignments( failureMechanism.SectionResults, @@ -700,7 +707,7 @@ }; DikeProfileCollection dikeProfiles = failureMechanism.DikeProfiles; - var originalDikeProfiles = new[] + DikeProfile[] originalDikeProfiles = { affectedProfile }; Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -rb7c9234daf5a52422362a7cb3fa1f46a86df63bb -r93ba687d7de78eb3e5835a34843b3057c76336bf --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs) (revision b7c9234daf5a52422362a7cb3fa1f46a86df63bb) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs) (revision 93ba687d7de78eb3e5835a34843b3057c76336bf) @@ -939,11 +939,14 @@ var group = new CalculationGroup(); var failureMechanism = new GrassCoverErosionInwardsFailureMechanism(); - failureMechanism.AddSectionResult(new FailureMechanismSection("test", new[] + failureMechanism.AddSections(new[] { - new Point2D(0.0, 0.0), - new Point2D(1.0, 1.0) - })); + new FailureMechanismSection("test", new[] + { + new Point2D(0.0, 0.0), + new Point2D(1.0, 1.0) + }) + }); DikeProfile dikeProfile = DikeProfileTestFactory.CreateDikeProfile(new Point2D(0.5, 0.5)); failureMechanism.DikeProfiles.AddRange(new[] { @@ -1008,10 +1011,13 @@ group.Children.Add(elementToBeRemoved); - failureMechanism.AddSectionResult(new FailureMechanismSection("section", new[] + failureMechanism.AddSections(new[] { - new Point2D(0, 0) - })); + new FailureMechanismSection("section", new[] + { + new Point2D(0, 0) + }) + }); GrassCoverErosionInwardsFailureMechanismSectionResult result = failureMechanism.SectionResults.First(); result.Calculation = elementToBeRemoved; Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -rb7c9234daf5a52422362a7cb3fa1f46a86df63bb -r93ba687d7de78eb3e5835a34843b3057c76336bf --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationGroupContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationGroupContextTreeNodeInfoTest.cs) (revision b7c9234daf5a52422362a7cb3fa1f46a86df63bb) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationGroupContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationGroupContextTreeNodeInfoTest.cs) (revision 93ba687d7de78eb3e5835a34843b3057c76336bf) @@ -1779,10 +1779,13 @@ parentGroup.Children.Add(group); - failureMechanism.AddSectionResult(new FailureMechanismSection("section", new[] + failureMechanism.AddSections(new[] { - new Point2D(0, 0) - })); + new FailureMechanismSection("section", new[] + { + new Point2D(0, 0) + }) + }); var calculation = new GrassCoverErosionInwardsCalculation(); group.Children.Add(calculation); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresInputContextPropertiesTest.cs =================================================================== diff -u -rb7c9234daf5a52422362a7cb3fa1f46a86df63bb -r93ba687d7de78eb3e5835a34843b3057c76336bf --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresInputContextPropertiesTest.cs (.../HeightStructuresInputContextPropertiesTest.cs) (revision b7c9234daf5a52422362a7cb3fa1f46a86df63bb) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresInputContextPropertiesTest.cs (.../HeightStructuresInputContextPropertiesTest.cs) (revision 93ba687d7de78eb3e5835a34843b3057c76336bf) @@ -310,8 +310,10 @@ new Point2D(-10.0, -10.0), new Point2D(10.0, 10.0) }); - failureMechanism.AddSectionResult( - failureMechanismSection); + failureMechanism.AddSections(new[] + { + failureMechanismSection + }); failureMechanism.CalculationsGroup.Children.Add(calculation); // Call Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.IO.Test/Configurations/HeightStructuresCalculationConfigurationImporterTest.cs =================================================================== diff -u -rea7fd6455177ea93f8419e6a29fc00d1d3167359 -r93ba687d7de78eb3e5835a34843b3057c76336bf --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.IO.Test/Configurations/HeightStructuresCalculationConfigurationImporterTest.cs (.../HeightStructuresCalculationConfigurationImporterTest.cs) (revision ea7fd6455177ea93f8419e6a29fc00d1d3167359) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.IO.Test/Configurations/HeightStructuresCalculationConfigurationImporterTest.cs (.../HeightStructuresCalculationConfigurationImporterTest.cs) (revision 93ba687d7de78eb3e5835a34843b3057c76336bf) @@ -29,7 +29,6 @@ using NUnit.Framework; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.DikeProfiles; -using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Hydraulics; using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Data.TestUtil; @@ -572,12 +571,15 @@ var failureMechanism = new HeightStructuresFailureMechanism(); - failureMechanism.AddSectionResult( - FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] + failureMechanism.AddSections(new[] { - new Point2D(0, 0), - new Point2D(10, 10) - })); + FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] + { + new Point2D(0, 0), + new Point2D(10, 10) + }) + } + ); var calculation = new StructuresCalculation { Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/FileImporters/HeightStructureReplaceDataStrategyTest.cs =================================================================== diff -u -rea7fd6455177ea93f8419e6a29fc00d1d3167359 -r93ba687d7de78eb3e5835a34843b3057c76336bf --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/FileImporters/HeightStructureReplaceDataStrategyTest.cs (.../HeightStructureReplaceDataStrategyTest.cs) (revision ea7fd6455177ea93f8419e6a29fc00d1d3167359) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/FileImporters/HeightStructureReplaceDataStrategyTest.cs (.../HeightStructureReplaceDataStrategyTest.cs) (revision 93ba687d7de78eb3e5835a34843b3057c76336bf) @@ -193,7 +193,7 @@ failureMechanism.HeightStructures }, affectedObjects); - var expected = new[] + TestHeightStructure[] expected = { importedStructure }; @@ -317,10 +317,13 @@ } }; - failureMechanism.AddSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] + failureMechanism.AddSections(new[] { - location - })); + FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] + { + location + }) + }); HeightStructuresFailureMechanismSectionResult sectionResult = failureMechanism.SectionResults.First(); sectionResult.Calculation = calculation; Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/FileImporters/HeightStructureUpdateDataStrategyTest.cs =================================================================== diff -u -rea7fd6455177ea93f8419e6a29fc00d1d3167359 -r93ba687d7de78eb3e5835a34843b3057c76336bf --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/FileImporters/HeightStructureUpdateDataStrategyTest.cs (.../HeightStructureUpdateDataStrategyTest.cs) (revision ea7fd6455177ea93f8419e6a29fc00d1d3167359) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/FileImporters/HeightStructureUpdateDataStrategyTest.cs (.../HeightStructureUpdateDataStrategyTest.cs) (revision 93ba687d7de78eb3e5835a34843b3057c76336bf) @@ -132,7 +132,7 @@ const string duplicateId = "I am a duplicate id"; var expectedStructure = new TestHeightStructure(duplicateId, "expectedStructure"); - var expectedCollection = new[] + TestHeightStructure[] expectedCollection = { expectedStructure }; @@ -174,7 +174,7 @@ }, sourceFilePath); var readStructure = new TestHeightStructure("read id"); - var importedStructures = new[] + TestHeightStructure[] importedStructures = { readStructure }; @@ -210,7 +210,7 @@ }, sourceFilePath); var readStructure = new TestHeightStructure(commonId, "new name"); - var importedStructures = new[] + TestHeightStructure[] importedStructures = { readStructure }; @@ -250,7 +250,7 @@ var structureToUpdateFrom = new TestHeightStructure(commonId, "new name"); var addedStructure = new TestHeightStructure("added id"); - var importedStructures = new[] + TestHeightStructure[] importedStructures = { structureToUpdateFrom, addedStructure @@ -595,16 +595,19 @@ }, sourceFilePath); var intersectionPoint = new Point2D(10, 10); - failureMechanism.AddSectionResult(new FailureMechanismSection("OldSection", new[] + failureMechanism.AddSections(new[] { - originalMatchingPoint, - intersectionPoint - })); - failureMechanism.AddSectionResult(new FailureMechanismSection("NewSection", new[] - { - intersectionPoint, - updatedMatchingPoint - })); + new FailureMechanismSection("OldSection", new[] + { + originalMatchingPoint, + intersectionPoint + }), + new FailureMechanismSection("NewSection", new[] + { + intersectionPoint, + updatedMatchingPoint + }) + }); HeightStructuresHelper.UpdateCalculationToSectionResultAssignments(failureMechanism); HeightStructuresFailureMechanismSectionResult[] sectionResults = failureMechanism.SectionResults.ToArray(); @@ -670,11 +673,14 @@ removedStructure }, sourceFilePath); - failureMechanism.AddSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] + failureMechanism.AddSections(new[] { - originalMatchingPoint, - new Point2D(10, 10) - })); + FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] + { + originalMatchingPoint, + new Point2D(10, 10) + }) + }); HeightStructuresHelper.UpdateCalculationToSectionResultAssignments(failureMechanism); HeightStructuresFailureMechanismSectionResult[] sectionResults = failureMechanism.SectionResults.ToArray(); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresDataSynchronizationServiceTest.cs =================================================================== diff -u -r8ba37153259674b9368d4cd2297a54843b181d75 -r93ba687d7de78eb3e5835a34843b3057c76336bf --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresDataSynchronizationServiceTest.cs (.../HeightStructuresDataSynchronizationServiceTest.cs) (revision 8ba37153259674b9368d4cd2297a54843b181d75) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresDataSynchronizationServiceTest.cs (.../HeightStructuresDataSynchronizationServiceTest.cs) (revision 93ba687d7de78eb3e5835a34843b3057c76336bf) @@ -118,19 +118,22 @@ calculationWithStructureToRemoveAndOutput }); - failureMechanism.AddSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] + failureMechanism.AddSections(new[] { - locationStructureToRemove, - new Point2D(1, 1) - })); + FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] + { + locationStructureToRemove, + new Point2D(1, 1) + }), + FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] + { + new Point2D(1, 1), + locationStructureToKeep + }) + }); HeightStructuresFailureMechanismSectionResult sectionWithCalculationAtStructureToRemove = failureMechanism.SectionResults.ElementAt(0); sectionWithCalculationAtStructureToRemove.Calculation = calculationWithStructureToRemove; - failureMechanism.AddSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] - { - new Point2D(1, 1), - locationStructureToKeep - })); HeightStructuresFailureMechanismSectionResult sectionWithCalculationAtStructureToKeep = failureMechanism.SectionResults.ElementAt(1); sectionWithCalculationAtStructureToKeep.Calculation = calculationWithStructureToKeepAndOutput; @@ -226,19 +229,20 @@ calculationWithStructureAAndOutput }); - failureMechanism.AddSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] + failureMechanism.AddSections(new [] {FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] { locationStructureA, new Point2D(1, 1) - })); + }), + FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] + { + new Point2D(1, 1), + locationStructureB + }) + }); HeightStructuresFailureMechanismSectionResult sectionWithCalculationAtStructureA = failureMechanism.SectionResults.ElementAt(0); sectionWithCalculationAtStructureA.Calculation = calculationWithStructureA; - failureMechanism.AddSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[] - { - new Point2D(1, 1), - locationStructureB - })); HeightStructuresFailureMechanismSectionResult sectionWithCalculationAtStructureB = failureMechanism.SectionResults.ElementAt(1); sectionWithCalculationAtStructureB.Calculation = calculationWithStructureBAndOutput; Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/FileImporters/StabilityPointStructuresUpdateDataStrategyTest.cs =================================================================== diff -u -rea7fd6455177ea93f8419e6a29fc00d1d3167359 -r93ba687d7de78eb3e5835a34843b3057c76336bf --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/FileImporters/StabilityPointStructuresUpdateDataStrategyTest.cs (.../StabilityPointStructuresUpdateDataStrategyTest.cs) (revision ea7fd6455177ea93f8419e6a29fc00d1d3167359) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/FileImporters/StabilityPointStructuresUpdateDataStrategyTest.cs (.../StabilityPointStructuresUpdateDataStrategyTest.cs) (revision 93ba687d7de78eb3e5835a34843b3057c76336bf) @@ -618,16 +618,19 @@ }, sourceFilePath); var intersectionPoint = new Point2D(10, 10); - failureMechanism.AddSectionResult(new FailureMechanismSection("OldSection", new[] + failureMechanism.AddSections(new[] { - originalMatchingPoint, - intersectionPoint - })); - failureMechanism.AddSectionResult(new FailureMechanismSection("NewSection", new[] - { - intersectionPoint, - updatedMatchingPoint - })); + new FailureMechanismSection("OldSection", new[] + { + originalMatchingPoint, + intersectionPoint + }), + new FailureMechanismSection("NewSection", new[] + { + intersectionPoint, + updatedMatchingPoint + }) + }); StabilityPointStructuresHelper.UpdateCalculationToSectionResultAssignments(failureMechanism); StabilityPointStructuresFailureMechanismSectionResult[] sectionResults = failureMechanism.SectionResults.ToArray();