Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/ClosingStructures/ClosingStructuresFailureMechanismCreateExtensions.cs =================================================================== diff -u -rac96d7c315129af851634ed5a4a6800b59ede718 -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/ClosingStructures/ClosingStructuresFailureMechanismCreateExtensions.cs (.../ClosingStructuresFailureMechanismCreateExtensions.cs) (revision ac96d7c315129af851634ed5a4a6800b59ede718) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/ClosingStructures/ClosingStructuresFailureMechanismCreateExtensions.cs (.../ClosingStructuresFailureMechanismCreateExtensions.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -26,6 +26,7 @@ using Ringtoets.ClosingStructures.Data; using Ringtoets.Common.Data; using Ringtoets.Common.Data.DikeProfiles; +using Ringtoets.Common.Data.Structures; namespace Application.Ringtoets.Storage.Create.ClosingStructures { @@ -54,10 +55,10 @@ } private static void AddEntitiesForSectionResults( - IEnumerable sectionResults, + IEnumerable> sectionResults, PersistenceRegistry registry) { - foreach (ClosingStructuresFailureMechanismSectionResult failureMechanismSectionResult in sectionResults) + foreach (StructuresFailureMechanismSectionResult failureMechanismSectionResult in sectionResults) { ClosingStructuresSectionResultEntity sectionResultEntity = failureMechanismSectionResult.Create(registry); FailureMechanismSectionEntity section = registry.Get(failureMechanismSectionResult.Section); Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/ClosingStructures/ClosingStructuresFailureMechanismSectionResultCreateExtensions.cs =================================================================== diff -u -r3fb0df0ed6e64657154700ee7706e035d5bf99f5 -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/ClosingStructures/ClosingStructuresFailureMechanismSectionResultCreateExtensions.cs (.../ClosingStructuresFailureMechanismSectionResultCreateExtensions.cs) (revision 3fb0df0ed6e64657154700ee7706e035d5bf99f5) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/ClosingStructures/ClosingStructuresFailureMechanismSectionResultCreateExtensions.cs (.../ClosingStructuresFailureMechanismSectionResultCreateExtensions.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -22,23 +22,24 @@ using System; using Application.Ringtoets.Storage.DbContext; using Ringtoets.ClosingStructures.Data; +using Ringtoets.Common.Data.Structures; namespace Application.Ringtoets.Storage.Create.ClosingStructures { /// - /// Extension methods for related to creating a + /// Extension methods for related to creating a /// . /// internal static class ClosingStructuresFailureMechanismSectionResultCreateExtensions { /// - /// Creates a based on the information of the . + /// Creates a based on the information of the . /// /// The result to create a database entity for. /// The object keeping track of create operations. /// A new . /// Thrown when is null. - internal static ClosingStructuresSectionResultEntity Create(this ClosingStructuresFailureMechanismSectionResult result, PersistenceRegistry registry) + internal static ClosingStructuresSectionResultEntity Create(this StructuresFailureMechanismSectionResult result, PersistenceRegistry registry) { if (registry == null) { Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/ClosingStructures/ClosingStructuresSectionResultEntityReadExtensions.cs =================================================================== diff -u -r3fb0df0ed6e64657154700ee7706e035d5bf99f5 -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/ClosingStructures/ClosingStructuresSectionResultEntityReadExtensions.cs (.../ClosingStructuresSectionResultEntityReadExtensions.cs) (revision 3fb0df0ed6e64657154700ee7706e035d5bf99f5) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/ClosingStructures/ClosingStructuresSectionResultEntityReadExtensions.cs (.../ClosingStructuresSectionResultEntityReadExtensions.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -24,25 +24,26 @@ using Core.Common.Base.Data; using Ringtoets.ClosingStructures.Data; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; namespace Application.Ringtoets.Storage.Read.ClosingStructures { /// - /// This class defines extension methods for read operations for a based on the + /// This class defines extension methods for read operations for a based on the /// . /// internal static class ClosingStructuresSectionResultEntityReadExtensions { /// /// Reads the and use the information to update a - /// . + /// . /// - /// The to create for. + /// The to create for. /// The target of the read operation. /// The object keeping track of read operations. - /// A new . + /// A new . /// Thrown when any input parameter is null. - internal static void Read(this ClosingStructuresSectionResultEntity entity, ClosingStructuresFailureMechanismSectionResult sectionResult, + internal static void Read(this ClosingStructuresSectionResultEntity entity, StructuresFailureMechanismSectionResult sectionResult, ReadConversionCollector collector) { if (sectionResult == null) Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/FailureMechanismEntityReadExtensions.cs =================================================================== diff -u -rfbe227cf3a6743302f63c1bd3281feda0273192c -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/FailureMechanismEntityReadExtensions.cs (.../FailureMechanismEntityReadExtensions.cs) (revision fbe227cf3a6743302f63c1bd3281feda0273192c) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/FailureMechanismEntityReadExtensions.cs (.../FailureMechanismEntityReadExtensions.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -42,6 +42,7 @@ using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Hydraulics; +using Ringtoets.Common.Data.Structures; using Ringtoets.DuneErosion.Data; using Ringtoets.GrassCoverErosionInwards.Data; using Ringtoets.GrassCoverErosionOutwards.Data; @@ -459,7 +460,7 @@ foreach (ClosingStructuresSectionResultEntity sectionResultEntity in entity.FailureMechanismSectionEntities.SelectMany(fms => fms.ClosingStructuresSectionResultEntities)) { FailureMechanismSection failureMechanismSection = collector.Get(sectionResultEntity.FailureMechanismSectionEntity); - ClosingStructuresFailureMechanismSectionResult result = failureMechanism.SectionResults.Single(sr => ReferenceEquals(sr.Section, failureMechanismSection)); + StructuresFailureMechanismSectionResult result = failureMechanism.SectionResults.Single(sr => ReferenceEquals(sr.Section, failureMechanismSection)); sectionResultEntity.Read(result, collector); } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/ClosingStructures/ClosingStructuresFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -rbcd1a835c8d39b06f4934b040d6ea45fa44b2ee5 -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/ClosingStructures/ClosingStructuresFailureMechanismSectionResultCreateExtensionsTest.cs (.../ClosingStructuresFailureMechanismSectionResultCreateExtensionsTest.cs) (revision bcd1a835c8d39b06f4934b040d6ea45fa44b2ee5) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/ClosingStructures/ClosingStructuresFailureMechanismSectionResultCreateExtensionsTest.cs (.../ClosingStructuresFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -40,7 +40,7 @@ public void Create_WithoutPersistenceRegistry_ThrowsArgumentNullException() { // Setup - var sectionResult = new ClosingStructuresFailureMechanismSectionResult(new TestFailureMechanismSection()); + var sectionResult = new StructuresFailureMechanismSectionResult(new TestFailureMechanismSection()); // Call TestDelegate test = () => sectionResult.Create(null); @@ -57,7 +57,7 @@ var assessmentLayerOneResult = random.NextEnumValue(); RoundedDouble assessmentLayerThreeResult = random.NextRoundedDouble(); - var sectionResult = new ClosingStructuresFailureMechanismSectionResult(new TestFailureMechanismSection()) + var sectionResult = new StructuresFailureMechanismSectionResult(new TestFailureMechanismSection()) { AssessmentLayerOne = assessmentLayerOneResult, AssessmentLayerThree = assessmentLayerThreeResult @@ -76,7 +76,7 @@ public void Create_WithNaNLevel3Result_ReturnsEntityWithExpectedResults() { // Setup - var sectionResult = new ClosingStructuresFailureMechanismSectionResult(new TestFailureMechanismSection()) + var sectionResult = new StructuresFailureMechanismSectionResult(new TestFailureMechanismSection()) { AssessmentLayerThree = RoundedDouble.NaN }; @@ -93,7 +93,7 @@ { // Setup var calculation = new StructuresCalculation(); - var sectionResult = new ClosingStructuresFailureMechanismSectionResult(new TestFailureMechanismSection()) + var sectionResult = new StructuresFailureMechanismSectionResult(new TestFailureMechanismSection()) { Calculation = calculation }; Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs =================================================================== diff -u -r2ef5183542af0464fab4ebadb3a6c2c4f7ff46b7 -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs (.../StorageSqLiteIntegrationTest.cs) (revision 2ef5183542af0464fab4ebadb3a6c2c4f7ff46b7) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs (.../StorageSqLiteIntegrationTest.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -936,15 +936,14 @@ AssertComments(expectedFailureMechanism.NotRelevantComments, actualFailureMechanism.NotRelevantComments); } - private static void AssertFailureMechanismSectionResults(IEnumerable expectedSectionResults, - IEnumerable actualSectionResults) + private static void AssertFailureMechanismSectionResults(IEnumerable> expectedSectionResults, + IEnumerable> actualSectionResults) { AssertCollectionAndItems(expectedSectionResults, actualSectionResults, (expectedItem, actualItem) => { Assert.AreEqual(expectedItem.AssessmentLayerOne, actualItem.AssessmentLayerOne); - Assert.AreEqual(expectedItem.AssessmentLayerTwoA, actualItem.AssessmentLayerTwoA); Assert.AreEqual(expectedItem.AssessmentLayerThree, actualItem.AssessmentLayerThree); if (expectedItem.Calculation == null) { Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ClosingStructures/ClosingStructuresSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -rb6e0f8d41d92ed18c902138dd49cce6e703ee883 -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ClosingStructures/ClosingStructuresSectionResultEntityReadExtensionsTest.cs (.../ClosingStructuresSectionResultEntityReadExtensionsTest.cs) (revision b6e0f8d41d92ed18c902138dd49cce6e703ee883) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ClosingStructures/ClosingStructuresSectionResultEntityReadExtensionsTest.cs (.../ClosingStructuresSectionResultEntityReadExtensionsTest.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -55,7 +55,7 @@ var entity = new ClosingStructuresSectionResultEntity(); // Call - TestDelegate call = () => entity.Read(new ClosingStructuresFailureMechanismSectionResult( + TestDelegate call = () => entity.Read(new StructuresFailureMechanismSectionResult( new TestFailureMechanismSection()), null); // Assert @@ -83,7 +83,7 @@ LayerOne = Convert.ToByte(layerOne), FailureMechanismSectionEntity = failureMechanismSectionEntity }; - var sectionResult = new ClosingStructuresFailureMechanismSectionResult(new TestFailureMechanismSection()); + var sectionResult = new StructuresFailureMechanismSectionResult(new TestFailureMechanismSection()); // Call entity.Read(sectionResult, collector); @@ -110,7 +110,7 @@ { ClosingStructuresCalculationEntity = calculationEntity }; - var sectionResult = new ClosingStructuresFailureMechanismSectionResult(new TestFailureMechanismSection()); + var sectionResult = new StructuresFailureMechanismSectionResult(new TestFailureMechanismSection()); // Call entity.Read(sectionResult, collector); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil.Test/RingtoetsProjectTestHelperTest.cs =================================================================== diff -u -rfbe227cf3a6743302f63c1bd3281feda0273192c -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil.Test/RingtoetsProjectTestHelperTest.cs (.../RingtoetsProjectTestHelperTest.cs) (revision fbe227cf3a6743302f63c1bd3281feda0273192c) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil.Test/RingtoetsProjectTestHelperTest.cs (.../RingtoetsProjectTestHelperTest.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -404,7 +404,7 @@ Assert.IsTrue(calculationWithOutputAndGeneralResult.Output.HasGeneralResult); AssertGeneralResultTopLevelFaultTreeIllustrationPoint(calculationWithOutputAndGeneralResult.Output.GeneralResult); - ClosingStructuresFailureMechanismSectionResult firstSectionResult = failureMechanism.SectionResults.First(); + StructuresFailureMechanismSectionResult firstSectionResult = failureMechanism.SectionResults.First(); Assert.AreSame(calculationWithOutput, firstSectionResult.Calculation); var secondCalculationGroup = (CalculationGroup) failureMechanism.CalculationsGroup.Children[1]; Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs =================================================================== diff -u -r3dbf451144dc23d8abe649913baee1a5e544c48c -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision 3dbf451144dc23d8abe649913baee1a5e544c48c) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -731,12 +731,12 @@ failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); } - private static void SetSectionResults(IEnumerable sectionResults, + private static void SetSectionResults(IEnumerable> sectionResults, StructuresCalculation calculation) { var random = new Random(21); var firstSectionResultHasCalculation = false; - foreach (ClosingStructuresFailureMechanismSectionResult sectionResult in sectionResults) + foreach (StructuresFailureMechanismSectionResult sectionResult in sectionResults) { sectionResult.AssessmentLayerOne = GetAssessmentLayerOneState(); sectionResult.AssessmentLayerThree = (RoundedDouble) random.NextDouble(); Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresFailureMechanism.cs =================================================================== diff -u -r49621ecdce5a2a8f7c8bb689e8cfd6759dfb8fc6 -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresFailureMechanism.cs (.../ClosingStructuresFailureMechanism.cs) (revision 49621ecdce5a2a8f7c8bb689e8cfd6759dfb8fc6) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresFailureMechanism.cs (.../ClosingStructuresFailureMechanism.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -35,9 +35,9 @@ /// Model containing input and output needed to perform different levels of the /// Closing Structures failure mechanism. /// - public class ClosingStructuresFailureMechanism : FailureMechanismBase, ICalculatableFailureMechanism, IHasSectionResults + public class ClosingStructuresFailureMechanism : FailureMechanismBase, ICalculatableFailureMechanism, IHasSectionResults> { - private readonly List sectionResults; + private readonly List> sectionResults; /// /// Initializes a new instance of the class. @@ -51,7 +51,7 @@ }; GeneralInput = new GeneralClosingStructuresInput(); ClosingStructures = new StructureCollection(); - sectionResults = new List(); + sectionResults = new List>(); ForeshoreProfiles = new ForeshoreProfileCollection(); } @@ -80,7 +80,7 @@ public CalculationGroup CalculationsGroup { get; } - public IEnumerable SectionResults + public IEnumerable> SectionResults { get { @@ -92,7 +92,7 @@ { base.AddSection(section); - sectionResults.Add(new ClosingStructuresFailureMechanismSectionResult(section)); + sectionResults.Add(new StructuresFailureMechanismSectionResult(section)); } public override void ClearAllSections() Fisheye: Tag 560ea9f96409cc65f4666adf212a1c135c5e626f refers to a dead (removed) revision in file `Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresFailureMechanismSectionResult.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/Ringtoets.ClosingStructures.Data.csproj =================================================================== diff -u -r68f07e546651a701847a5c59a36cd60dac35aaef -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/Ringtoets.ClosingStructures.Data.csproj (.../Ringtoets.ClosingStructures.Data.csproj) (revision 68f07e546651a701847a5c59a36cd60dac35aaef) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/Ringtoets.ClosingStructures.Data.csproj (.../Ringtoets.ClosingStructures.Data.csproj) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -14,7 +14,6 @@ - Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresFailureMechanismResultView.cs =================================================================== diff -u -r8f95c791e2bd2d3a57e1e6013135640f6cd35dc6 -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresFailureMechanismResultView.cs (.../ClosingStructuresFailureMechanismResultView.cs) (revision 8f95c791e2bd2d3a57e1e6013135640f6cd35dc6) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresFailureMechanismResultView.cs (.../ClosingStructuresFailureMechanismResultView.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -35,9 +35,9 @@ namespace Ringtoets.ClosingStructures.Forms.Views { /// - /// The view for a collection of . + /// The view for a collection of for closing structures. /// - public class ClosingStructuresFailureMechanismResultView : FailureMechanismResultView + public class ClosingStructuresFailureMechanismResultView : FailureMechanismResultView> { private const int assessmentLayerTwoAIndex = 2; private readonly IAssessmentSection assessmentSection; @@ -93,7 +93,7 @@ } } - protected override object CreateFailureMechanismSectionResultRow(ClosingStructuresFailureMechanismSectionResult sectionResult) + protected override object CreateFailureMechanismSectionResultRow(StructuresFailureMechanismSectionResult sectionResult) { if (FailureMechanism == null) { Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresFailureMechanismSectionResultRow.cs =================================================================== diff -u -r82f0f782ec48b12abf3f34af08ad101837241429 -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresFailureMechanismSectionResultRow.cs (.../ClosingStructuresFailureMechanismSectionResultRow.cs) (revision 82f0f782ec48b12abf3f34af08ad101837241429) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresFailureMechanismSectionResultRow.cs (.../ClosingStructuresFailureMechanismSectionResultRow.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -30,22 +30,22 @@ namespace Ringtoets.ClosingStructures.Forms.Views { /// - /// Class for displaying as a row in a grid view. + /// Class for displaying for closing structures as a row in a grid view. /// - public class ClosingStructuresFailureMechanismSectionResultRow : FailureMechanismSectionResultRow + public class ClosingStructuresFailureMechanismSectionResultRow : FailureMechanismSectionResultRow> { private readonly ClosingStructuresFailureMechanism failureMechanism; private readonly IAssessmentSection assessmentSection; /// /// Creates a new instance of . /// - /// The to wrap + /// The to wrap /// so that it can be displayed as a row. /// The failure mechanism the result belongs to. /// The assessment section the result belongs to. /// Thrown when any parameter is null. - public ClosingStructuresFailureMechanismSectionResultRow(ClosingStructuresFailureMechanismSectionResult sectionResult, + public ClosingStructuresFailureMechanismSectionResultRow(StructuresFailureMechanismSectionResult sectionResult, ClosingStructuresFailureMechanism failureMechanism, IAssessmentSection assessmentSection) : base(sectionResult) @@ -96,7 +96,7 @@ /// /// Gets the of the wrapped - /// . + /// . /// /// null if the wrapped section result does not have a calculation /// set. Otherwise the calculation of the wrapped section result is returned. Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresScenarioRow.cs =================================================================== diff -u -rf88343c0590cb04c7135ce141872940e59325927 -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresScenarioRow.cs (.../ClosingStructuresScenarioRow.cs) (revision f88343c0590cb04c7135ce141872940e59325927) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresScenarioRow.cs (.../ClosingStructuresScenarioRow.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -27,19 +27,19 @@ namespace Ringtoets.ClosingStructures.Forms.Views { /// - /// Container of a , + /// Container of a for closing structures, /// which takes care of the representation of properties in a grid. /// public class ClosingStructuresScenarioRow : IScenarioRow> { - private readonly ClosingStructuresFailureMechanismSectionResult sectionResult; + private readonly StructuresFailureMechanismSectionResult sectionResult; /// /// Initializes a new instance of the class. /// /// The section result. /// Thrown when is null. - public ClosingStructuresScenarioRow(ClosingStructuresFailureMechanismSectionResult sectionResult) + public ClosingStructuresScenarioRow(StructuresFailureMechanismSectionResult sectionResult) { if (sectionResult == null) { Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Plugin/ClosingStructuresPlugin.cs =================================================================== diff -u -r251b363332dd6d019b53cbc4571fa477c6ded4a0 -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision 251b363332dd6d019b53cbc4571fa477c6ded4a0) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -104,8 +104,8 @@ }; yield return new ViewInfo< - ProbabilityFailureMechanismSectionResultContext, - IEnumerable, + ProbabilityFailureMechanismSectionResultContext>, + IEnumerable>, ClosingStructuresFailureMechanismResultView> { GetViewName = (view, results) => RingtoetsCommonFormsResources.FailureMechanism_AssessmentResult_DisplayName, @@ -144,7 +144,7 @@ CalculationContextContextMenuStrip, CalculationContextOnNodeRemoved); - yield return new TreeNodeInfo> + yield return new TreeNodeInfo>> { Text = context => RingtoetsCommonFormsResources.FailureMechanism_AssessmentResult_DisplayName, Image = context => RingtoetsCommonFormsResources.FailureMechanismSectionResultIcon, @@ -390,7 +390,7 @@ return new object[] { new ClosingStructuresScenariosContext(failureMechanism.CalculationsGroup, failureMechanism), - new ProbabilityFailureMechanismSectionResultContext( + new ProbabilityFailureMechanismSectionResultContext>( failureMechanism.SectionResults, failureMechanism, assessmentSection), failureMechanism.OutputComments }; Fisheye: Tag 560ea9f96409cc65f4666adf212a1c135c5e626f refers to a dead (removed) revision in file `Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresFailureMechanismSectionResultTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresFailureMechanismTest.cs =================================================================== diff -u -r43b4218e6e71896eb4f3985555258caeb4c7f6f7 -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresFailureMechanismTest.cs (.../ClosingStructuresFailureMechanismTest.cs) (revision 43b4218e6e71896eb4f3985555258caeb4c7f6f7) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresFailureMechanismTest.cs (.../ClosingStructuresFailureMechanismTest.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -42,7 +42,7 @@ // Assert Assert.IsInstanceOf(failureMechanism); Assert.IsInstanceOf(failureMechanism); - Assert.IsInstanceOf>(failureMechanism); + Assert.IsInstanceOf>>(failureMechanism); Assert.AreEqual("Kunstwerken - Betrouwbaarheid sluiting kunstwerk", failureMechanism.Name); Assert.AreEqual("BSKW", failureMechanism.Code); @@ -71,7 +71,7 @@ // Assert Assert.AreEqual(1, failureMechanism.SectionResults.Count()); - Assert.IsInstanceOf(failureMechanism.SectionResults.ElementAt(0)); + Assert.IsInstanceOf>(failureMechanism.SectionResults.ElementAt(0)); } [Test] Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresfailureMechanismSection2aAssessmentResultExtensionsTest.cs =================================================================== diff -u -r68f07e546651a701847a5c59a36cd60dac35aaef -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresfailureMechanismSection2aAssessmentResultExtensionsTest.cs (.../ClosingStructuresfailureMechanismSection2aAssessmentResultExtensionsTest.cs) (revision 68f07e546651a701847a5c59a36cd60dac35aaef) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresfailureMechanismSection2aAssessmentResultExtensionsTest.cs (.../ClosingStructuresfailureMechanismSection2aAssessmentResultExtensionsTest.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -25,6 +25,7 @@ using Ringtoets.ClosingStructures.Data.TestUtil; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Data.TestUtil; namespace Ringtoets.ClosingStructures.Data.Test @@ -60,7 +61,7 @@ mocks.ReplayAll(); FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); - var failureMechanismSectionResult = new ClosingStructuresFailureMechanismSectionResult(section); + var failureMechanismSectionResult = new StructuresFailureMechanismSectionResult(section); // Call TestDelegate call = () => failureMechanismSectionResult.GetAssessmentLayerTwoA(null, assessmentSection); @@ -76,7 +77,7 @@ { // Setup FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); - var failureMechanismSectionResult = new ClosingStructuresFailureMechanismSectionResult(section); + var failureMechanismSectionResult = new StructuresFailureMechanismSectionResult(section); // Call TestDelegate call = () => failureMechanismSectionResult.GetAssessmentLayerTwoA(new ClosingStructuresFailureMechanism(), null); @@ -95,7 +96,7 @@ mocks.ReplayAll(); FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); - var failureMechanismSectionResult = new ClosingStructuresFailureMechanismSectionResult(section); + var failureMechanismSectionResult = new StructuresFailureMechanismSectionResult(section); // Call double assessmentLayerTwoA = failureMechanismSectionResult.GetAssessmentLayerTwoA(new ClosingStructuresFailureMechanism(), assessmentSection); @@ -113,7 +114,7 @@ mocks.ReplayAll(); FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); - var failureMechanismSectionResult = new ClosingStructuresFailureMechanismSectionResult(section) + var failureMechanismSectionResult = new StructuresFailureMechanismSectionResult(section) { Calculation = new TestClosingStructuresCalculation() }; @@ -135,7 +136,7 @@ IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, mocks); FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); - var failureMechanismSectionResult = new ClosingStructuresFailureMechanismSectionResult(section) + var failureMechanismSectionResult = new StructuresFailureMechanismSectionResult(section) { Calculation = new TestClosingStructuresCalculation { Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/Ringtoets.ClosingStructures.Data.Test.csproj =================================================================== diff -u -r68f07e546651a701847a5c59a36cd60dac35aaef -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/Ringtoets.ClosingStructures.Data.Test.csproj (.../Ringtoets.ClosingStructures.Data.Test.csproj) (revision 68f07e546651a701847a5c59a36cd60dac35aaef) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/Ringtoets.ClosingStructures.Data.Test.csproj (.../Ringtoets.ClosingStructures.Data.Test.csproj) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -21,7 +21,6 @@ - Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismResultViewTest.cs =================================================================== diff -u -r82f0f782ec48b12abf3f34af08ad101837241429 -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismResultViewTest.cs (.../ClosingStructuresFailureMechanismResultViewTest.cs) (revision 82f0f782ec48b12abf3f34af08ad101837241429) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismResultViewTest.cs (.../ClosingStructuresFailureMechanismResultViewTest.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -75,7 +75,7 @@ using (var view = new ClosingStructuresFailureMechanismResultView(assessmentSection)) { // Assert - Assert.IsInstanceOf>(view); + Assert.IsInstanceOf>>(view); Assert.IsNull(view.Data); } mocks.VerifyAll(); @@ -99,8 +99,8 @@ using (ClosingStructuresFailureMechanismResultView view = CreateConfiguredFailureMechanismResultsView()) { FailureMechanismSection section = CreateSimpleFailureMechanismSection(); - var sectionResult = new ClosingStructuresFailureMechanismSectionResult(section); - var testData = new List + var sectionResult = new StructuresFailureMechanismSectionResult(section); + var testData = new List> { sectionResult }; @@ -258,17 +258,17 @@ }); var random = new Random(21); - var result1 = new ClosingStructuresFailureMechanismSectionResult(section1) + var result1 = new StructuresFailureMechanismSectionResult(section1) { AssessmentLayerOne = AssessmentLayerOneState.Sufficient, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; - var result2 = new ClosingStructuresFailureMechanismSectionResult(section2) + var result2 = new StructuresFailureMechanismSectionResult(section2) { AssessmentLayerOne = AssessmentLayerOneState.NotAssessed, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; - var result3 = new ClosingStructuresFailureMechanismSectionResult(section3) + var result3 = new StructuresFailureMechanismSectionResult(section3) { AssessmentLayerOne = AssessmentLayerOneState.NoVerdict, AssessmentLayerThree = (RoundedDouble) random.NextDouble() @@ -337,7 +337,7 @@ new Point2D(0, 0) }); var random = new Random(21); - var result = new ClosingStructuresFailureMechanismSectionResult(section) + var result = new StructuresFailureMechanismSectionResult(section) { AssessmentLayerOne = assessmentLayerOneState, AssessmentLayerThree = (RoundedDouble) random.NextDouble() @@ -400,7 +400,7 @@ using (ClosingStructuresFailureMechanismResultView view = CreateConfiguredFailureMechanismResultsView()) { FailureMechanismSection section = CreateSimpleFailureMechanismSection(); - var sectionResult = new ClosingStructuresFailureMechanismSectionResult(section) + var sectionResult = new StructuresFailureMechanismSectionResult(section) { AssessmentLayerOne = assessmentLayerOneState }; @@ -434,7 +434,7 @@ { var calculation = new StructuresCalculation(); FailureMechanismSection section = CreateSimpleFailureMechanismSection(); - var sectionResult = new ClosingStructuresFailureMechanismSectionResult(section) + var sectionResult = new StructuresFailureMechanismSectionResult(section) { Calculation = calculation, AssessmentLayerOne = assessmentLayerOneState @@ -472,7 +472,7 @@ Output = new TestStructuresOutput(double.NaN) }; FailureMechanismSection section = CreateSimpleFailureMechanismSection(); - var sectionResult = new ClosingStructuresFailureMechanismSectionResult(section) + var sectionResult = new StructuresFailureMechanismSectionResult(section) { Calculation = calculation, AssessmentLayerOne = assessmentLayerOneState @@ -510,7 +510,7 @@ Output = new TestStructuresOutput(0.56789) }; FailureMechanismSection section = CreateSimpleFailureMechanismSection(); - var sectionResult = new ClosingStructuresFailureMechanismSectionResult(section) + var sectionResult = new StructuresFailureMechanismSectionResult(section) { Calculation = calculation, AssessmentLayerOne = assessmentLayerOneState @@ -538,7 +538,7 @@ [Test] [TestCaseSource(nameof(AssessmentLayerOneStateIsSufficientVariousSections))] public void GivenSectionResultAndAssessmentLayerOneStateSufficient_ThenLayerTwoANoError( - ClosingStructuresFailureMechanismSectionResult sectionResult, string expectedValue) + StructuresFailureMechanismSectionResult sectionResult, string expectedValue) { using (ClosingStructuresFailureMechanismResultView view = CreateConfiguredFailureMechanismResultsView()) { @@ -580,7 +580,7 @@ Output = new TestStructuresOutput(double.NaN) }; FailureMechanismSection section = CreateSimpleFailureMechanismSection(); - var sectionResult = new ClosingStructuresFailureMechanismSectionResult(section) + var sectionResult = new StructuresFailureMechanismSectionResult(section) { Calculation = successfulCalculation, AssessmentLayerOne = assessmentLayerOneState @@ -670,9 +670,9 @@ // Assert Assert.IsEmpty(dataGridView.Rows[0].ErrorText); - var dataObject = view.Data as List; + var dataObject = view.Data as List>; Assert.IsNotNull(dataObject); - ClosingStructuresFailureMechanismSectionResult row = dataObject.First(); + StructuresFailureMechanismSectionResult row = dataObject.First(); Assert.AreEqual(newValue, row.AssessmentLayerThree); } } @@ -681,24 +681,24 @@ { FailureMechanismSection section = CreateSimpleFailureMechanismSection(); - yield return new TestCaseData(new ClosingStructuresFailureMechanismSectionResult(section) + yield return new TestCaseData(new StructuresFailureMechanismSectionResult(section) { AssessmentLayerOne = AssessmentLayerOneState.Sufficient }, "-").SetName("SectionWithoutCalculation"); - yield return new TestCaseData(new ClosingStructuresFailureMechanismSectionResult(section) + yield return new TestCaseData(new StructuresFailureMechanismSectionResult(section) { AssessmentLayerOne = AssessmentLayerOneState.Sufficient, Calculation = new StructuresCalculation() }, "-").SetName("SectionWithCalculationNoOutput"); - yield return new TestCaseData(new ClosingStructuresFailureMechanismSectionResult(section) + yield return new TestCaseData(new StructuresFailureMechanismSectionResult(section) { AssessmentLayerOne = AssessmentLayerOneState.Sufficient, Calculation = new StructuresCalculation { Output = new TestStructuresOutput(double.NaN) } }, "-").SetName("SectionWithInvalidCalculationOutput"); - yield return new TestCaseData(new ClosingStructuresFailureMechanismSectionResult(section) + yield return new TestCaseData(new StructuresFailureMechanismSectionResult(section) { AssessmentLayerOne = AssessmentLayerOneState.Sufficient, Calculation = new StructuresCalculation Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismSectionResultRowTest.cs =================================================================== diff -u -r82f0f782ec48b12abf3f34af08ad101837241429 -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismSectionResultRowTest.cs (.../ClosingStructuresFailureMechanismSectionResultRowTest.cs) (revision 82f0f782ec48b12abf3f34af08ad101837241429) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismSectionResultRowTest.cs (.../ClosingStructuresFailureMechanismSectionResultRowTest.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -47,16 +47,16 @@ mocks.ReplayAll(); FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); - var result = new ClosingStructuresFailureMechanismSectionResult(section); + var result = new StructuresFailureMechanismSectionResult(section); var failureMechanism = new ClosingStructuresFailureMechanism(); // Call var row = new ClosingStructuresFailureMechanismSectionResultRow(result, failureMechanism, assessmentSection); // Assert - Assert.IsInstanceOf>(row); - Assert.AreEqual(result.AssessmentLayerTwoA, row.AssessmentLayerTwoA); + Assert.IsInstanceOf>>(row); + Assert.AreEqual(result.GetAssessmentLayerTwoA(failureMechanism, assessmentSection), row.AssessmentLayerTwoA); Assert.AreEqual(row.AssessmentLayerThree, result.AssessmentLayerThree); TestHelper.AssertTypeConverter( @@ -75,7 +75,7 @@ mocks.ReplayAll(); FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); - var result = new ClosingStructuresFailureMechanismSectionResult(section); + var result = new StructuresFailureMechanismSectionResult(section); // Call TestDelegate call = () => new ClosingStructuresFailureMechanismSectionResultRow(result, null, assessmentSection); @@ -91,7 +91,7 @@ { // Setup FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); - var result = new ClosingStructuresFailureMechanismSectionResult(section); + var result = new StructuresFailureMechanismSectionResult(section); // Call TestDelegate call = () => new ClosingStructuresFailureMechanismSectionResultRow(result, new ClosingStructuresFailureMechanism(), null); @@ -112,7 +112,7 @@ var failureMechanism = new ClosingStructuresFailureMechanism(); FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); - var sectionResult = new ClosingStructuresFailureMechanismSectionResult(section); + var sectionResult = new StructuresFailureMechanismSectionResult(section); // Precondition Assert.IsNull(sectionResult.Calculation); @@ -145,7 +145,7 @@ } FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); - var sectionResult = new ClosingStructuresFailureMechanismSectionResult(section) + var sectionResult = new StructuresFailureMechanismSectionResult(section) { Calculation = calculation }; @@ -176,7 +176,7 @@ }; FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); - var sectionResult = new ClosingStructuresFailureMechanismSectionResult(section) + var sectionResult = new StructuresFailureMechanismSectionResult(section) { Calculation = calculation }; @@ -202,7 +202,7 @@ var failureMechanism = new ClosingStructuresFailureMechanism(); FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); - var result = new ClosingStructuresFailureMechanismSectionResult(section); + var result = new StructuresFailureMechanismSectionResult(section); // Precondition Assert.IsNull(result.Calculation); @@ -229,7 +229,7 @@ var expectedCalculation = new StructuresCalculation(); FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); - var result = new ClosingStructuresFailureMechanismSectionResult(section) + var result = new StructuresFailureMechanismSectionResult(section) { Calculation = expectedCalculation }; @@ -257,7 +257,7 @@ var random = new Random(21); double assessmentLayerThree = random.NextDouble(); - var sectionResult = new ClosingStructuresFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()); + var sectionResult = new StructuresFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()); var row = new ClosingStructuresFailureMechanismSectionResultRow(sectionResult, failureMechanism, assessmentSection); // Call Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresScenarioRowTest.cs =================================================================== diff -u -rf88343c0590cb04c7135ce141872940e59325927 -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresScenarioRowTest.cs (.../ClosingStructuresScenarioRowTest.cs) (revision f88343c0590cb04c7135ce141872940e59325927) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresScenarioRowTest.cs (.../ClosingStructuresScenarioRowTest.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -44,7 +44,7 @@ new Point2D(1.1, 2.2), new Point2D(3.3, 4.4) }); - var sectionResult = new ClosingStructuresFailureMechanismSectionResult(section); + var sectionResult = new StructuresFailureMechanismSectionResult(section); // Call var row = new ClosingStructuresScenarioRow(sectionResult); @@ -75,7 +75,7 @@ new Point2D(1.1, 2.2), new Point2D(3.3, 4.4) }); - var sectionResult = new ClosingStructuresFailureMechanismSectionResult(section); + var sectionResult = new StructuresFailureMechanismSectionResult(section); var row = new ClosingStructuresScenarioRow(sectionResult); @@ -103,7 +103,7 @@ new Point2D(1.1, 2.2), new Point2D(3.3, 4.4) }); - var sectionResult = new ClosingStructuresFailureMechanismSectionResult(section); + var sectionResult = new StructuresFailureMechanismSectionResult(section); sectionResult.Attach(observer); var row = new ClosingStructuresScenarioRow(sectionResult); Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/ClosingStructuresPluginTest.cs =================================================================== diff -u -r3e93a96d301c2a3171f68bddd01a0436ebcf74c4 -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/ClosingStructuresPluginTest.cs (.../ClosingStructuresPluginTest.cs) (revision 3e93a96d301c2a3171f68bddd01a0436ebcf74c4) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/ClosingStructuresPluginTest.cs (.../ClosingStructuresPluginTest.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -30,6 +30,7 @@ using Ringtoets.ClosingStructures.Forms.PropertyClasses; using Ringtoets.ClosingStructures.Forms.Views; using Ringtoets.Common.Data.Calculation; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.Common.Forms.PropertyClasses; @@ -100,7 +101,7 @@ // Assert Assert.AreEqual(8, treeNodeInfos.Length); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(ClosingStructuresFailureMechanismContext))); - Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(ProbabilityFailureMechanismSectionResultContext))); + Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(ProbabilityFailureMechanismSectionResultContext>))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(ClosingStructuresContext))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(ClosingStructure))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(ClosingStructuresCalculationGroupContext))); @@ -129,8 +130,8 @@ PluginTestHelper.AssertViewInfoDefined( viewInfos, - typeof(ProbabilityFailureMechanismSectionResultContext), - typeof(IEnumerable), + typeof(ProbabilityFailureMechanismSectionResultContext>), + typeof(IEnumerable>), typeof(ClosingStructuresFailureMechanismResultView)); PluginTestHelper.AssertViewInfoDefined( Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/FileImporters/ClosingStructureReplaceDataStrategyTest.cs =================================================================== diff -u -r9540d67453c6a1caf5833d64ab651660dce11595 -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/FileImporters/ClosingStructureReplaceDataStrategyTest.cs (.../ClosingStructureReplaceDataStrategyTest.cs) (revision 9540d67453c6a1caf5833d64ab651660dce11595) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/FileImporters/ClosingStructureReplaceDataStrategyTest.cs (.../ClosingStructureReplaceDataStrategyTest.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -322,7 +322,7 @@ { location })); - ClosingStructuresFailureMechanismSectionResult sectionResult = failureMechanism.SectionResults.First(); + StructuresFailureMechanismSectionResult sectionResult = failureMechanism.SectionResults.First(); sectionResult.Calculation = calculation; failureMechanism.ClosingStructures.AddRange(new[] Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/FileImporters/ClosingStructureUpdateDataStrategyTest.cs =================================================================== diff -u -rfcad48d7beb394e1ac15cfe4289a7381e05aa883 -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/FileImporters/ClosingStructureUpdateDataStrategyTest.cs (.../ClosingStructureUpdateDataStrategyTest.cs) (revision fcad48d7beb394e1ac15cfe4289a7381e05aa883) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/FileImporters/ClosingStructureUpdateDataStrategyTest.cs (.../ClosingStructureUpdateDataStrategyTest.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -662,7 +662,7 @@ StructuresHelper.UpdateCalculationToSectionResultAssignments(failureMechanism.SectionResults, failureMechanism.Calculations.Cast>()); - ClosingStructuresFailureMechanismSectionResult[] sectionResults = failureMechanism.SectionResults.ToArray(); + StructuresFailureMechanismSectionResult[] sectionResults = failureMechanism.SectionResults.ToArray(); var strategy = new ClosingStructureUpdateDataStrategy(failureMechanism); @@ -734,7 +734,7 @@ StructuresHelper.UpdateCalculationToSectionResultAssignments(failureMechanism.SectionResults, failureMechanism.Calculations.Cast>()); - ClosingStructuresFailureMechanismSectionResult[] sectionResults = failureMechanism.SectionResults.ToArray(); + StructuresFailureMechanismSectionResult[] sectionResults = failureMechanism.SectionResults.ToArray(); var strategy = new ClosingStructureUpdateDataStrategy(failureMechanism); Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -racb45246d666b955705c808a110fa23f4e650a5c -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationContextTreeNodeInfoTest.cs) (revision acb45246d666b955705c808a110fa23f4e650a5c) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationContextTreeNodeInfoTest.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -1155,7 +1155,7 @@ new Point2D(0, 0) })); - ClosingStructuresFailureMechanismSectionResult result = failureMechanism.SectionResults.First(); + StructuresFailureMechanismSectionResult result = failureMechanism.SectionResults.First(); result.Calculation = elementToBeRemoved; // Call Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -r39e18750ccb61ad1f367279f9dac39a232d4f843 -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 39e18750ccb61ad1f367279f9dac39a232d4f843) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -84,24 +84,6 @@ private MockRepository mocks; private ClosingStructuresPlugin plugin; - public override void Setup() - { - mocks = new MockRepository(); - gui = mocks.Stub(); - plugin = new ClosingStructuresPlugin - { - Gui = gui - }; - - info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(ClosingStructuresCalculationGroupContext)); - } - - public override void TearDown() - { - plugin.Dispose(); - mocks.VerifyAll(); - } - [Test] public void Initialized_Always_ExpectedPropertiesSet() { @@ -238,6 +220,7 @@ // Call info.ContextMenuStrip(groupContext, null, treeViewControl); } + // Assert // Assert expectancies called in TearDown() } @@ -400,6 +383,7 @@ // Call info.ContextMenuStrip(groupContext, parentGroupContext, treeViewControl); } + // Assert // Assert expectancies called in TearDown() } @@ -1623,7 +1607,7 @@ var calculation = new StructuresCalculation(); group.Children.Add(calculation); - ClosingStructuresFailureMechanismSectionResult result = failureMechanism.SectionResults.First(); + StructuresFailureMechanismSectionResult result = failureMechanism.SectionResults.First(); result.Calculation = calculation; // Call @@ -1670,6 +1654,24 @@ CollectionAssert.DoesNotContain(parentGroup.Children, group); } + public override void Setup() + { + mocks = new MockRepository(); + gui = mocks.Stub(); + plugin = new ClosingStructuresPlugin + { + Gui = gui + }; + + info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(ClosingStructuresCalculationGroupContext)); + } + + public override void TearDown() + { + plugin.Dispose(); + mocks.VerifyAll(); + } + private static void ChangeStructure(ClosingStructure structure) { structure.CopyProperties(new ClosingStructure( Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresFailureMechanismContextTreeNodeInfoTest.cs =================================================================== diff -u -r3e93a96d301c2a3171f68bddd01a0436ebcf74c4 -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../ClosingStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision 3e93a96d301c2a3171f68bddd01a0436ebcf74c4) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../ClosingStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -67,20 +67,6 @@ private ClosingStructuresPlugin plugin; private TreeNodeInfo info; - public override void Setup() - { - mocksRepository = new MockRepository(); - plugin = new ClosingStructuresPlugin(); - info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(ClosingStructuresFailureMechanismContext)); - } - - public override void TearDown() - { - plugin.Dispose(); - - mocksRepository.VerifyAll(); - } - [Test] public void Initialized_Always_ExpectedPropertiesSet() { @@ -160,7 +146,7 @@ Assert.AreSame(failureMechanism.CalculationsGroup, scenariosContext.WrappedData); Assert.AreSame(failureMechanism, scenariosContext.ParentFailureMechanism); - var failureMechanismResultsContext = (ProbabilityFailureMechanismSectionResultContext) outputsFolder.Contents.ElementAt(1); + var failureMechanismResultsContext = (ProbabilityFailureMechanismSectionResultContext>) outputsFolder.Contents.ElementAt(1); Assert.AreSame(failureMechanism, failureMechanismResultsContext.FailureMechanism); Assert.AreSame(failureMechanism.SectionResults, failureMechanismResultsContext.WrappedData); Assert.AreSame(assessmentSection, failureMechanismResultsContext.AssessmentSection); @@ -742,5 +728,19 @@ } } } + + public override void Setup() + { + mocksRepository = new MockRepository(); + plugin = new ClosingStructuresPlugin(); + info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(ClosingStructuresFailureMechanismContext)); + } + + public override void TearDown() + { + plugin.Dispose(); + + mocksRepository.VerifyAll(); + } } } \ No newline at end of file Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ProbabilityFailureMechanismSectionResultContextTreeNodeInfoTest.cs =================================================================== diff -u -r3e93a96d301c2a3171f68bddd01a0436ebcf74c4 -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ProbabilityFailureMechanismSectionResultContextTreeNodeInfoTest.cs (.../ProbabilityFailureMechanismSectionResultContextTreeNodeInfoTest.cs) (revision 3e93a96d301c2a3171f68bddd01a0436ebcf74c4) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ProbabilityFailureMechanismSectionResultContextTreeNodeInfoTest.cs (.../ProbabilityFailureMechanismSectionResultContextTreeNodeInfoTest.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -29,6 +29,7 @@ using Rhino.Mocks; using Ringtoets.ClosingStructures.Data; using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.Common.Forms.Properties; @@ -81,8 +82,8 @@ TreeNodeInfo info = GetInfo(plugin); var mechanism = new ClosingStructuresFailureMechanism(); - var context = new ProbabilityFailureMechanismSectionResultContext(mechanism.SectionResults, mechanism, - assessmentSection); + var context = new ProbabilityFailureMechanismSectionResultContext>(mechanism.SectionResults, mechanism, + assessmentSection); // Call string text = info.Text(context); @@ -123,8 +124,8 @@ using (var treeViewControl = new TreeViewControl()) { var failureMechanism = new ClosingStructuresFailureMechanism(); - var sectionResult = new ClosingStructuresFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()); - var sectionResultContext = new ProbabilityFailureMechanismSectionResultContext(new[] + var sectionResult = new StructuresFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()); + var sectionResultContext = new ProbabilityFailureMechanismSectionResultContext>(new[] { sectionResult }, failureMechanism, assessmentSection); @@ -150,7 +151,7 @@ private static TreeNodeInfo GetInfo(ClosingStructuresPlugin plugin) { - return plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(ProbabilityFailureMechanismSectionResultContext)); + return plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(ProbabilityFailureMechanismSectionResultContext>)); } } } \ No newline at end of file Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/ViewInfos/ClosingStructuresFailureMechanismResultViewInfoTest.cs =================================================================== diff -u -r251b363332dd6d019b53cbc4571fa477c6ded4a0 -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/ViewInfos/ClosingStructuresFailureMechanismResultViewInfoTest.cs (.../ClosingStructuresFailureMechanismResultViewInfoTest.cs) (revision 251b363332dd6d019b53cbc4571fa477c6ded4a0) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/ViewInfos/ClosingStructuresFailureMechanismResultViewInfoTest.cs (.../ClosingStructuresFailureMechanismResultViewInfoTest.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -32,6 +32,7 @@ using Ringtoets.ClosingStructures.Forms.Views; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Forms.PresentationObjects; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; @@ -63,8 +64,8 @@ public void Initialized_Always_ExpectedPropertiesSet() { // Assert - Assert.AreEqual(typeof(ProbabilityFailureMechanismSectionResultContext), info.DataType); - Assert.AreEqual(typeof(IEnumerable), info.ViewDataType); + Assert.AreEqual(typeof(ProbabilityFailureMechanismSectionResultContext>), info.DataType); + Assert.AreEqual(typeof(IEnumerable>), info.ViewDataType); } [Test] @@ -75,8 +76,8 @@ mocks.ReplayAll(); var failureMechanism = new ClosingStructuresFailureMechanism(); - var context = new ProbabilityFailureMechanismSectionResultContext(failureMechanism.SectionResults, failureMechanism, - assessmentSection); + var context = new ProbabilityFailureMechanismSectionResultContext>(failureMechanism.SectionResults, failureMechanism, + assessmentSection); // Call object viewData = info.GetViewData(context); @@ -206,7 +207,7 @@ using (var view = new ClosingStructuresFailureMechanismResultView(assessmentSection) { Data = failureMechanism.SectionResults - }) + }) { // Call bool closeForData = info.CloseForData(view, failureMechanism); @@ -299,10 +300,10 @@ var view = mocks.StrictMock(); view.Expect(v => v.FailureMechanism = failureMechanism); mocks.ReplayAll(); - - var context = new ProbabilityFailureMechanismSectionResultContext(failureMechanism.SectionResults, failureMechanism, - assessmentSection); + var context = new ProbabilityFailureMechanismSectionResultContext>(failureMechanism.SectionResults, failureMechanism, + assessmentSection); + // Call info.AfterCreate(view, context); @@ -317,9 +318,9 @@ var failureMechanism = new ClosingStructuresFailureMechanism(); IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, mocks); - var context = new ProbabilityFailureMechanismSectionResultContext(failureMechanism.SectionResults, - failureMechanism, - assessmentSection); + var context = new ProbabilityFailureMechanismSectionResultContext>(failureMechanism.SectionResults, + failureMechanism, + assessmentSection); // Call IView view = info.CreateInstance(context); Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructureDataSynchronizationServiceTest.cs =================================================================== diff -u -r49621ecdce5a2a8f7c8bb689e8cfd6759dfb8fc6 -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructureDataSynchronizationServiceTest.cs (.../ClosingStructureDataSynchronizationServiceTest.cs) (revision 49621ecdce5a2a8f7c8bb689e8cfd6759dfb8fc6) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructureDataSynchronizationServiceTest.cs (.../ClosingStructureDataSynchronizationServiceTest.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -374,10 +374,10 @@ failureMechanism.AddSection(section1); failureMechanism.AddSection(section2); - ClosingStructuresFailureMechanismSectionResult result1 = failureMechanism.SectionResults - .First(sr => ReferenceEquals(sr.Section, section1)); - ClosingStructuresFailureMechanismSectionResult result2 = failureMechanism.SectionResults - .First(sr => ReferenceEquals(sr.Section, section2)); + StructuresFailureMechanismSectionResult result1 = failureMechanism.SectionResults + .First(sr => ReferenceEquals(sr.Section, section1)); + StructuresFailureMechanismSectionResult result2 = failureMechanism.SectionResults + .First(sr => ReferenceEquals(sr.Section, section2)); result1.Calculation = calculation1; result2.Calculation = calculation2; Index: Ringtoets/Common/src/Ringtoets.Common.Data/Structures/StructuresFailureMechanismSectionResult.cs =================================================================== diff -u -r5f5fc9c9799816757fca63a82f5d86aadb262d2f -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Ringtoets/Common/src/Ringtoets.Common.Data/Structures/StructuresFailureMechanismSectionResult.cs (.../StructuresFailureMechanismSectionResult.cs) (revision 5f5fc9c9799816757fca63a82f5d86aadb262d2f) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Structures/StructuresFailureMechanismSectionResult.cs (.../StructuresFailureMechanismSectionResult.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -40,7 +40,7 @@ /// /// The to get the result from. /// Thrown when is null. - protected StructuresFailureMechanismSectionResult(FailureMechanismSection section) : base(section) + public StructuresFailureMechanismSectionResult(FailureMechanismSection section) : base(section) { assessmentLayerThree = double.NaN; } Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs =================================================================== diff -u -r1c57fe6190786619723794c66843f24090a0edb0 -r560ea9f96409cc65f4666adf212a1c135c5e626f --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision 1c57fe6190786619723794c66843f24090a0edb0) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision 560ea9f96409cc65f4666adf212a1c135c5e626f) @@ -1316,7 +1316,7 @@ var strengthStabilityLengthwiseConstruction = nodeData as IHasSectionResults; var waterPressureAsphaltCover = nodeData as IHasSectionResults; var waveImpactAsphaltCover = nodeData as IHasSectionResults; - var closingStructures = nodeData as IHasSectionResults; + var closingStructures = nodeData as IHasSectionResults>; var macroStabilityInwards = nodeData as IHasSectionResults; var macrostabilityOutwards = nodeData as IHasSectionResults; var stabilityPointConstruction = nodeData as IHasSectionResults; @@ -1385,7 +1385,7 @@ if (closingStructures != null) { failureMechanismSectionResultContexts[0] = - new FailureMechanismSectionResultContext(closingStructures.SectionResults, nodeData); + new FailureMechanismSectionResultContext>(closingStructures.SectionResults, nodeData); } if (macroStabilityInwards != null)