Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/CalculationGroupCreateExtensions.cs =================================================================== diff -u -rdeb869b51292750cd872df973bb838464b732643 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/CalculationGroupCreateExtensions.cs (.../CalculationGroupCreateExtensions.cs) (revision deb869b51292750cd872df973bb838464b732643) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/CalculationGroupCreateExtensions.cs (.../CalculationGroupCreateExtensions.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -29,6 +29,7 @@ using Application.Ringtoets.Storage.DbContext; using Core.Common.Utils.Extensions; using Ringtoets.Common.Data.Calculation; +using Ringtoets.Common.Data.Structures; using Ringtoets.GrassCoverErosionInwards.Data; using Ringtoets.GrassCoverErosionOutwards.Data; using Ringtoets.HeightStructures.Data; @@ -95,7 +96,7 @@ { entity.GrassCoverErosionOutwardsWaveConditionsCalculationEntities.Add(childGrassCoverErosionOutwardsCalculation.Create(registry, i)); } - var childHeightStructuresCalculation = calculationBase as HeightStructuresCalculation; + var childHeightStructuresCalculation = calculationBase as StructuresCalculation; if (childHeightStructuresCalculation != null) { entity.HeightStructuresCalculationEntities.Add(childHeightStructuresCalculation.Create(registry, i)); Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/HeightStructures/HeightStructuresCalculationCreateExtensions.cs =================================================================== diff -u -r6913ef75b5ec527ab771006f3430cfafef8b680c -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/HeightStructures/HeightStructuresCalculationCreateExtensions.cs (.../HeightStructuresCalculationCreateExtensions.cs) (revision 6913ef75b5ec527ab771006f3430cfafef8b680c) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/HeightStructures/HeightStructuresCalculationCreateExtensions.cs (.../HeightStructuresCalculationCreateExtensions.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -22,27 +22,28 @@ using System; using Application.Ringtoets.Storage.DbContext; using Core.Common.Utils.Extensions; +using Ringtoets.Common.Data.Structures; using Ringtoets.HeightStructures.Data; namespace Application.Ringtoets.Storage.Create.HeightStructures { /// - /// Extension methods for related + /// Extension methods for related /// to creating a . /// internal static class HeightStructuresCalculationCreateExtensions { /// /// Creates a based - /// on the information of the . + /// on the information of the . /// /// The calculation to create a database entity for. /// The object keeping track of create operations. /// The index at where resides /// in its parent container. /// A new . /// Thrown when is null. - internal static HeightStructuresCalculationEntity Create(this HeightStructuresCalculation calculation, PersistenceRegistry registry, int order) + internal static HeightStructuresCalculationEntity Create(this StructuresCalculation calculation, PersistenceRegistry registry, int order) { if (registry == null) { Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/CalculationGroupCreateExtensionsTest.cs =================================================================== diff -u -rdeb869b51292750cd872df973bb838464b732643 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/CalculationGroupCreateExtensionsTest.cs (.../CalculationGroupCreateExtensionsTest.cs) (revision deb869b51292750cd872df973bb838464b732643) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/CalculationGroupCreateExtensionsTest.cs (.../CalculationGroupCreateExtensionsTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -25,6 +25,7 @@ using Application.Ringtoets.Storage.DbContext; using NUnit.Framework; using Ringtoets.Common.Data.Calculation; +using Ringtoets.Common.Data.Structures; using Ringtoets.GrassCoverErosionInwards.Data; using Ringtoets.GrassCoverErosionOutwards.Data; using Ringtoets.HeightStructures.Data; @@ -425,11 +426,11 @@ { Children = { - new HeightStructuresCalculation + new StructuresCalculation { Name = "A" }, - new HeightStructuresCalculation + new StructuresCalculation { Name = "B" } @@ -462,12 +463,12 @@ Children = { new CalculationGroup("A", true), - new HeightStructuresCalculation + new StructuresCalculation { Name = "B" }, new CalculationGroup("C", false), - new HeightStructuresCalculation + new StructuresCalculation { Name = "D" } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/HeightStructures/HeightStructuresCalculationCreateExtensionsTest.cs =================================================================== diff -u -r6913ef75b5ec527ab771006f3430cfafef8b680c -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/HeightStructures/HeightStructuresCalculationCreateExtensionsTest.cs (.../HeightStructuresCalculationCreateExtensionsTest.cs) (revision 6913ef75b5ec527ab771006f3430cfafef8b680c) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/HeightStructures/HeightStructuresCalculationCreateExtensionsTest.cs (.../HeightStructuresCalculationCreateExtensionsTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -27,6 +27,7 @@ using Core.Common.Base.Data; using NUnit.Framework; using Ringtoets.Common.Data.DikeProfiles; +using Ringtoets.Common.Data.Structures; using Ringtoets.HeightStructures.Data; using Ringtoets.HeightStructures.Data.TestUtil; using Ringtoets.HydraRing.Data; @@ -40,7 +41,7 @@ public void Create_PersistenceRegistryNull_ThrowArgumentNullException() { // Setup - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); // Call TestDelegate call = () => calculation.Create(null, 0); @@ -58,7 +59,7 @@ // Setup var random = new Random(randomSeed); - var calculation = new HeightStructuresCalculation + var calculation = new StructuresCalculation { Name = name, Comments = comments, @@ -162,7 +163,7 @@ public void Create_NaNParameters_EntityWithNullFields() { // Setup - var calculation = new HeightStructuresCalculation + var calculation = new StructuresCalculation { InputParameters = { @@ -245,7 +246,7 @@ // Setup const string name = "A"; const string comment = "B"; - var calculation = new HeightStructuresCalculation + var calculation = new StructuresCalculation { Name = name, Comments = comment @@ -271,7 +272,7 @@ { // Setup var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, "A", 1, 1); - var calculation = new HeightStructuresCalculation + var calculation = new StructuresCalculation { InputParameters = { @@ -295,7 +296,7 @@ { // Setup var heightStructure = new TestHeightStructure(); - var calculation = new HeightStructuresCalculation + var calculation = new StructuresCalculation { InputParameters = { @@ -319,7 +320,7 @@ { // Setup var foreshoreProfile = new TestForeshoreProfile(); - var calculation = new HeightStructuresCalculation + var calculation = new StructuresCalculation { InputParameters = { Index: Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs =================================================================== diff -u -radd325fb1e135f779adf7c89446886ff15a9b17c -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs (.../AddNewDemoAssessmentSectionCommand.cs) (revision add325fb1e135f779adf7c89446886ff15a9b17c) +++ Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs (.../AddNewDemoAssessmentSectionCommand.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -32,6 +32,7 @@ using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Probabilistics; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.IO.FileImporters; using Ringtoets.Common.IO.ReferenceLines; using Ringtoets.GrassCoverErosionInwards.Data; @@ -238,7 +239,7 @@ HeightStructuresFailureMechanism failureMechanism = demoAssessmentSection.HeightStructures; failureMechanism.HeightStructures.Add(CreateDemoHeightStructure()); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); failureMechanism.CalculationsGroup.Children.Add(calculation); calculation.InputParameters.HydraulicBoundaryLocation = demoAssessmentSection.HydraulicBoundaryDatabase.Locations.First(hl => hl.Id == 1300001); calculation.InputParameters.NotifyObservers(); @@ -294,7 +295,7 @@ ClosingStructuresFailureMechanism failureMechanism = demoAssessmentSection.ClosingStructures; failureMechanism.ClosingStructures.Add(CreateDemoClosingStructure()); - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); failureMechanism.CalculationsGroup.Children.Add(calculation); calculation.InputParameters.HydraulicBoundaryLocation = demoAssessmentSection.HydraulicBoundaryDatabase.Locations.First(hl => hl.Id == 1300001); calculation.InputParameters.NotifyObservers(); @@ -410,7 +411,7 @@ StabilityPointStructuresFailureMechanism failureMechanism = demoAssessmentSection.StabilityPointStructures; failureMechanism.StabilityPointStructures.Add(CreateDemoStabilityPointStructure()); - var calculation = new StabilityPointStructuresCalculation(); + var calculation = new StructuresCalculation(); failureMechanism.CalculationsGroup.Children.Add(calculation); calculation.InputParameters.HydraulicBoundaryLocation = demoAssessmentSection.HydraulicBoundaryDatabase.Locations.First(hl => hl.Id == 1300001); calculation.InputParameters.NotifyObservers(); Index: Demo/Ringtoets/test/Demo.Ringtoets.Test/Commands/AddNewDemoAssessmentSectionCommandTest.cs =================================================================== diff -u -r2698972311ca90c3af1171c554c4dec237e34111 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Demo/Ringtoets/test/Demo.Ringtoets.Test/Commands/AddNewDemoAssessmentSectionCommandTest.cs (.../AddNewDemoAssessmentSectionCommandTest.cs) (revision 2698972311ca90c3af1171c554c4dec237e34111) +++ Demo/Ringtoets/test/Demo.Ringtoets.Test/Commands/AddNewDemoAssessmentSectionCommandTest.cs (.../AddNewDemoAssessmentSectionCommandTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -34,6 +34,7 @@ using Ringtoets.ClosingStructures.Data; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.Probabilistics; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Data.TestUtil; using Ringtoets.GrassCoverErosionInwards.Data; using Ringtoets.GrassCoverErosionOutwards.Data; @@ -280,9 +281,9 @@ AssertExpectedHeightStructureValues(demoAssessmentSection.HeightStructures.HeightStructures[0]); Assert.AreEqual(1, demoAssessmentSection.HeightStructures.CalculationsGroup.Children.Count); - HeightStructuresCalculation calculation = demoAssessmentSection.HeightStructures + StructuresCalculation calculation = demoAssessmentSection.HeightStructures .CalculationsGroup.GetCalculations() - .OfType() + .OfType>() .First(); AssertExpectedHeightStructuresInput(calculation.InputParameters); } @@ -323,9 +324,9 @@ AssertExpectedClosingStructureValues(demoAssessmentSection.ClosingStructures.ClosingStructures[0]); Assert.AreEqual(1, demoAssessmentSection.ClosingStructures.CalculationsGroup.Children.Count); - ClosingStructuresCalculation calculation = demoAssessmentSection.ClosingStructures + StructuresCalculation calculation = demoAssessmentSection.ClosingStructures .CalculationsGroup.GetCalculations() - .OfType() + .OfType>() .First(); AssertExpectedClosingStructuresInput(calculation.InputParameters); } @@ -468,9 +469,9 @@ { Assert.AreEqual(1, demoAssessmentSection.StabilityPointStructures.CalculationsGroup.Children.Count); AssertExpectedStabilityPointStructureValues(demoAssessmentSection.StabilityPointStructures.StabilityPointStructures[0]); - StabilityPointStructuresCalculation calculation = demoAssessmentSection.StabilityPointStructures + StructuresCalculation calculation = demoAssessmentSection.StabilityPointStructures .CalculationsGroup.GetCalculations() - .OfType() + .OfType>() .First(); AssertExpectedStabilityPointStructuresInput(calculation.InputParameters); } Fisheye: Tag ab20c4eb4ca81bd3845d50210d2bdb301177af6a refers to a dead (removed) revision in file `Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresCalculation.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresFailureMechanism.cs =================================================================== diff -u -rb6a9219d1e628e4430ccf880e8ea390cec04fc04 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresFailureMechanism.cs (.../ClosingStructuresFailureMechanism.cs) (revision b6a9219d1e628e4430ccf880e8ea390cec04fc04) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresFailureMechanism.cs (.../ClosingStructuresFailureMechanism.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -26,6 +26,7 @@ using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using RingtoetsCommonDataResources = Ringtoets.Common.Data.Properties.Resources; namespace Ringtoets.ClosingStructures.Data @@ -55,7 +56,7 @@ { get { - return CalculationsGroup.GetCalculations().OfType(); + return CalculationsGroup.GetCalculations().OfType>(); } } Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresFailureMechanismSectionResult.cs =================================================================== diff -u -rfe1332c1e9b14365a62f6ce03c9494393223179e -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresFailureMechanismSectionResult.cs (.../ClosingStructuresFailureMechanismSectionResult.cs) (revision fe1332c1e9b14365a62f6ce03c9494393223179e) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresFailureMechanismSectionResult.cs (.../ClosingStructuresFailureMechanismSectionResult.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -21,6 +21,7 @@ using System; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; namespace Ringtoets.ClosingStructures.Data { @@ -54,9 +55,9 @@ } /// - /// Gets or sets the , which is chosen + /// Gets or sets the , which is chosen /// to be representative for the whole section. /// - public ClosingStructuresCalculation Calculation { get; set; } + public StructuresCalculation Calculation { get; set; } } } \ No newline at end of file Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/Ringtoets.ClosingStructures.Data.csproj =================================================================== diff -u -r2b2da37541708b8ad95286e731010dd9d27d5070 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/Ringtoets.ClosingStructures.Data.csproj (.../Ringtoets.ClosingStructures.Data.csproj) (revision 2b2da37541708b8ad95286e731010dd9d27d5070) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/Ringtoets.ClosingStructures.Data.csproj (.../Ringtoets.ClosingStructures.Data.csproj) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -40,7 +40,6 @@ Properties\GlobalAssembly.cs - Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresCalculationContext.cs =================================================================== diff -u -rca23b1b155ca87c0aa4665fd919727570f31c781 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresCalculationContext.cs (.../ClosingStructuresCalculationContext.cs) (revision ca23b1b155ca87c0aa4665fd919727570f31c781) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresCalculationContext.cs (.../ClosingStructuresCalculationContext.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -22,25 +22,26 @@ using System; using Ringtoets.ClosingStructures.Data; using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PresentationObjects; namespace Ringtoets.ClosingStructures.Forms.PresentationObjects { /// - /// Presentation object for all data required to configure an instance of + /// Presentation object for all data required to configure an instance of /// in order to prepare it for performing a calculation. /// - public class ClosingStructuresCalculationContext : FailureMechanismItemContextBase, - ICalculationContext + public class ClosingStructuresCalculationContext : FailureMechanismItemContextBase, ClosingStructuresFailureMechanism>, + ICalculationContext, ClosingStructuresFailureMechanism> { /// /// Creates a new instance of . /// - /// The instance wrapped by this context object. + /// The instance wrapped by this context object. /// The failure mechanism which the calculation belongs to. /// The assessment section which the calculation belongs to. /// When any input argument is null. - public ClosingStructuresCalculationContext(ClosingStructuresCalculation wrappedData, + public ClosingStructuresCalculationContext(StructuresCalculation wrappedData, ClosingStructuresFailureMechanism failureMechanism, IAssessmentSection assessmentSection) : base(wrappedData, failureMechanism, assessmentSection) {} Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresInputContext.cs =================================================================== diff -u -ra9591008569d7b58499fa258b0530ba273850d21 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresInputContext.cs (.../ClosingStructuresInputContext.cs) (revision a9591008569d7b58499fa258b0530ba273850d21) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresInputContext.cs (.../ClosingStructuresInputContext.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -22,6 +22,7 @@ using System; using Ringtoets.ClosingStructures.Data; using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PresentationObjects; namespace Ringtoets.ClosingStructures.Forms.PresentationObjects @@ -30,7 +31,7 @@ /// Presentation object for all data required to configure an instance of /// in order to be able to configure closing structures calculations. /// - public class ClosingStructuresInputContext : InputContextBase + public class ClosingStructuresInputContext : InputContextBase, ClosingStructuresFailureMechanism> { /// /// Creates a new instance of . @@ -41,7 +42,7 @@ /// The assessment section which the context belongs to. /// Thrown when any input argument is null. public ClosingStructuresInputContext(ClosingStructuresInput wrappedData, - ClosingStructuresCalculation calculation, + StructuresCalculation calculation, ClosingStructuresFailureMechanism failureMechanism, IAssessmentSection assessmentSection) : base(wrappedData, calculation, failureMechanism, assessmentSection) { } Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructuresInputContextProperties.cs =================================================================== diff -u -r3b1b80d82960d3bfa4906e06e37e73e4729eb3ad -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructuresInputContextProperties.cs (.../ClosingStructuresInputContextProperties.cs) (revision 3b1b80d82960d3bfa4906e06e37e73e4729eb3ad) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructuresInputContextProperties.cs (.../ClosingStructuresInputContextProperties.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -32,6 +32,7 @@ using Ringtoets.ClosingStructures.Utils; using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.Common.Forms.Helpers; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PropertyClasses; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; @@ -40,7 +41,7 @@ /// /// ViewModel of for properties panel. /// - public class ClosingStructuresInputContextProperties : StructuresInputBaseProperties + public class ClosingStructuresInputContextProperties : StructuresInputBaseProperties, ClosingStructuresFailureMechanism> { private const int hydraulicBoundaryLocationPropertyIndex = 1; private const int stormDurationPropertyIndex = 2; @@ -159,8 +160,8 @@ { Data = data.WrappedData.DrainCoefficient }; - } } + } [PropertyOrder(factorStormDurationOpenStructurePropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_ModelSettings")] @@ -171,9 +172,9 @@ get { return data.WrappedData.FactorStormDurationOpenStructure; - } + } set - { + { data.WrappedData.FactorStormDurationOpenStructure = value; data.WrappedData.NotifyObservers(); } Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresScenarioRow.cs =================================================================== diff -u -r8c76ed44224c5f2e96bd030b00c9bb8565e71330 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresScenarioRow.cs (.../ClosingStructuresScenarioRow.cs) (revision 8c76ed44224c5f2e96bd030b00c9bb8565e71330) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresScenarioRow.cs (.../ClosingStructuresScenarioRow.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -21,6 +21,7 @@ using System; using Ringtoets.ClosingStructures.Data; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms; namespace Ringtoets.ClosingStructures.Forms.Views @@ -29,7 +30,7 @@ /// Container of a , /// which takes care of the representation of properties in a grid. /// - public class ClosingStructuresScenarioRow : IScenarioRow + public class ClosingStructuresScenarioRow : IScenarioRow> { private readonly ClosingStructuresFailureMechanismSectionResult sectionResult; @@ -55,7 +56,7 @@ } } - public ClosingStructuresCalculation Calculation + public StructuresCalculation Calculation { get { Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresScenariosView.cs =================================================================== diff -u -r93baa4ee308eff5a157e37bd2b4fe148a45806af -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresScenariosView.cs (.../ClosingStructuresScenariosView.cs) (revision 93baa4ee308eff5a157e37bd2b4fe148a45806af) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresScenariosView.cs (.../ClosingStructuresScenariosView.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -28,6 +28,7 @@ using Ringtoets.ClosingStructures.Data; using Ringtoets.ClosingStructures.Utils; using Ringtoets.Common.Data.Calculation; +using Ringtoets.Common.Data.Structures; namespace Ringtoets.ClosingStructures.Forms.Views { @@ -130,7 +131,7 @@ Dictionary> calculationsPerSegment = ClosingStructuresHelper.CollectCalculationsPerSection(failureMechanism.Sections, - calculations.OfType()); + calculations.OfType>()); var scenarioRows = failureMechanism.SectionResults.Select(sr => new ClosingStructuresScenarioRow(sr)).ToList(); Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Plugin/ClosingStructuresPlugin.cs =================================================================== diff -u -ra9591008569d7b58499fa258b0530ba273850d21 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision a9591008569d7b58499fa258b0530ba273850d21) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -39,6 +39,7 @@ using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.Probability; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.Helpers; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.Common.Forms.TreeNodeInfos; @@ -196,7 +197,7 @@ } private void CalculateAll(ClosingStructuresFailureMechanism failureMechanism, - IEnumerable calculations, + IEnumerable> calculations, IAssessmentSection assessmentSection) { ActivityProgressDialogRunner.Run(Gui.MainWindow, @@ -308,7 +309,7 @@ return builder.AddToggleRelevancyOfFailureMechanismItem(closingStructuresFailureMechanismContext, RemoveAllViewsForItem) .AddSeparator() .AddValidateAllCalculationsInFailureMechanismItem(closingStructuresFailureMechanismContext, - c => ValidateAll(c.WrappedData.Calculations.OfType(), c.Parent), + c => ValidateAll(c.WrappedData.Calculations.OfType>(), c.Parent), ValidateAllDataAvailableAndGetErrorMessageForCalculationsInFailureMechanism) .AddPerformAllCalculationsInFailureMechanismItem(closingStructuresFailureMechanismContext, CalculateAll, @@ -338,7 +339,7 @@ .Build(); } - private static void ValidateAll(IEnumerable closingStructuresCalculations, IAssessmentSection assessmentSection) + private static void ValidateAll(IEnumerable> closingStructuresCalculations, IAssessmentSection assessmentSection) { foreach (var calculation in closingStructuresCalculations) { @@ -353,7 +354,7 @@ private void CalculateAll(ClosingStructuresFailureMechanismContext context) { - CalculateAll(context.WrappedData, context.WrappedData.Calculations.OfType(), context.Parent); + CalculateAll(context.WrappedData, context.WrappedData.Calculations.OfType>(), context.Parent); } #endregion @@ -366,7 +367,7 @@ foreach (ICalculationBase calculationItem in context.WrappedData.Children) { - var calculation = calculationItem as ClosingStructuresCalculation; + var calculation = calculationItem as StructuresCalculation; var group = calculationItem as CalculationGroup; if (calculation != null) @@ -409,7 +410,7 @@ builder.AddSeparator() .AddValidateAllCalculationsInGroupItem( context, - c => ValidateAll(c.WrappedData.GetCalculations().OfType(), c.AssessmentSection), + c => ValidateAll(c.WrappedData.GetCalculations().OfType>(), c.AssessmentSection), ValidateAllDataAvailableAndGetErrorMessage) .AddPerformAllCalculationsInGroupItem(group, context, CalculateAll, ValidateAllDataAvailableAndGetErrorMessage) .AddClearAllCalculationOutputInGroupItem(group) @@ -436,12 +437,12 @@ private void CalculateAll(CalculationGroup group, ClosingStructuresCalculationGroupContext context) { - CalculateAll(context.FailureMechanism, group.GetCalculations().OfType(), context.AssessmentSection); + CalculateAll(context.FailureMechanism, group.GetCalculations().OfType>(), context.AssessmentSection); } private static void AddCalculation(ClosingStructuresCalculationGroupContext context) { - var calculation = new ClosingStructuresCalculation + var calculation = new StructuresCalculation { Name = NamingHelper.GetUniqueName(context.WrappedData.Children, RingtoetsCommonDataResources.Calculation_DefaultName, c => c.Name) }; @@ -454,11 +455,11 @@ var parentGroupContext = (ClosingStructuresCalculationGroupContext) parentNodeData; parentGroupContext.WrappedData.Children.Remove(context.WrappedData); - foreach (var calculation in context.WrappedData.GetCalculations().Cast()) + foreach (var calculation in context.WrappedData.GetCalculations().Cast>()) { ClosingStructuresHelper.Delete(context.FailureMechanism.SectionResults, calculation, - context.FailureMechanism.Calculations.Cast()); + context.FailureMechanism.Calculations.Cast>()); } parentGroupContext.WrappedData.Children.Remove(context.WrappedData); @@ -496,7 +497,7 @@ { var builder = new RingtoetsContextMenuBuilder(Gui.Get(context, treeViewControl)); - ClosingStructuresCalculation calculation = context.WrappedData; + StructuresCalculation calculation = context.WrappedData; return builder.AddValidateCalculationItem( context, @@ -515,7 +516,7 @@ .Build(); } - private void Calculate(ClosingStructuresCalculation calculation, ClosingStructuresCalculationContext context) + private void Calculate(StructuresCalculation calculation, ClosingStructuresCalculationContext context) { ActivityProgressDialogRunner.Run(Gui.MainWindow, new ClosingStructuresCalculationActivity(calculation, @@ -537,7 +538,7 @@ calculationGroupContext.WrappedData.Children.Remove(context.WrappedData); ClosingStructuresHelper.Delete(context.FailureMechanism.SectionResults, context.WrappedData, - context.FailureMechanism.Calculations.Cast()); + context.FailureMechanism.Calculations.Cast>()); calculationGroupContext.NotifyObservers(); } } Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresCalculationActivity.cs =================================================================== diff -u -rf80835301ae973b5439593e81fb640b7ab044340 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresCalculationActivity.cs (.../ClosingStructuresCalculationActivity.cs) (revision f80835301ae973b5439593e81fb640b7ab044340) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresCalculationActivity.cs (.../ClosingStructuresCalculationActivity.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -25,6 +25,7 @@ using Ringtoets.ClosingStructures.Utils; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.HydraRing.Calculation.Activities; namespace Ringtoets.ClosingStructures.Service @@ -34,7 +35,7 @@ /// public class ClosingStructuresCalculationActivity : HydraRingActivityBase { - private readonly ClosingStructuresCalculation calculation; + private readonly StructuresCalculation calculation; private readonly ClosingStructuresCalculationService calculationService; private readonly ClosingStructuresFailureMechanism failureMechanism; private readonly IAssessmentSection assessmentSection; @@ -48,7 +49,7 @@ /// The failure mechanism the calculation belongs to. /// The assessment section the calculation belongs to. /// Thrown when any input argument is null. - public ClosingStructuresCalculationActivity(ClosingStructuresCalculation calculation, string hlcdDirectory, + public ClosingStructuresCalculationActivity(StructuresCalculation calculation, string hlcdDirectory, ClosingStructuresFailureMechanism failureMechanism, IAssessmentSection assessmentSection) { if (calculation == null) Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresCalculationService.cs =================================================================== diff -u -r83024e3b1086e1dba93b83df874bd4781f67aa63 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresCalculationService.cs (.../ClosingStructuresCalculationService.cs) (revision 83024e3b1086e1dba93b83df874bd4781f67aa63) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresCalculationService.cs (.../ClosingStructuresCalculationService.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -27,6 +27,7 @@ using Ringtoets.ClosingStructures.Service.Properties; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Service; using Ringtoets.HydraRing.Calculation.Calculator; using Ringtoets.HydraRing.Calculation.Calculator.Factory; @@ -49,18 +50,18 @@ private bool canceled; /// - /// Performs a height structures calculation based on the supplied and sets - /// if the calculation was successful. Error and status information is + /// Performs a height structures calculation based on the supplied and sets + /// if the calculation was successful. Error and status information is /// logged during the execution of the operation. /// - /// The that holds all the information required to perform the calculation. + /// The that holds all the information required to perform the calculation. /// The that holds information about the norm used in the calculation. /// The to create input with. /// The to create the input with for the calculation. /// The amount of contribution for this failure mechanism in the assessment section. /// The directory of the HLCD file that should be used for performing the calculation. /// - public void Calculate(ClosingStructuresCalculation calculation, + public void Calculate(StructuresCalculation calculation, IAssessmentSection assessmentSection, FailureMechanismSection failureMechanismSection, GeneralClosingStructuresInput generalInput, @@ -127,7 +128,7 @@ canceled = true; } - public bool Validate(ClosingStructuresCalculation calculation, IAssessmentSection assessmentSection) + public bool Validate(StructuresCalculation calculation, IAssessmentSection assessmentSection) { CalculationServiceHelper.LogValidationBeginTime(calculation.Name); var messages = ValidateInput(calculation.InputParameters, assessmentSection); @@ -137,7 +138,7 @@ return !messages.Any(); } - private static StructuresClosureVerticalWallCalculationInput CreateClosureVerticalWallCalculationInput(ClosingStructuresCalculation calculation, + private static StructuresClosureVerticalWallCalculationInput CreateClosureVerticalWallCalculationInput(StructuresCalculation calculation, FailureMechanismSection failureMechanismSection, GeneralClosingStructuresInput generalInput) { @@ -168,7 +169,7 @@ calculation.InputParameters.DeviationWaveDirection); } - private static StructuresClosureLowSillCalculationInput CreateLowSillCalculationInput(ClosingStructuresCalculation calculation, + private static StructuresClosureLowSillCalculationInput CreateLowSillCalculationInput(StructuresCalculation calculation, FailureMechanismSection failureMechanismSection, GeneralClosingStructuresInput generalInput) { @@ -198,7 +199,7 @@ calculation.InputParameters.WidthFlowApertures.Mean, calculation.InputParameters.WidthFlowApertures.CoefficientOfVariation); } - private static StructuresClosureFloodedCulvertCalculationInput CreateFloodedCulvertCalculationInput(ClosingStructuresCalculation calculation, + private static StructuresClosureFloodedCulvertCalculationInput CreateFloodedCulvertCalculationInput(StructuresCalculation calculation, FailureMechanismSection failureMechanismSection, GeneralClosingStructuresInput generalInput) { Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresDataSynchronizationService.cs =================================================================== diff -u -r73597729ce18d3ee00d8036bca8341e9c12f2953 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresDataSynchronizationService.cs (.../ClosingStructuresDataSynchronizationService.cs) (revision 73597729ce18d3ee00d8036bca8341e9c12f2953) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresDataSynchronizationService.cs (.../ClosingStructuresDataSynchronizationService.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -25,6 +25,7 @@ using System.Linq; using Core.Common.Utils.Extensions; using Ringtoets.ClosingStructures.Data; +using Ringtoets.Common.Data.Structures; using Ringtoets.HydraRing.Data; namespace Ringtoets.ClosingStructures.Service @@ -43,15 +44,15 @@ /// clearing the output. /// Thrown when /// is null. - public static IEnumerable ClearAllCalculationOutput(ClosingStructuresFailureMechanism failureMechanism) + public static IEnumerable> ClearAllCalculationOutput(ClosingStructuresFailureMechanism failureMechanism) { if (failureMechanism == null) { throw new ArgumentNullException("failureMechanism"); } var affectedItems = failureMechanism.Calculations - .Cast() + .Cast>() .Where(c => c.HasOutput) .ToArray(); @@ -61,13 +62,13 @@ } /// - /// Clears the output of the given . + /// Clears the output of the given . /// - /// The to clear + /// The to clear /// the output for. /// Thrown when /// is null. - public static void ClearCalculationOutput(ClosingStructuresCalculation calculation) + public static void ClearCalculationOutput(StructuresCalculation calculation) { if (calculation == null) { @@ -79,23 +80,23 @@ /// /// Clears the for all the calculations in - /// the . + /// the . /// /// The /// which contains the calculations. /// An of calculations which are affected by /// removing . /// Thrown when /// is null. - public static IEnumerable ClearHydraulicBoundaryLocations(ClosingStructuresFailureMechanism failureMechanism) + public static IEnumerable> ClearHydraulicBoundaryLocations(ClosingStructuresFailureMechanism failureMechanism) { if (failureMechanism == null) { throw new ArgumentNullException("failureMechanism"); } var affectedItems = failureMechanism.Calculations - .Cast() + .Cast>() .Where(c => c.InputParameters.HydraulicBoundaryLocation != null) .ToArray(); @@ -106,24 +107,24 @@ /// /// Clears the and output for all the calculations - /// in the . + /// in the . /// - /// The + /// The /// which contains the calculations. /// An of calculations which are affected by /// removing data. /// Thrown when /// is null. - public static IEnumerable ClearAllCalculationOutputAndHydraulicBoundaryLocations(ClosingStructuresFailureMechanism failureMechanism) + public static IEnumerable> ClearAllCalculationOutputAndHydraulicBoundaryLocations(ClosingStructuresFailureMechanism failureMechanism) { if (failureMechanism == null) { throw new ArgumentNullException("failureMechanism"); } - Collection affectedItems = new Collection(); + Collection> affectedItems = new Collection>(); - foreach (var calculation in failureMechanism.Calculations.Cast()) + foreach (var calculation in failureMechanism.Calculations.Cast>()) { var calculationChanged = false; @@ -148,7 +149,7 @@ return affectedItems; } - private static void ClearHydraulicBoundaryLocation(ClosingStructuresCalculation calculation) + private static void ClearHydraulicBoundaryLocation(StructuresCalculation calculation) { calculation.InputParameters.HydraulicBoundaryLocation = null; } Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Utils/ClosingStructuresHelper.cs =================================================================== diff -u -r73597729ce18d3ee00d8036bca8341e9c12f2953 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Utils/ClosingStructuresHelper.cs (.../ClosingStructuresHelper.cs) (revision 73597729ce18d3ee00d8036bca8341e9c12f2953) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Utils/ClosingStructuresHelper.cs (.../ClosingStructuresHelper.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -26,17 +26,18 @@ using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Utils; using Ringtoets.ClosingStructures.Data; +using Ringtoets.Common.Data.Structures; namespace Ringtoets.ClosingStructures.Utils { /// /// Class holds helper methods to match objects - /// with objects. + /// with objects. /// public static class ClosingStructuresHelper { /// - /// Determine which objects are available for a + /// Determine which objects are available for a /// . /// /// The objects. @@ -49,23 +50,23 @@ /// Thrown when an element in is /// null. public static Dictionary> CollectCalculationsPerSection(IEnumerable sections, - IEnumerable calculations) + IEnumerable> calculations) { return AssignUnassignCalculations.CollectCalculationsPerSection(sections, AsCalculationsWithLocations(calculations)); } /// - /// Determine which geometrically contains the . + /// Determine which geometrically contains the . /// /// The objects /// whose are considered. - /// The . + /// The . /// The containing , or null if none found. /// Thrown when is null /// Thrown when an element in is null. /// public static FailureMechanismSection FailureMechanismSectionForCalculation(IEnumerable sections, - ClosingStructuresCalculation calculation) + StructuresCalculation calculation) { CalculationWithLocation calculationWithLocation = AsCalculationWithLocation(calculation); if (calculationWithLocation != null) @@ -80,13 +81,13 @@ /// assigned, or should have the assigned. /// /// The of to iterate while - /// possibly updating the assigned to it. - /// The which has a location that has been updated. + /// possibly updating the assigned to it. + /// The which has a location that has been updated. /// Thrown when is null /// Thrown when element in is /// null. public static void Update(IEnumerable sectionResults, - ClosingStructuresCalculation calculation) + StructuresCalculation calculation) { ValidateSectionResults(sectionResults); @@ -103,16 +104,16 @@ /// /// The of to iterate while /// removing the reference to the if present. - /// The which has a location that has been updated. - /// The of that were left after removing + /// The which has a location that has been updated. + /// The of that were left after removing /// . /// Thrown when any input parameter is null or when an element /// in is null. /// Thrown when element in is /// null. public static void Delete(IEnumerable sectionResults, - ClosingStructuresCalculation calculation, - IEnumerable calculations) + StructuresCalculation calculation, + IEnumerable> calculations) { ValidateSectionResults(sectionResults); @@ -126,11 +127,11 @@ /// Transforms the into and filter out the calculations /// for which a could not be made. /// - /// The collection to transform. + /// The collection to transform. /// A collection of . /// Thrown when is null or when /// an element in is null. - private static IEnumerable AsCalculationsWithLocations(IEnumerable calculations) + private static IEnumerable AsCalculationsWithLocations(IEnumerable> calculations) { if (calculations == null) { @@ -151,7 +152,7 @@ } } - private static CalculationWithLocation AsCalculationWithLocation(ClosingStructuresCalculation calculation) + private static CalculationWithLocation AsCalculationWithLocation(StructuresCalculation calculation) { if (calculation == null) { @@ -169,7 +170,7 @@ return new SectionResultWithCalculationAssignment( failureMechanismSectionResult, result => ((ClosingStructuresFailureMechanismSectionResult)result).Calculation, - (result, calculation) => ((ClosingStructuresFailureMechanismSectionResult)result).Calculation = (ClosingStructuresCalculation)calculation); + (result, calculation) => ((ClosingStructuresFailureMechanismSectionResult)result).Calculation = (StructuresCalculation)calculation); } } } \ No newline at end of file Fisheye: Tag ab20c4eb4ca81bd3845d50210d2bdb301177af6a refers to a dead (removed) revision in file `Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresCalculationTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresFailureMechanismSectionResultTest.cs =================================================================== diff -u -rfe1332c1e9b14365a62f6ce03c9494393223179e -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresFailureMechanismSectionResultTest.cs (.../ClosingStructuresFailureMechanismSectionResultTest.cs) (revision fe1332c1e9b14365a62f6ce03c9494393223179e) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresFailureMechanismSectionResultTest.cs (.../ClosingStructuresFailureMechanismSectionResultTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -23,6 +23,7 @@ using NUnit.Framework; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Probability; +using Ringtoets.Common.Data.Structures; namespace Ringtoets.ClosingStructures.Data.Test { @@ -53,7 +54,7 @@ var result = new ClosingStructuresFailureMechanismSectionResult(section); - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); // Call result.Calculation = calculation; @@ -88,7 +89,7 @@ var result = new ClosingStructuresFailureMechanismSectionResult(section) { - Calculation = new ClosingStructuresCalculation + Calculation = new StructuresCalculation { Output = new ProbabilityAssessmentOutput(1.0, 1.0, double.NaN, 1.0, 1.0) } @@ -110,7 +111,7 @@ double probability = 0.65; var result = new ClosingStructuresFailureMechanismSectionResult(section) { - Calculation = new ClosingStructuresCalculation + Calculation = new StructuresCalculation { Output = new ProbabilityAssessmentOutput(1.0, 1.0, probability, 1.0, 1.0) } Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresFailureMechanismTest.cs =================================================================== diff -u -rb6a9219d1e628e4430ccf880e8ea390cec04fc04 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresFailureMechanismTest.cs (.../ClosingStructuresFailureMechanismTest.cs) (revision b6a9219d1e628e4430ccf880e8ea390cec04fc04) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresFailureMechanismTest.cs (.../ClosingStructuresFailureMechanismTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -25,6 +25,7 @@ using Rhino.Mocks; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; namespace Ringtoets.ClosingStructures.Data.Test { @@ -112,9 +113,9 @@ Children = { new CalculationGroup(), - new ClosingStructuresCalculation(), + new StructuresCalculation(), mocks.StrictMock(), - new ClosingStructuresCalculation() + new StructuresCalculation() } } }; @@ -126,7 +127,7 @@ // Assert Assert.AreEqual(2, calculations.Count); - Assert.IsTrue(calculations.All(c => c is ClosingStructuresCalculation)); + Assert.IsTrue(calculations.All(c => c is StructuresCalculation)); mocks.VerifyAll(); } } Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/Ringtoets.ClosingStructures.Data.Test.csproj =================================================================== diff -u -r2b2da37541708b8ad95286e731010dd9d27d5070 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/Ringtoets.ClosingStructures.Data.Test.csproj (.../Ringtoets.ClosingStructures.Data.Test.csproj) (revision 2b2da37541708b8ad95286e731010dd9d27d5070) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/Ringtoets.ClosingStructures.Data.Test.csproj (.../Ringtoets.ClosingStructures.Data.Test.csproj) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -52,7 +52,6 @@ Properties\GlobalAssembly.cs - Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil.Test/TestClosingStructureCalculationTest.cs =================================================================== diff -u -r83024e3b1086e1dba93b83df874bd4781f67aa63 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil.Test/TestClosingStructureCalculationTest.cs (.../TestClosingStructureCalculationTest.cs) (revision 83024e3b1086e1dba93b83df874bd4781f67aa63) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil.Test/TestClosingStructureCalculationTest.cs (.../TestClosingStructureCalculationTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -20,6 +20,7 @@ // All rights reserved. using NUnit.Framework; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Data.TestUtil; namespace Ringtoets.ClosingStructures.Data.TestUtil.Test @@ -37,7 +38,7 @@ var calculation = new TestClosingStructuresCalculation(); // Assert - Assert.IsInstanceOf(calculation); + Assert.IsInstanceOf>(calculation); Assert.AreEqual("Nieuwe berekening", calculation.Name); Assert.IsNotNull(calculation.InputParameters); Assert.IsNull(calculation.Comments); Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil/TestClosingStructuresCalculation.cs =================================================================== diff -u -r83024e3b1086e1dba93b83df874bd4781f67aa63 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil/TestClosingStructuresCalculation.cs (.../TestClosingStructuresCalculation.cs) (revision 83024e3b1086e1dba93b83df874bd4781f67aa63) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil/TestClosingStructuresCalculation.cs (.../TestClosingStructuresCalculation.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -20,11 +20,12 @@ // All rights reserved. using Core.Common.Base.Data; +using Ringtoets.Common.Data.Structures; using Ringtoets.HydraRing.Data; namespace Ringtoets.ClosingStructures.Data.TestUtil { - public class TestClosingStructuresCalculation : ClosingStructuresCalculation + public class TestClosingStructuresCalculation : StructuresCalculation { public TestClosingStructuresCalculation() { Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PresentationObjects/ClosingStructuresCalculationContextTest.cs =================================================================== diff -u -rca23b1b155ca87c0aa4665fd919727570f31c781 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PresentationObjects/ClosingStructuresCalculationContextTest.cs (.../ClosingStructuresCalculationContextTest.cs) (revision ca23b1b155ca87c0aa4665fd919727570f31c781) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PresentationObjects/ClosingStructuresCalculationContextTest.cs (.../ClosingStructuresCalculationContextTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -24,6 +24,7 @@ using Ringtoets.ClosingStructures.Data; using Ringtoets.ClosingStructures.Forms.PresentationObjects; using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PresentationObjects; namespace Ringtoets.ClosingStructures.Forms.Test.PresentationObjects @@ -39,15 +40,15 @@ var assessmentSectionMock = mocksRepository.Stub(); mocksRepository.ReplayAll(); - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); var failureMechanism = new ClosingStructuresFailureMechanism(); // Call var context = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); // Assert - Assert.IsInstanceOf>(context); - Assert.IsInstanceOf>(context); + Assert.IsInstanceOf, ClosingStructuresFailureMechanism>>(context); + Assert.IsInstanceOf, ClosingStructuresFailureMechanism>>(context); Assert.AreEqual(calculation, context.WrappedData); Assert.AreEqual(failureMechanism, context.FailureMechanism); Assert.AreEqual(assessmentSectionMock, context.AssessmentSection); Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PresentationObjects/ClosingStructuresInputContextTest.cs =================================================================== diff -u -ra9591008569d7b58499fa258b0530ba273850d21 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PresentationObjects/ClosingStructuresInputContextTest.cs (.../ClosingStructuresInputContextTest.cs) (revision a9591008569d7b58499fa258b0530ba273850d21) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PresentationObjects/ClosingStructuresInputContextTest.cs (.../ClosingStructuresInputContextTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -24,6 +24,7 @@ using Ringtoets.ClosingStructures.Data; using Ringtoets.ClosingStructures.Forms.PresentationObjects; using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PresentationObjects; namespace Ringtoets.ClosingStructures.Forms.Test.PresentationObjects @@ -39,14 +40,14 @@ var assessmentSectionMock = mocks.Stub(); mocks.ReplayAll(); - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); var failureMechanism = new ClosingStructuresFailureMechanism(); // Call var context = new ClosingStructuresInputContext(calculation.InputParameters, calculation, failureMechanism, assessmentSectionMock); // Assert - Assert.IsInstanceOf>(context); + Assert.IsInstanceOf, ClosingStructuresFailureMechanism>>(context); Assert.AreSame(calculation.InputParameters, context.WrappedData); Assert.AreSame(calculation, context.Calculation); Assert.AreSame(failureMechanism, context.FailureMechanism); Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructureFailureMechanismContextTreeNodeInfoTest.cs =================================================================== diff -u -r70ea116c3be1432b17de4b44e0c7b13902b8baf9 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructureFailureMechanismContextTreeNodeInfoTest.cs (.../ClosingStructureFailureMechanismContextTreeNodeInfoTest.cs) (revision 70ea116c3be1432b17de4b44e0c7b13902b8baf9) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructureFailureMechanismContextTreeNodeInfoTest.cs (.../ClosingStructureFailureMechanismContextTreeNodeInfoTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -37,6 +37,7 @@ using Ringtoets.Common.Data; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.HydraRing.Data; using CoreCommonGuiResources = Core.Common.Gui.Properties.Resources; @@ -407,7 +408,7 @@ // Setup var guiMock = mocksRepository.StrictMock(); var failureMechanism = new ClosingStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new ClosingStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionMock = mocksRepository.StrictMock(); var nodeData = new ClosingStructuresFailureMechanismContext(failureMechanism, assessmentSectionMock); @@ -451,7 +452,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new ClosingStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionMock = mocksRepository.Stub(); @@ -495,7 +496,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new ClosingStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionMock = mocksRepository.Stub(); assessmentSectionMock.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); @@ -542,7 +543,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new ClosingStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); string validFilePath = Path.Combine(testDataPath, "complete.sqlite"); Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructuresCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -r8245c9add5586e4e544ab41195fb0af2b2a459e9 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructuresCalculationContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationContextTreeNodeInfoTest.cs) (revision 8245c9add5586e4e544ab41195fb0af2b2a459e9) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructuresCalculationContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationContextTreeNodeInfoTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -44,6 +44,7 @@ using Ringtoets.Common.Data.Contribution; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Probability; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.HydraRing.Calculation.Calculator.Factory; using Ringtoets.HydraRing.Calculation.TestUtil.Calculator; @@ -133,7 +134,7 @@ mocks.ReplayAll(); var failureMechanism = new ClosingStructuresFailureMechanism(); - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); var calculationContext = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); // Call @@ -160,7 +161,7 @@ mocks.ReplayAll(); var failureMechanism = new ClosingStructuresFailureMechanism(); - var calculation = new ClosingStructuresCalculation + var calculation = new StructuresCalculation { Output = new TestClosingStructuresOutput() }; @@ -190,7 +191,7 @@ // Setup var failureMechanism = new ClosingStructuresFailureMechanism(); var assessmentSectionMock = mocks.Stub(); - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); var menuBuilderMock = mocks.StrictMock(); @@ -228,7 +229,7 @@ // Setup var failureMechanism = new ClosingStructuresFailureMechanism(); var assessmentSectionMock = mocks.Stub(); - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); @@ -273,7 +274,7 @@ // Setup var failureMechanism = new ClosingStructuresFailureMechanism(); var assessmentSectionMock = mocks.Stub(); - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); @@ -316,7 +317,7 @@ var assessmentSectionMock = mocks.Stub(); - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); using (var treeViewControl = new TreeViewControl()) @@ -359,7 +360,7 @@ var assessmentSectionMock = mocks.Stub(); assessmentSectionMock.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); using (var treeViewControl = new TreeViewControl()) @@ -412,7 +413,7 @@ var assessmentSectionMock = mocks.Stub(); assessmentSectionMock.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); using (var treeViewControl = new TreeViewControl()) @@ -446,7 +447,7 @@ // Setup var failureMechanism = new ClosingStructuresFailureMechanism(); var assessmentSectionStub = mocks.Stub(); - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSectionStub); @@ -483,7 +484,7 @@ var assessmentSectionStub = mocks.Stub(); - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSectionStub); using (var treeViewControl = new TreeViewControl()) @@ -519,7 +520,7 @@ var assessmentSectionStub = mocks.Stub(); - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSectionStub); using (var treeViewControl = new TreeViewControl()) @@ -566,7 +567,7 @@ var assessmentSectionStub = mocks.Stub(); - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSectionStub); using (var treeViewControl = new TreeViewControl()) @@ -745,7 +746,7 @@ // Setup var group = new CalculationGroup(); var failureMechanism = new ClosingStructuresFailureMechanism(); - var elementToBeRemoved = new ClosingStructuresCalculation(); + var elementToBeRemoved = new StructuresCalculation(); var observerMock = mocks.StrictMock(); var assessmentSectionMock = mocks.Stub(); var calculationContext = new ClosingStructuresCalculationContext(elementToBeRemoved, @@ -760,7 +761,7 @@ mocks.ReplayAll(); group.Children.Add(elementToBeRemoved); - group.Children.Add(new ClosingStructuresCalculation()); + group.Children.Add(new StructuresCalculation()); group.Attach(observerMock); // Precondition @@ -781,7 +782,7 @@ // Setup var group = new CalculationGroup(); var failureMechanism = new ClosingStructuresFailureMechanism(); - var elementToBeRemoved = new ClosingStructuresCalculation(); + var elementToBeRemoved = new StructuresCalculation(); var assessmentSectionStub = mocks.Stub(); var calculationContext = new ClosingStructuresCalculationContext(elementToBeRemoved, failureMechanism, Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -r8245c9add5586e4e544ab41195fb0af2b2a459e9 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 8245c9add5586e4e544ab41195fb0af2b2a459e9) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -41,6 +41,7 @@ using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.HydraRing.Data; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; @@ -146,7 +147,7 @@ var failureMechanism = new ClosingStructuresFailureMechanism(); var group = new CalculationGroup(); var childGroup = new CalculationGroup(); - var childCalculation = new ClosingStructuresCalculation(); + var childCalculation = new StructuresCalculation(); group.Children.Add(childGroup); group.Children.Add(calculationItemMock); @@ -377,7 +378,7 @@ { Children = { - new ClosingStructuresCalculation() + new StructuresCalculation() } }; @@ -421,7 +422,7 @@ { Children = { - new ClosingStructuresCalculation() + new StructuresCalculation() } }; @@ -430,7 +431,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new ClosingStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionMock = mocks.Stub(); assessmentSectionMock.HydraulicBoundaryDatabase = null; @@ -475,7 +476,7 @@ { Children = { - new ClosingStructuresCalculation() + new StructuresCalculation() } }; @@ -484,7 +485,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new ClosingStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionMock = mocks.Stub(); assessmentSectionMock.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); @@ -531,7 +532,7 @@ { Children = { - new ClosingStructuresCalculation() + new StructuresCalculation() } }; @@ -548,7 +549,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new ClosingStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionMock = mocks.Stub(); assessmentSectionMock.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; @@ -594,7 +595,7 @@ { Children = { - new ClosingStructuresCalculation() + new StructuresCalculation() } }; @@ -632,7 +633,7 @@ { Children = { - new ClosingStructuresCalculation() + new StructuresCalculation() } }; @@ -641,7 +642,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new ClosingStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionStub = mocks.Stub(); @@ -679,7 +680,7 @@ { Children = { - new ClosingStructuresCalculation() + new StructuresCalculation() } }; @@ -688,7 +689,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new ClosingStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionStub = mocks.Stub(); var nodeData = new ClosingStructuresCalculationGroupContext(group, @@ -728,7 +729,7 @@ { Children = { - new ClosingStructuresCalculation() + new StructuresCalculation() } }; @@ -745,7 +746,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new ClosingStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionStub = mocks.Stub(); var nodeData = new ClosingStructuresCalculationGroupContext(group, @@ -991,7 +992,7 @@ var nodeData = new ClosingStructuresCalculationGroupContext(group, failureMechanism, assessmentSectionMock); - var calculation = new ClosingStructuresCalculation + var calculation = new StructuresCalculation { Name = "Nieuwe berekening" }; @@ -1019,7 +1020,7 @@ // Assert Assert.AreEqual(2, group.Children.Count); var newlyAddedItem = group.Children.Last(); - Assert.IsInstanceOf(newlyAddedItem); + Assert.IsInstanceOf>(newlyAddedItem); Assert.AreEqual("Nieuwe berekening (1)", newlyAddedItem.Name, "An item with the same name default name already exists, therefore '(1)' needs to be appended."); } @@ -1083,7 +1084,7 @@ new Point2D(0, 0) })); - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); group.Children.Add(calculation); failureMechanism.SectionResults.First().Calculation = calculation; @@ -1109,7 +1110,7 @@ var parentNodeData = new ClosingStructuresCalculationGroupContext(parentGroup, failureMechanism, assessmentSectionMock); - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); observerMock.Expect(o => o.UpdateObserver()); Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresScenarioRowTest.cs =================================================================== diff -u -r8c76ed44224c5f2e96bd030b00c9bb8565e71330 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresScenarioRowTest.cs (.../ClosingStructuresScenarioRowTest.cs) (revision 8c76ed44224c5f2e96bd030b00c9bb8565e71330) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresScenarioRowTest.cs (.../ClosingStructuresScenarioRowTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -27,6 +27,7 @@ using Ringtoets.ClosingStructures.Data; using Ringtoets.ClosingStructures.Forms.Views; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms; namespace Ringtoets.ClosingStructures.Forms.Test.Views @@ -51,7 +52,7 @@ // Assert Assert.AreSame(sectionResult.Section.Name, row.Name); Assert.AreSame(sectionResult.Calculation, row.Calculation); - Assert.IsInstanceOf>(row); + Assert.IsInstanceOf>>(row); } [Test] @@ -78,7 +79,7 @@ var row = new ClosingStructuresScenarioRow(sectionResult); - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); // Call row.Calculation = calculation; @@ -107,7 +108,7 @@ var row = new ClosingStructuresScenarioRow(sectionResult); - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); // Call row.Calculation = calculation; Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresScenariosViewTest.cs =================================================================== diff -u -r93baa4ee308eff5a157e37bd2b4fe148a45806af -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresScenariosViewTest.cs (.../ClosingStructuresScenariosViewTest.cs) (revision 93baa4ee308eff5a157e37bd2b4fe148a45806af) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresScenariosViewTest.cs (.../ClosingStructuresScenariosViewTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -31,6 +31,7 @@ using Ringtoets.ClosingStructures.Forms.Views; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms; namespace Ringtoets.ClosingStructures.Forms.Test.Views @@ -220,8 +221,8 @@ view.Data = failureMechanism.CalculationsGroup; view.FailureMechanism = failureMechanism; - var calculationA = (ClosingStructuresCalculation)failureMechanism.CalculationsGroup.Children[0]; - var calculationB = (ClosingStructuresCalculation)failureMechanism.CalculationsGroup.Children[1]; + var calculationA = (StructuresCalculation)failureMechanism.CalculationsGroup.Children[0]; + var calculationB = (StructuresCalculation)failureMechanism.CalculationsGroup.Children[1]; calculationA.InputParameters.Structure = calculationB.InputParameters.Structure; @@ -247,8 +248,8 @@ view.Data = failureMechanism.CalculationsGroup; view.FailureMechanism = failureMechanism; - var calculationB = ((ClosingStructuresCalculation)failureMechanism.CalculationsGroup.Children[1]); - var calculationC = new ClosingStructuresCalculation + var calculationB = ((StructuresCalculation)failureMechanism.CalculationsGroup.Children[1]); + var calculationC = new StructuresCalculation { Name = "CalculationC", InputParameters = @@ -305,15 +306,15 @@ ClosingStructuresFailureMechanism failureMechanism = new ClosingStructuresFailureMechanism(); var matchingPointA = new Point2D(0, 0); var matchingPointB = new Point2D(20, 20); - var calculationA = new ClosingStructuresCalculation + var calculationA = new StructuresCalculation { Name = "CalculationA", InputParameters = { Structure = CreateStructure(matchingPointA) } }; - var calculationB = new ClosingStructuresCalculation + var calculationB = new StructuresCalculation { Name = "CalculationB", InputParameters = Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Integration.Test/ClosingStructuresCalculationActivityIntegrationTest.cs =================================================================== diff -u -r8245c9add5586e4e544ab41195fb0af2b2a459e9 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Integration.Test/ClosingStructuresCalculationActivityIntegrationTest.cs (.../ClosingStructuresCalculationActivityIntegrationTest.cs) (revision 8245c9add5586e4e544ab41195fb0af2b2a459e9) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Integration.Test/ClosingStructuresCalculationActivityIntegrationTest.cs (.../ClosingStructuresCalculationActivityIntegrationTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -34,6 +34,7 @@ using Ringtoets.ClosingStructures.Service; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.IO.FileImporters; using Ringtoets.HydraRing.Calculation.TestUtil.Calculator; using Ringtoets.HydraRing.Data; @@ -66,7 +67,7 @@ new Point2D(1, 1) })); - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); var activity = new ClosingStructuresCalculationActivity(calculation, "", failureMechanism, assessmentSection); @@ -104,7 +105,7 @@ new Point2D(1, 1) })); - var calculation = new ClosingStructuresCalculation() + var calculation = new StructuresCalculation() { InputParameters = { @@ -299,7 +300,7 @@ new Point2D(1, 1) })); - var calculation = new ClosingStructuresCalculation() + var calculation = new StructuresCalculation() { InputParameters = { Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructureDataSynchronizationServiceTest.cs =================================================================== diff -u -r73597729ce18d3ee00d8036bca8341e9c12f2953 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructureDataSynchronizationServiceTest.cs (.../ClosingStructureDataSynchronizationServiceTest.cs) (revision 73597729ce18d3ee00d8036bca8341e9c12f2953) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructureDataSynchronizationServiceTest.cs (.../ClosingStructureDataSynchronizationServiceTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -25,6 +25,7 @@ using NUnit.Framework; using Ringtoets.ClosingStructures.Data; using Ringtoets.Common.Data.Probability; +using Ringtoets.Common.Data.Structures; using Ringtoets.HydraRing.Data; namespace Ringtoets.ClosingStructures.Service.Test @@ -48,27 +49,27 @@ { // Setup var failureMechanism = new ClosingStructuresFailureMechanism(); - var calculation1 = new ClosingStructuresCalculation + var calculation1 = new StructuresCalculation { Output = new ProbabilityAssessmentOutput(0, 0, 0, 0, 0) }; - var calculation2 = new ClosingStructuresCalculation + var calculation2 = new StructuresCalculation { Output = new ProbabilityAssessmentOutput(0, 0, 0, 0, 0) }; - var calculation3 = new ClosingStructuresCalculation(); + var calculation3 = new StructuresCalculation(); failureMechanism.CalculationsGroup.Children.Add(calculation1); failureMechanism.CalculationsGroup.Children.Add(calculation2); failureMechanism.CalculationsGroup.Children.Add(calculation3); // Call - IEnumerable affectedItems = ClosingStructuresDataSynchronizationService.ClearAllCalculationOutput(failureMechanism); + IEnumerable> affectedItems = ClosingStructuresDataSynchronizationService.ClearAllCalculationOutput(failureMechanism); // Assert - foreach (ClosingStructuresCalculation calculation in failureMechanism.CalculationsGroup.Children.Cast()) + foreach (StructuresCalculation calculation in failureMechanism.CalculationsGroup.Children.Cast>()) { Assert.IsNull(calculation.Output); } @@ -94,7 +95,7 @@ public void ClearCalculationOutput_WithCalculation_ClearsOutput() { // Setup - var calculation = new ClosingStructuresCalculation + var calculation = new StructuresCalculation { Output = new ProbabilityAssessmentOutput(0, 0, 0, 0, 0) }; @@ -124,33 +125,33 @@ var failureMechanism = new ClosingStructuresFailureMechanism(); var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, string.Empty, 0, 0); - var calculation1 = new ClosingStructuresCalculation + var calculation1 = new StructuresCalculation { InputParameters = { HydraulicBoundaryLocation = hydraulicBoundaryLocation } }; - var calculation2 = new ClosingStructuresCalculation + var calculation2 = new StructuresCalculation { InputParameters = { HydraulicBoundaryLocation = hydraulicBoundaryLocation } }; - var calculation3 = new ClosingStructuresCalculation(); + var calculation3 = new StructuresCalculation(); failureMechanism.CalculationsGroup.Children.Add(calculation1); failureMechanism.CalculationsGroup.Children.Add(calculation2); failureMechanism.CalculationsGroup.Children.Add(calculation3); // Call - IEnumerable affectedItems = ClosingStructuresDataSynchronizationService.ClearHydraulicBoundaryLocations(failureMechanism); + IEnumerable> affectedItems = ClosingStructuresDataSynchronizationService.ClearHydraulicBoundaryLocations(failureMechanism); // Assert - foreach (ClosingStructuresCalculation calculation in failureMechanism.CalculationsGroup.Children.Cast()) + foreach (StructuresCalculation calculation in failureMechanism.CalculationsGroup.Children.Cast>()) { Assert.IsNull(calculation.InputParameters.HydraulicBoundaryLocation); } @@ -179,7 +180,7 @@ var failureMechanism = new ClosingStructuresFailureMechanism(); var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, string.Empty, 0, 0); - var calculation1 = new ClosingStructuresCalculation + var calculation1 = new StructuresCalculation { InputParameters = { @@ -188,7 +189,7 @@ Output = new ProbabilityAssessmentOutput(0, 0, 0, 0, 0) }; - var calculation2 = new ClosingStructuresCalculation + var calculation2 = new StructuresCalculation { InputParameters = { @@ -197,17 +198,17 @@ Output = new ProbabilityAssessmentOutput(0, 0, 0, 0, 0) }; - var calculation3 = new ClosingStructuresCalculation(); + var calculation3 = new StructuresCalculation(); failureMechanism.CalculationsGroup.Children.Add(calculation1); failureMechanism.CalculationsGroup.Children.Add(calculation2); failureMechanism.CalculationsGroup.Children.Add(calculation3); // Call - IEnumerable affectedItems = ClosingStructuresDataSynchronizationService.ClearAllCalculationOutputAndHydraulicBoundaryLocations(failureMechanism); + IEnumerable> affectedItems = ClosingStructuresDataSynchronizationService.ClearAllCalculationOutputAndHydraulicBoundaryLocations(failureMechanism); // Assert - foreach (ClosingStructuresCalculation calculation in failureMechanism.CalculationsGroup.Children.Cast()) + foreach (StructuresCalculation calculation in failureMechanism.CalculationsGroup.Children.Cast>()) { Assert.IsNull(calculation.InputParameters.HydraulicBoundaryLocation); Assert.IsNull(calculation.Output); @@ -226,33 +227,33 @@ var failureMechanism = new ClosingStructuresFailureMechanism(); var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, string.Empty, 0, 0); - var calculation1 = new ClosingStructuresCalculation + var calculation1 = new StructuresCalculation { InputParameters = { HydraulicBoundaryLocation = hydraulicBoundaryLocation } }; - var calculation2 = new ClosingStructuresCalculation + var calculation2 = new StructuresCalculation { InputParameters = { HydraulicBoundaryLocation = hydraulicBoundaryLocation } }; - var calculation3 = new ClosingStructuresCalculation(); + var calculation3 = new StructuresCalculation(); failureMechanism.CalculationsGroup.Children.Add(calculation1); failureMechanism.CalculationsGroup.Children.Add(calculation2); failureMechanism.CalculationsGroup.Children.Add(calculation3); // Call - IEnumerable affectedItems = ClosingStructuresDataSynchronizationService.ClearAllCalculationOutputAndHydraulicBoundaryLocations(failureMechanism); + IEnumerable> affectedItems = ClosingStructuresDataSynchronizationService.ClearAllCalculationOutputAndHydraulicBoundaryLocations(failureMechanism); // Assert - foreach (ClosingStructuresCalculation calculation in failureMechanism.CalculationsGroup.Children.Cast()) + foreach (StructuresCalculation calculation in failureMechanism.CalculationsGroup.Children.Cast>()) { Assert.IsNull(calculation.InputParameters.HydraulicBoundaryLocation); } @@ -269,27 +270,27 @@ // Setup var failureMechanism = new ClosingStructuresFailureMechanism(); - var calculation1 = new ClosingStructuresCalculation + var calculation1 = new StructuresCalculation { Output = new ProbabilityAssessmentOutput(0, 0, 0, 0, 0) }; - var calculation2 = new ClosingStructuresCalculation + var calculation2 = new StructuresCalculation { Output = new ProbabilityAssessmentOutput(0, 0, 0, 0, 0) }; - var calculation3 = new ClosingStructuresCalculation(); + var calculation3 = new StructuresCalculation(); failureMechanism.CalculationsGroup.Children.Add(calculation1); failureMechanism.CalculationsGroup.Children.Add(calculation2); failureMechanism.CalculationsGroup.Children.Add(calculation3); // Call - IEnumerable affectedItems = ClosingStructuresDataSynchronizationService.ClearAllCalculationOutputAndHydraulicBoundaryLocations(failureMechanism); + IEnumerable> affectedItems = ClosingStructuresDataSynchronizationService.ClearAllCalculationOutputAndHydraulicBoundaryLocations(failureMechanism); // Assert - foreach (ClosingStructuresCalculation calculation in failureMechanism.CalculationsGroup.Children.Cast()) + foreach (StructuresCalculation calculation in failureMechanism.CalculationsGroup.Children.Cast>()) { Assert.IsNull(calculation.Output); } @@ -306,16 +307,16 @@ // Setup var failureMechanism = new ClosingStructuresFailureMechanism(); - var calculation1 = new ClosingStructuresCalculation(); - var calculation2 = new ClosingStructuresCalculation(); - var calculation3 = new ClosingStructuresCalculation(); + var calculation1 = new StructuresCalculation(); + var calculation2 = new StructuresCalculation(); + var calculation3 = new StructuresCalculation(); failureMechanism.CalculationsGroup.Children.Add(calculation1); failureMechanism.CalculationsGroup.Children.Add(calculation2); failureMechanism.CalculationsGroup.Children.Add(calculation3); // Call - IEnumerable affectedItems = ClosingStructuresDataSynchronizationService.ClearAllCalculationOutputAndHydraulicBoundaryLocations(failureMechanism); + IEnumerable> affectedItems = ClosingStructuresDataSynchronizationService.ClearAllCalculationOutputAndHydraulicBoundaryLocations(failureMechanism); // Assert CollectionAssert.IsEmpty(affectedItems); Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructuresCalculationActivityTest.cs =================================================================== diff -u -r8c7c25ff896b8967361c5c8f4e6ef261ff6f5164 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructuresCalculationActivityTest.cs (.../ClosingStructuresCalculationActivityTest.cs) (revision 8c7c25ff896b8967361c5c8f4e6ef261ff6f5164) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructuresCalculationActivityTest.cs (.../ClosingStructuresCalculationActivityTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -25,6 +25,7 @@ using Rhino.Mocks; using Ringtoets.ClosingStructures.Data; using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.Structures; namespace Ringtoets.ClosingStructures.Service.Test { @@ -40,7 +41,7 @@ mocks.ReplayAll(); var failureMechanism = new ClosingStructuresFailureMechanism(); - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); // Call var activity = new ClosingStructuresCalculationActivity(calculation, "", failureMechanism, assessmentSectionMock); @@ -82,7 +83,7 @@ mocks.ReplayAll(); var failureMechanism = new ClosingStructuresFailureMechanism(); - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); // Call TestDelegate call = () => new ClosingStructuresCalculationActivity(calculation, null, failureMechanism, assessmentSectionMock); @@ -101,7 +102,7 @@ var assessmentSectionMock = mocks.StrictMock(); mocks.ReplayAll(); - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); // Call TestDelegate call = () => new ClosingStructuresCalculationActivity(calculation, "", null, assessmentSectionMock); @@ -117,7 +118,7 @@ { // Setup var failureMechanism = new ClosingStructuresFailureMechanism(); - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); // Call TestDelegate call = () => new ClosingStructuresCalculationActivity(calculation, "", failureMechanism, null); Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructuresCalculationServiceTest.cs =================================================================== diff -u -r8245c9add5586e4e544ab41195fb0af2b2a459e9 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructuresCalculationServiceTest.cs (.../ClosingStructuresCalculationServiceTest.cs) (revision 8245c9add5586e4e544ab41195fb0af2b2a459e9) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructuresCalculationServiceTest.cs (.../ClosingStructuresCalculationServiceTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -32,6 +32,7 @@ using Ringtoets.Common.Data.Contribution; using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.HydraRing.Calculation.Calculator.Factory; using Ringtoets.HydraRing.Calculation.Data; using Ringtoets.HydraRing.Calculation.Data.Input.Structures; @@ -59,7 +60,7 @@ const string name = ""; - ClosingStructuresCalculation calculation = new ClosingStructuresCalculation + var calculation = new StructuresCalculation { Name = name, InputParameters = @@ -98,7 +99,7 @@ const string name = ""; - ClosingStructuresCalculation calculation = new TestClosingStructuresCalculation() + var calculation = new TestClosingStructuresCalculation() { Name = name, InputParameters = @@ -142,7 +143,7 @@ })); FailureMechanismSection failureMechanismSection = closingStructuresFailureMechanism.Sections.First(); - ClosingStructuresCalculation calculation = new TestClosingStructuresCalculation() + var calculation = new TestClosingStructuresCalculation() { InputParameters = { @@ -187,7 +188,7 @@ new Point2D(1, 1) })); - ClosingStructuresCalculation calculation = new TestClosingStructuresCalculation() + var calculation = new TestClosingStructuresCalculation() { InputParameters = { @@ -281,7 +282,7 @@ new Point2D(1, 1) })); - ClosingStructuresCalculation calculation = new TestClosingStructuresCalculation() + var calculation = new TestClosingStructuresCalculation() { InputParameters = { @@ -375,7 +376,7 @@ new Point2D(1, 1) })); - ClosingStructuresCalculation calculation = new TestClosingStructuresCalculation() + var calculation = new TestClosingStructuresCalculation() { InputParameters = { @@ -581,7 +582,7 @@ })); FailureMechanismSection failureMechanismSection = closingStructuresFailureMechanism.Sections.First(); - ClosingStructuresCalculation calculation = new TestClosingStructuresCalculation() + var calculation = new TestClosingStructuresCalculation() { InputParameters = { Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Utils.Test/ClosingStructuresHelperTest.cs =================================================================== diff -u -r73597729ce18d3ee00d8036bca8341e9c12f2953 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Utils.Test/ClosingStructuresHelperTest.cs (.../ClosingStructuresHelperTest.cs) (revision 73597729ce18d3ee00d8036bca8341e9c12f2953) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Utils.Test/ClosingStructuresHelperTest.cs (.../ClosingStructuresHelperTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -28,6 +28,7 @@ using Ringtoets.ClosingStructures.Data; using Ringtoets.ClosingStructures.Data.TestUtil; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; namespace Ringtoets.ClosingStructures.Utils.Test { @@ -43,7 +44,7 @@ // Call TestDelegate test = () => ClosingStructuresHelper.CollectCalculationsPerSection( null, - new ClosingStructuresCalculation[] + new StructuresCalculation[] { null }); @@ -92,7 +93,7 @@ // Call TestDelegate test = () => ClosingStructuresHelper.CollectCalculationsPerSection( twoSections, - new ClosingStructuresCalculation[] + new StructuresCalculation[] { null }); @@ -145,7 +146,7 @@ public void FailureMechanismSectionForCalculation_ValidSectionWithoutCalculationStructureSet_ReturnsNull() { // Setup - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); // Call FailureMechanismSection failureMechanismSection = @@ -160,7 +161,7 @@ { // Setup var emptySections = new FailureMechanismSection[0]; - var calculation = new ClosingStructuresCalculation(); + var calculation = new StructuresCalculation(); // Call FailureMechanismSection failureMechanismSection = @@ -326,7 +327,7 @@ sectionResult }, calculationInSectionA, - new ClosingStructuresCalculation[] + new StructuresCalculation[] { null }); @@ -353,7 +354,7 @@ failureMechanismSectionResult }, calculationInSectionA, - Enumerable.Empty()); + Enumerable.Empty>()); // Assert Assert.IsNull(failureMechanismSectionResult.Calculation); @@ -413,15 +414,15 @@ failureMechanismSectionB }; - private readonly ClosingStructuresCalculation calculationInSectionA = new ClosingStructuresCalculation + private readonly StructuresCalculation calculationInSectionA = new StructuresCalculation { InputParameters = { Structure = new TestClosingStructure(new Point2D(1.1, 2.2)) } }; - private readonly ClosingStructuresCalculation calculationInSectionB = new ClosingStructuresCalculation + private readonly StructuresCalculation calculationInSectionB = new StructuresCalculation { InputParameters = { Index: Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj =================================================================== diff -u -r04bb0523abe526947e76b0701728506e7293792c -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision 04bb0523abe526947e76b0701728506e7293792c) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -85,6 +85,7 @@ + Index: Ringtoets/Common/src/Ringtoets.Common.Data/Structures/StructuresCalculation.cs =================================================================== diff -u --- Ringtoets/Common/src/Ringtoets.Common.Data/Structures/StructuresCalculation.cs (revision 0) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Structures/StructuresCalculation.cs (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -0,0 +1,86 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using Core.Common.Base; +using Ringtoets.Common.Data.Calculation; +using Ringtoets.Common.Data.Probability; +using Ringtoets.Common.Data.Properties; + +namespace Ringtoets.Common.Data.Structures +{ + /// + /// This class holds information about a calculation for a structures failure mechanism. + /// + public class StructuresCalculation : Observable, ICalculation where T : class, new() + { + /// + /// Initializes a new instance of the class. + /// + public StructuresCalculation() + { + InputParameters = new T(); + Name = Resources.Calculation_DefaultName; + } + + /// + /// Gets the input parameters to perform a structures calculation with. + /// + public T InputParameters { get; private set; } + + /// + /// Gets or sets the , + /// which contains the output of a structures calculation. + /// + public ProbabilityAssessmentOutput Output { get; set; } + + public string Name { get; set; } + + public string Comments { get; set; } + + public bool HasOutput + { + get + { + return Output != null; + } + } + + public void ClearOutput() + { + Output = null; + } + + public ICalculationInput GetObservableInput() + { + return (ICalculationInput) InputParameters; + } + + public ICalculationOutput GetObservableOutput() + { + return Output; + } + + public override string ToString() + { + return Name; + } + } +} \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj =================================================================== diff -u -r2b2da37541708b8ad95286e731010dd9d27d5070 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision 2b2da37541708b8ad95286e731010dd9d27d5070) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -78,6 +78,7 @@ + Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Structures/StructuresCalculationTest.cs =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Structures/StructuresCalculationTest.cs (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Structures/StructuresCalculationTest.cs (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -0,0 +1,158 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using Core.Common.Base; +using NUnit.Framework; +using Ringtoets.Common.Data.Calculation; +using Ringtoets.Common.Data.Probability; +using Ringtoets.Common.Data.Structures; + +namespace Ringtoets.Common.Data.Test.Structures +{ + [TestFixture] + public class StructuresCalculationTest + { + [Test] + public void Constructor_Default_ExpectedValues() + { + // Call + var calculation = new TestStructuresCalculation(); + + // Assert + Assert.IsInstanceOf(calculation); + Assert.AreEqual("Nieuwe berekening", calculation.Name); + Assert.IsNotNull(calculation.InputParameters); + Assert.IsNull(calculation.Comments); + Assert.IsFalse(calculation.HasOutput); + Assert.IsNull(calculation.Output); + } + + [Test] + public void ClearOutput_Always_SetsOutputToNull() + { + // Setup + var calculation = new TestStructuresCalculation + { + Output = new TestStructuresOutput() + }; + + // Call + calculation.ClearOutput(); + + // Assert + Assert.IsNull(calculation.Output); + } + + [Test] + public void HasOutput_OutputNull_ReturnsFalse() + { + // Setup + var calculation = new TestStructuresCalculation + { + Output = null + }; + + // Call + bool calculationHasOutput = calculation.HasOutput; + + // Assert + Assert.IsFalse(calculationHasOutput); + } + + [Test] + public void HasOutput_OutputSet_ReturnsTrue() + { + // Setup + var calculation = new TestStructuresCalculation + { + Output = new TestStructuresOutput() + }; + + // Call + bool calculationHasOutput = calculation.HasOutput; + + // Assert + Assert.IsTrue(calculationHasOutput); + } + + [Test] + public void GetObservableInput_Always_ReturnsInputParameters() + { + // Setup + var calculation = new TestStructuresCalculation(); + + // Call + ICalculationInput input = calculation.GetObservableInput(); + + // Assert + Assert.AreSame(calculation.InputParameters, input); + } + + [Test] + public void GetObservableOutput_Always_ReturnsOutput() + { + // Setup + var calculation = new TestStructuresCalculation + { + Output = new TestStructuresOutput() + }; + + // Call + ICalculationOutput output = calculation.GetObservableOutput(); + + // Assert + Assert.AreSame(calculation.Output, output); + } + + [Test] + public void ToString_Always_ReturnName() + { + // Setup + var expectedName = "someTestName"; + var calculation = new TestStructuresCalculation + { + Name = expectedName + }; + + // Call + var result = calculation.ToString(); + + // Assert + Assert.AreEqual(expectedName, result); + } + + private class TestStructuresCalculation : StructuresCalculation {} + + private class TestStructuresInput : ICalculationInput + { + public void Attach(IObserver observer) {} + + public void Detach(IObserver observer) {} + + public void NotifyObservers() {} + } + + private class TestStructuresOutput : ProbabilityAssessmentOutput + { + public TestStructuresOutput() : base(0, 0, 0, 0, 0) {} + } + } +} \ No newline at end of file Fisheye: Tag ab20c4eb4ca81bd3845d50210d2bdb301177af6a refers to a dead (removed) revision in file `Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresCalculation.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresFailureMechanism.cs =================================================================== diff -u -rbe6802ad8677e06b335c8123ec49e7106ad79ad7 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresFailureMechanism.cs (.../HeightStructuresFailureMechanism.cs) (revision be6802ad8677e06b335c8123ec49e7106ad79ad7) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresFailureMechanism.cs (.../HeightStructuresFailureMechanism.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -25,6 +25,7 @@ using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.HeightStructures.Data.Properties; using RingtoetsCommonDataResources = Ringtoets.Common.Data.Properties.Resources; @@ -54,7 +55,7 @@ { get { - return CalculationsGroup.GetCalculations().OfType(); + return CalculationsGroup.GetCalculations().OfType>(); } } Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresFailureMechanismSectionResult.cs =================================================================== diff -u -rd9c981f7b4c64d16e55fca0cb51eb9f4c9aec28f -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresFailureMechanismSectionResult.cs (.../HeightStructuresFailureMechanismSectionResult.cs) (revision d9c981f7b4c64d16e55fca0cb51eb9f4c9aec28f) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresFailureMechanismSectionResult.cs (.../HeightStructuresFailureMechanismSectionResult.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -21,6 +21,7 @@ using System; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; namespace Ringtoets.HeightStructures.Data { @@ -53,9 +54,9 @@ } /// - /// Gets or sets the , which is chosen + /// Gets or sets the , which is chosen /// to be representative for the whole section. /// - public HeightStructuresCalculation Calculation { get; set; } + public StructuresCalculation Calculation { get; set; } } } \ No newline at end of file Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/Ringtoets.HeightStructures.Data.csproj =================================================================== diff -u -r2b2da37541708b8ad95286e731010dd9d27d5070 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/Ringtoets.HeightStructures.Data.csproj (.../Ringtoets.HeightStructures.Data.csproj) (revision 2b2da37541708b8ad95286e731010dd9d27d5070) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/Ringtoets.HeightStructures.Data.csproj (.../Ringtoets.HeightStructures.Data.csproj) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -41,7 +41,6 @@ - Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PresentationObjects/HeightStructuresCalculationContext.cs =================================================================== diff -u -rca23b1b155ca87c0aa4665fd919727570f31c781 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PresentationObjects/HeightStructuresCalculationContext.cs (.../HeightStructuresCalculationContext.cs) (revision ca23b1b155ca87c0aa4665fd919727570f31c781) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PresentationObjects/HeightStructuresCalculationContext.cs (.../HeightStructuresCalculationContext.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -21,26 +21,27 @@ using System; using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.HeightStructures.Data; namespace Ringtoets.HeightStructures.Forms.PresentationObjects { /// - /// Presentation object for all data required to configure an instance of + /// Presentation object for all data required to configure an instance of /// in order to prepare it for performing a calculation. /// - public class HeightStructuresCalculationContext : FailureMechanismItemContextBase, - ICalculationContext + public class HeightStructuresCalculationContext : FailureMechanismItemContextBase, HeightStructuresFailureMechanism>, + ICalculationContext, HeightStructuresFailureMechanism> { /// /// Creates a new instance of . /// - /// The instance wrapped by this context object. + /// The instance wrapped by this context object. /// The failure mechanism which the context belongs to. /// The assessment section which the calculation belongs to. /// When any input argument is null. - public HeightStructuresCalculationContext(HeightStructuresCalculation calculation, + public HeightStructuresCalculationContext(StructuresCalculation calculation, HeightStructuresFailureMechanism failureMechanism, IAssessmentSection assessmentSection) : base(calculation, failureMechanism, assessmentSection) {} Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PresentationObjects/HeightStructuresInputContext.cs =================================================================== diff -u -r7823eab06c968c167d9d5b24a30acaa344478dc0 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PresentationObjects/HeightStructuresInputContext.cs (.../HeightStructuresInputContext.cs) (revision 7823eab06c968c167d9d5b24a30acaa344478dc0) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PresentationObjects/HeightStructuresInputContext.cs (.../HeightStructuresInputContext.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -21,6 +21,7 @@ using System; using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.HeightStructures.Data; @@ -30,7 +31,7 @@ /// Presentation object for all data required to configure an instance of /// in order to be able to configure height structures calculations. /// - public class HeightStructuresInputContext : InputContextBase + public class HeightStructuresInputContext : InputContextBase, HeightStructuresFailureMechanism> { /// /// Creates a new instance of . @@ -41,7 +42,7 @@ /// The assessment section which the context belongs to. /// Thrown when any input argument is null. public HeightStructuresInputContext(HeightStructuresInput wrappedData, - HeightStructuresCalculation calculation, + StructuresCalculation calculation, HeightStructuresFailureMechanism failureMechanism, IAssessmentSection assessmentSection) : base(wrappedData, calculation, failureMechanism, assessmentSection) {} Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresInputContextProperties.cs =================================================================== diff -u -r94280a98283d1dbe5381cbc46f59b996f5f43b19 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresInputContextProperties.cs (.../HeightStructuresInputContextProperties.cs) (revision 94280a98283d1dbe5381cbc46f59b996f5f43b19) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresInputContextProperties.cs (.../HeightStructuresInputContextProperties.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -25,10 +25,10 @@ using Core.Common.Gui.Attributes; using Core.Common.Utils.Attributes; using Ringtoets.Common.Data.DikeProfiles; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PropertyClasses; using Ringtoets.HeightStructures.Data; using Ringtoets.HeightStructures.Forms.PresentationObjects; -using Ringtoets.HeightStructures.Forms.Properties; using Ringtoets.HeightStructures.Utils; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; @@ -37,7 +37,7 @@ /// /// ViewModel of for properties panel. /// - public class HeightStructuresInputContextProperties : StructuresInputBaseProperties + public class HeightStructuresInputContextProperties : StructuresInputBaseProperties, HeightStructuresFailureMechanism> { private const int structurePropertyIndex = 1; private const int structureLocationPropertyIndex = 2; Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Views/HeightStructuresScenarioRow.cs =================================================================== diff -u -r38600213ce6ca43c1819c81dd95c8ce786650ac3 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Views/HeightStructuresScenarioRow.cs (.../HeightStructuresScenarioRow.cs) (revision 38600213ce6ca43c1819c81dd95c8ce786650ac3) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Views/HeightStructuresScenarioRow.cs (.../HeightStructuresScenarioRow.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -21,6 +21,7 @@ using System; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms; using Ringtoets.HeightStructures.Data; @@ -30,7 +31,7 @@ /// Container of a , /// which takes care of the representation of properties in a grid. /// - internal class HeightStructuresScenarioRow : IScenarioRow + internal class HeightStructuresScenarioRow : IScenarioRow> { private readonly HeightStructuresFailureMechanismSectionResult sectionResult; @@ -62,7 +63,7 @@ /// /// Gets or sets the normative calculation for the section. /// - public HeightStructuresCalculation Calculation + public StructuresCalculation Calculation { get { Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Views/HeightStructuresScenariosView.cs =================================================================== diff -u -rf211e80f654ef76473f816c8846521a28232d591 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Views/HeightStructuresScenariosView.cs (.../HeightStructuresScenariosView.cs) (revision f211e80f654ef76473f816c8846521a28232d591) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Views/HeightStructuresScenariosView.cs (.../HeightStructuresScenariosView.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -26,6 +26,7 @@ using Core.Common.Base; using Core.Common.Controls.Views; using Ringtoets.Common.Data.Calculation; +using Ringtoets.Common.Data.Structures; using Ringtoets.HeightStructures.Data; using Ringtoets.HeightStructures.Utils; @@ -129,7 +130,7 @@ var calculations = data.GetCalculations(); Dictionary> calculationsPerSegment = - HeightStructuresHelper.CollectCalculationsPerSection(failureMechanism.Sections, calculations.OfType()); + HeightStructuresHelper.CollectCalculationsPerSection(failureMechanism.Sections, calculations.OfType>()); List scenarioRows = FailureMechanism.SectionResults.Select(sectionResult => new HeightStructuresScenarioRow(sectionResult)).ToList(); Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresPlugin.cs =================================================================== diff -u -r7823eab06c968c167d9d5b24a30acaa344478dc0 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision 7823eab06c968c167d9d5b24a30acaa344478dc0) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -34,6 +34,7 @@ using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.Probability; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.Helpers; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.Common.Forms.TreeNodeInfos; @@ -183,7 +184,7 @@ } private void CalculateAll(HeightStructuresFailureMechanism failureMechanism, - IEnumerable calculations, + IEnumerable> calculations, IAssessmentSection assessmentSection) { ActivityProgressDialogRunner.Run(Gui.MainWindow, @@ -193,7 +194,7 @@ assessmentSection)).ToArray()); } - private static void ValidateAll(IEnumerable heightStructuresCalculations, IAssessmentSection assessmentSection) + private static void ValidateAll(IEnumerable> heightStructuresCalculations, IAssessmentSection assessmentSection) { foreach (var calculation in heightStructuresCalculations) { @@ -326,7 +327,7 @@ .AddSeparator() .AddValidateAllCalculationsInFailureMechanismItem( context, - c => ValidateAll(c.WrappedData.Calculations.OfType(), c.Parent), + c => ValidateAll(c.WrappedData.Calculations.OfType>(), c.Parent), ValidateAllDataAvailableAndGetErrorMessageForCalculationsInFailureMechanism) .AddPerformAllCalculationsInFailureMechanismItem(context, CalculateAll, ValidateAllDataAvailableAndGetErrorMessageForCalculationsInFailureMechanism) .AddClearAllCalculationOutputInFailureMechanismItem(context.WrappedData) @@ -361,7 +362,7 @@ private void CalculateAll(HeightStructuresFailureMechanismContext context) { - CalculateAll(context.WrappedData, context.WrappedData.Calculations.OfType(), context.Parent); + CalculateAll(context.WrappedData, context.WrappedData.Calculations.OfType>(), context.Parent); } #endregion @@ -374,7 +375,7 @@ foreach (ICalculationBase calculationItem in context.WrappedData.Children) { - var calculation = calculationItem as HeightStructuresCalculation; + var calculation = calculationItem as StructuresCalculation; var group = calculationItem as CalculationGroup; if (calculation != null) @@ -422,7 +423,7 @@ builder.AddSeparator() .AddValidateAllCalculationsInGroupItem( context, - c => ValidateAll(c.WrappedData.GetCalculations().OfType(), c.AssessmentSection), + c => ValidateAll(c.WrappedData.GetCalculations().OfType>(), c.AssessmentSection), ValidateAllDataAvailableAndGetErrorMessageForCalculationsInGroup) .AddPerformAllCalculationsInGroupItem(group, context, CalculateAll, ValidateAllDataAvailableAndGetErrorMessageForCalculationsInGroup) .AddClearAllCalculationOutputInGroupItem(group) @@ -478,7 +479,7 @@ { foreach (var structure in structures) { - var calculation = new HeightStructuresCalculation + var calculation = new StructuresCalculation { Name = NamingHelper.GetUniqueName(calculations, structure.Name, c => c.Name), InputParameters = @@ -496,18 +497,18 @@ var parentGroupContext = (HeightStructuresCalculationGroupContext) parentNodeData; parentGroupContext.WrappedData.Children.Remove(context.WrappedData); - foreach (var calculation in context.WrappedData.GetCalculations().Cast()) + foreach (var calculation in context.WrappedData.GetCalculations().Cast>()) { HeightStructuresHelper.Delete(context.FailureMechanism.SectionResults, calculation, - context.FailureMechanism.Calculations.Cast()); + context.FailureMechanism.Calculations.Cast>()); } parentGroupContext.NotifyObservers(); } private static void AddCalculation(HeightStructuresCalculationGroupContext context) { - var calculation = new HeightStructuresCalculation + var calculation = new StructuresCalculation { Name = NamingHelper.GetUniqueName(context.WrappedData.Children, RingtoetsCommonDataResources.Calculation_DefaultName, c => c.Name) }; @@ -522,7 +523,7 @@ private void CalculateAll(CalculationGroup group, HeightStructuresCalculationGroupContext context) { - CalculateAll(context.FailureMechanism, group.GetCalculations().OfType(), context.AssessmentSection); + CalculateAll(context.FailureMechanism, group.GetCalculations().OfType>(), context.AssessmentSection); } #endregion @@ -556,7 +557,7 @@ { var builder = new RingtoetsContextMenuBuilder(Gui.Get(context, treeViewControl)); - HeightStructuresCalculation calculation = context.WrappedData; + StructuresCalculation calculation = context.WrappedData; return builder.AddValidateCalculationItem( context, @@ -580,7 +581,7 @@ return ValidateAllDataAvailableAndGetErrorMessage(context.AssessmentSection, context.FailureMechanism); } - private void Calculate(HeightStructuresCalculation calculation, HeightStructuresCalculationContext context) + private void Calculate(StructuresCalculation calculation, HeightStructuresCalculationContext context) { ActivityProgressDialogRunner.Run(Gui.MainWindow, new HeightStructuresCalculationActivity(calculation, Path.GetDirectoryName(context.AssessmentSection.HydraulicBoundaryDatabase.FilePath), @@ -594,7 +595,7 @@ if (calculationGroupContext != null) { calculationGroupContext.WrappedData.Children.Remove(context.WrappedData); - HeightStructuresHelper.Delete(context.FailureMechanism.SectionResults, context.WrappedData, context.FailureMechanism.Calculations.Cast()); + HeightStructuresHelper.Delete(context.FailureMechanism.SectionResults, context.WrappedData, context.FailureMechanism.Calculations.Cast>()); calculationGroupContext.NotifyObservers(); } } Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationActivity.cs =================================================================== diff -u -r5dcbf2204ef1f29a353b60657e0cb830db7af73b -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationActivity.cs (.../HeightStructuresCalculationActivity.cs) (revision 5dcbf2204ef1f29a353b60657e0cb830db7af73b) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationActivity.cs (.../HeightStructuresCalculationActivity.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -23,6 +23,7 @@ using Core.Common.Base.Service; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.HeightStructures.Data; using Ringtoets.HeightStructures.Utils; using Ringtoets.HydraRing.Calculation.Activities; @@ -34,7 +35,7 @@ /// public class HeightStructuresCalculationActivity : HydraRingActivityBase { - private readonly HeightStructuresCalculation calculation; + private readonly StructuresCalculation calculation; private readonly string hlcdDirectory; private readonly HeightStructuresFailureMechanism failureMechanism; private readonly IAssessmentSection assessmentSection; @@ -48,7 +49,7 @@ /// The failure mechanism the calculation belongs to. /// The assessment section the calculation belongs to. /// Thrown when any input argument is null. - public HeightStructuresCalculationActivity(HeightStructuresCalculation calculation, string hlcdDirectory, + public HeightStructuresCalculationActivity(StructuresCalculation calculation, string hlcdDirectory, HeightStructuresFailureMechanism failureMechanism, IAssessmentSection assessmentSection) { if (calculation == null) Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationService.cs =================================================================== diff -u -r1a6804681b0758a5761e39099e4b6de65f9cf4a2 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationService.cs (.../HeightStructuresCalculationService.cs) (revision 1a6804681b0758a5761e39099e4b6de65f9cf4a2) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationService.cs (.../HeightStructuresCalculationService.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -25,6 +25,7 @@ using log4net; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Service; using Ringtoets.HeightStructures.Data; using Ringtoets.HeightStructures.Service.Properties; @@ -55,10 +56,10 @@ /// Performs validation over the values on the given . Error and status information is logged during /// the execution of the operation. /// - /// The for which to validate the values. + /// The for which to validate the values. /// The for which to validate the values. /// Truec> if has no validation errors; Falsec> otherwise. - public bool Validate(HeightStructuresCalculation calculation, IAssessmentSection assessmentSection) + public bool Validate(StructuresCalculation calculation, IAssessmentSection assessmentSection) { CalculationServiceHelper.LogValidationBeginTime(calculation.Name); @@ -83,16 +84,16 @@ } /// - /// Performs a height structures calculation based on the supplied and sets + /// Performs a height structures calculation based on the supplied and sets /// if the calculation was successful. Error and status information is logged during the execution of the operation. /// - /// The that holds all the information required to perform the calculation. + /// The that holds all the information required to perform the calculation. /// The that holds information about the norm used in the calculation. /// The to create input with. /// The to create the input with for the calculation. /// The amount of contribution for this failure mechanism in the assessment section. /// The directory of the HLCD file that should be used for performing the calculation. - internal void Calculate(HeightStructuresCalculation calculation, + internal void Calculate(StructuresCalculation calculation, IAssessmentSection assessmentSection, FailureMechanismSection failureMechanismSection, GeneralHeightStructuresInput generalInput, @@ -134,7 +135,7 @@ } } - private static StructuresOvertoppingCalculationInput CreateInput(HeightStructuresCalculation calculation, FailureMechanismSection failureMechanismSection, GeneralHeightStructuresInput generalInput) + private static StructuresOvertoppingCalculationInput CreateInput(StructuresCalculation calculation, FailureMechanismSection failureMechanismSection, GeneralHeightStructuresInput generalInput) { return new StructuresOvertoppingCalculationInput( calculation.InputParameters.HydraulicBoundaryLocation.Id, Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresDataSynchronizationService.cs =================================================================== diff -u -r1f2e8750b43af706757de6251ce5b6ac2dabea29 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresDataSynchronizationService.cs (.../HeightStructuresDataSynchronizationService.cs) (revision 1f2e8750b43af706757de6251ce5b6ac2dabea29) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresDataSynchronizationService.cs (.../HeightStructuresDataSynchronizationService.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -24,6 +24,7 @@ using System.Collections.ObjectModel; using System.Linq; using Core.Common.Utils.Extensions; +using Ringtoets.Common.Data.Structures; using Ringtoets.HeightStructures.Data; using Ringtoets.HydraRing.Data; @@ -43,15 +44,15 @@ /// clearing the output. /// Thrown when /// is null. - public static IEnumerable ClearAllCalculationOutput(HeightStructuresFailureMechanism failureMechanism) + public static IEnumerable> ClearAllCalculationOutput(HeightStructuresFailureMechanism failureMechanism) { if (failureMechanism == null) { throw new ArgumentNullException("failureMechanism"); } var affectedItems = failureMechanism.Calculations - .Cast() + .Cast>() .Where(c => c.HasOutput) .ToArray(); @@ -61,13 +62,13 @@ } /// - /// Clears the output of the given . + /// Clears the output of the given . /// - /// The to clear + /// The to clear /// the output for. /// Thrown when /// is null. - public static void ClearCalculationOutput(HeightStructuresCalculation calculation) + public static void ClearCalculationOutput(StructuresCalculation calculation) { if (calculation == null) { @@ -87,15 +88,15 @@ /// removing . /// Thrown when /// is null. - public static IEnumerable ClearHydraulicBoundaryLocations(HeightStructuresFailureMechanism failureMechanism) + public static IEnumerable> ClearHydraulicBoundaryLocations(HeightStructuresFailureMechanism failureMechanism) { if (failureMechanism == null) { throw new ArgumentNullException("failureMechanism"); } var affectedItems = failureMechanism.Calculations - .Cast() + .Cast>() .Where(c => c.InputParameters.HydraulicBoundaryLocation != null) .ToArray(); @@ -114,16 +115,16 @@ /// removing data. /// Thrown when /// is null. - public static IEnumerable ClearAllCalculationOutputAndHydraulicBoundaryLocations(HeightStructuresFailureMechanism failureMechanism) + public static IEnumerable> ClearAllCalculationOutputAndHydraulicBoundaryLocations(HeightStructuresFailureMechanism failureMechanism) { if (failureMechanism == null) { throw new ArgumentNullException("failureMechanism"); } - Collection affectedItems = new Collection(); + var affectedItems = new Collection>(); - foreach (var calculation in failureMechanism.Calculations.Cast()) + foreach (var calculation in failureMechanism.Calculations.Cast>()) { var calculationChanged = false; @@ -148,7 +149,7 @@ return affectedItems; } - private static void ClearHydraulicBoundaryLocation(HeightStructuresCalculation calculation) + private static void ClearHydraulicBoundaryLocation(StructuresCalculation calculation) { calculation.InputParameters.HydraulicBoundaryLocation = null; } Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Utils/HeightStructuresHelper.cs =================================================================== diff -u -r53785e0fd2752f08a43b649e0c4cd56955ec374d -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Utils/HeightStructuresHelper.cs (.../HeightStructuresHelper.cs) (revision 53785e0fd2752f08a43b649e0c4cd56955ec374d) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Utils/HeightStructuresHelper.cs (.../HeightStructuresHelper.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -24,19 +24,20 @@ using System.Linq; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Utils; using Ringtoets.HeightStructures.Data; namespace Ringtoets.HeightStructures.Utils { /// /// Class holds helper methods to match objects - /// with objects. + /// with objects. /// public static class HeightStructuresHelper { /// - /// Determine which objects are available for a + /// Determine which objects are available for a /// . /// /// The objects. @@ -49,23 +50,23 @@ /// Thrown when an element in is /// null. public static Dictionary> CollectCalculationsPerSection(IEnumerable sections, - IEnumerable calculations) + IEnumerable> calculations) { return AssignUnassignCalculations.CollectCalculationsPerSection(sections, AsCalculationsWithLocations(calculations)); } /// - /// Determine which geometrically contains the . + /// Determine which geometrically contains the . /// /// The objects /// whose are considered. - /// The . + /// The . /// The containing , or null if none found. /// Thrown when is null /// Thrown when an element in is null. /// public static FailureMechanismSection FailureMechanismSectionForCalculation(IEnumerable sections, - HeightStructuresCalculation calculation) + StructuresCalculation calculation) { CalculationWithLocation calculationWithLocation = AsCalculationWithLocation(calculation); if (calculationWithLocation != null) @@ -80,13 +81,13 @@ /// assigned, or should have the assigned. /// /// The of to iterate while - /// possibly updating the assigned to it. - /// The which has a location that has been updated. + /// possibly updating the assigned to it. + /// The which has a location that has been updated. /// Thrown when is null /// Thrown when element in is /// null. public static void Update(IEnumerable sectionResults, - HeightStructuresCalculation calculation) + StructuresCalculation calculation) { ValidateSectionResults(sectionResults); @@ -103,16 +104,16 @@ /// /// The of to iterate while /// removing the reference to the if present. - /// The which has a location that has been updated. - /// The of that were left after removing + /// The which has a location that has been updated. + /// The of that were left after removing /// . /// Thrown when any input parameter is null or when an element /// in is null. /// Thrown when element in is /// null. public static void Delete(IEnumerable sectionResults, - HeightStructuresCalculation calculation, - IEnumerable calculations) + StructuresCalculation calculation, + IEnumerable> calculations) { ValidateSectionResults(sectionResults); @@ -126,11 +127,11 @@ /// Transforms the into and filter out the calculations /// for which a could not be made. /// - /// The collection to transform. + /// The collection to transform. /// A collection of . /// Thrown when is null or when /// an element in is null. - private static IEnumerable AsCalculationsWithLocations(IEnumerable calculations) + private static IEnumerable AsCalculationsWithLocations(IEnumerable> calculations) { if (calculations == null) { @@ -151,7 +152,7 @@ } } - private static CalculationWithLocation AsCalculationWithLocation(HeightStructuresCalculation calculation) + private static CalculationWithLocation AsCalculationWithLocation(StructuresCalculation calculation) { if (calculation == null) { @@ -169,7 +170,7 @@ return new SectionResultWithCalculationAssignment( failureMechanismSectionResult, result => ((HeightStructuresFailureMechanismSectionResult) result).Calculation, - (result, calculation) => ((HeightStructuresFailureMechanismSectionResult) result).Calculation = (HeightStructuresCalculation) calculation); + (result, calculation) => ((HeightStructuresFailureMechanismSectionResult)result).Calculation = (StructuresCalculation)calculation); } } } \ No newline at end of file Fisheye: Tag ab20c4eb4ca81bd3845d50210d2bdb301177af6a refers to a dead (removed) revision in file `Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresCalculationTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresFailureMechanismSectionResultTest.cs =================================================================== diff -u -rd9c981f7b4c64d16e55fca0cb51eb9f4c9aec28f -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresFailureMechanismSectionResultTest.cs (.../HeightStructuresFailureMechanismSectionResultTest.cs) (revision d9c981f7b4c64d16e55fca0cb51eb9f4c9aec28f) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresFailureMechanismSectionResultTest.cs (.../HeightStructuresFailureMechanismSectionResultTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -23,6 +23,7 @@ using NUnit.Framework; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Probability; +using Ringtoets.Common.Data.Structures; namespace Ringtoets.HeightStructures.Data.Test { @@ -56,7 +57,7 @@ var result = new HeightStructuresFailureMechanismSectionResult(section); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); // Call result.Calculation = calculation; @@ -91,7 +92,7 @@ var result = new HeightStructuresFailureMechanismSectionResult(section) { - Calculation = new HeightStructuresCalculation + Calculation = new StructuresCalculation { Output = new ProbabilityAssessmentOutput(1.0, 1.0, double.NaN, 1.0, 1.0) } @@ -113,7 +114,7 @@ double probability = 0.65; var result = new HeightStructuresFailureMechanismSectionResult(section) { - Calculation = new HeightStructuresCalculation + Calculation = new StructuresCalculation { Output = new ProbabilityAssessmentOutput(1.0, 1.0, probability, 1.0, 1.0) } Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresFailureMechanismTest.cs =================================================================== diff -u -rcd4c32e6c897ceff2c5ae483e3bfb586ab9b6598 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresFailureMechanismTest.cs (.../HeightStructuresFailureMechanismTest.cs) (revision cd4c32e6c897ceff2c5ae483e3bfb586ab9b6598) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresFailureMechanismTest.cs (.../HeightStructuresFailureMechanismTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -25,6 +25,7 @@ using Rhino.Mocks; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; namespace Ringtoets.HeightStructures.Data.Test { @@ -110,9 +111,9 @@ Children = { new CalculationGroup(), - new HeightStructuresCalculation(), + new StructuresCalculation(), mocks.StrictMock(), - new HeightStructuresCalculation() + new StructuresCalculation() } } }; @@ -124,7 +125,7 @@ // Assert Assert.AreEqual(2, calculations.Count); - Assert.IsTrue(calculations.All(c => c is HeightStructuresCalculation)); + Assert.IsTrue(calculations.All(c => c is StructuresCalculation)); mocks.VerifyAll(); } } Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/Ringtoets.HeightStructures.Data.Test.csproj =================================================================== diff -u -r2b2da37541708b8ad95286e731010dd9d27d5070 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/Ringtoets.HeightStructures.Data.Test.csproj (.../Ringtoets.HeightStructures.Data.Test.csproj) (revision 2b2da37541708b8ad95286e731010dd9d27d5070) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/Ringtoets.HeightStructures.Data.Test.csproj (.../Ringtoets.HeightStructures.Data.Test.csproj) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -53,7 +53,6 @@ Properties\GlobalAssembly.cs - Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil.Test/TestHeightStructuresCalculationTest.cs =================================================================== diff -u -rc3c2bba57ff003c569aefa73e42ac6122fcf5bfa -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil.Test/TestHeightStructuresCalculationTest.cs (.../TestHeightStructuresCalculationTest.cs) (revision c3c2bba57ff003c569aefa73e42ac6122fcf5bfa) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil.Test/TestHeightStructuresCalculationTest.cs (.../TestHeightStructuresCalculationTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -20,6 +20,7 @@ // All rights reserved. using NUnit.Framework; +using Ringtoets.Common.Data.Structures; namespace Ringtoets.HeightStructures.Data.TestUtil.Test { @@ -33,7 +34,7 @@ var calculation = new TestHeightStructuresCalculation(); // Assert - Assert.IsInstanceOf(calculation); + Assert.IsInstanceOf>(calculation); Assert.AreEqual("Nieuwe berekening", calculation.Name); Assert.IsNotNull(calculation.InputParameters); Assert.IsNull(calculation.Comments); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil/TestHeightStructuresCalculation.cs =================================================================== diff -u -r589d56ba6dc9217ff4b68ea15df5a513576a25d1 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil/TestHeightStructuresCalculation.cs (.../TestHeightStructuresCalculation.cs) (revision 589d56ba6dc9217ff4b68ea15df5a513576a25d1) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil/TestHeightStructuresCalculation.cs (.../TestHeightStructuresCalculation.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -20,10 +20,11 @@ // All rights reserved. using Core.Common.Base.Data; +using Ringtoets.Common.Data.Structures; namespace Ringtoets.HeightStructures.Data.TestUtil { - public class TestHeightStructuresCalculation : HeightStructuresCalculation + public class TestHeightStructuresCalculation : StructuresCalculation { public TestHeightStructuresCalculation() { Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresCalculationContextTest.cs =================================================================== diff -u -rca23b1b155ca87c0aa4665fd919727570f31c781 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresCalculationContextTest.cs (.../HeightStructuresCalculationContextTest.cs) (revision ca23b1b155ca87c0aa4665fd919727570f31c781) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresCalculationContextTest.cs (.../HeightStructuresCalculationContextTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -22,6 +22,7 @@ using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.HeightStructures.Data; using Ringtoets.HeightStructures.Forms.PresentationObjects; @@ -39,15 +40,15 @@ var assessmentSectionMock = mocksRepository.Stub(); mocksRepository.ReplayAll(); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); var failureMechanism = new HeightStructuresFailureMechanism(); // Call var context = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); // Assert - Assert.IsInstanceOf>(context); - Assert.IsInstanceOf>(context); + Assert.IsInstanceOf, HeightStructuresFailureMechanism>>(context); + Assert.IsInstanceOf, HeightStructuresFailureMechanism>>(context); Assert.AreEqual(calculation, context.WrappedData); Assert.AreEqual(failureMechanism, context.FailureMechanism); Assert.AreEqual(assessmentSectionMock, context.AssessmentSection); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresInputContextTest.cs =================================================================== diff -u -r7823eab06c968c167d9d5b24a30acaa344478dc0 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresInputContextTest.cs (.../HeightStructuresInputContextTest.cs) (revision 7823eab06c968c167d9d5b24a30acaa344478dc0) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresInputContextTest.cs (.../HeightStructuresInputContextTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -22,6 +22,7 @@ using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.HeightStructures.Data; using Ringtoets.HeightStructures.Forms.PresentationObjects; @@ -40,7 +41,7 @@ var assessmentSectionMock = mocks.Stub(); mocks.ReplayAll(); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); var failureMechanism = new HeightStructuresFailureMechanism(); // Call @@ -50,7 +51,7 @@ assessmentSectionMock); // Assert - Assert.IsInstanceOf>(context); + Assert.IsInstanceOf, HeightStructuresFailureMechanism>>(context); Assert.AreSame(calculation.InputParameters, context.WrappedData); Assert.AreSame(calculation, context.Calculation); Assert.AreSame(failureMechanism, context.FailureMechanism); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresInputContextPropertiesTest.cs =================================================================== diff -u -r7823eab06c968c167d9d5b24a30acaa344478dc0 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresInputContextPropertiesTest.cs (.../HeightStructuresInputContextPropertiesTest.cs) (revision 7823eab06c968c167d9d5b24a30acaa344478dc0) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresInputContextPropertiesTest.cs (.../HeightStructuresInputContextPropertiesTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -33,6 +33,7 @@ using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.DikeProfiles; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Forms.Helpers; using Ringtoets.Common.Forms.PropertyClasses; @@ -80,7 +81,7 @@ var properties = new HeightStructuresInputContextProperties(); // Assert - Assert.IsInstanceOf>(properties); + Assert.IsInstanceOf, HeightStructuresFailureMechanism>>(properties); Assert.IsNull(properties.Data); } @@ -92,7 +93,7 @@ mockRepository.ReplayAll(); var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); var properties = new HeightStructuresInputContextProperties(); var inputContext = new HeightStructuresInputContext(calculation.InputParameters, @@ -154,7 +155,7 @@ new TestHeightStructure() } }; - var calculation = new HeightStructuresCalculation + var calculation = new StructuresCalculation { InputParameters = { @@ -219,7 +220,7 @@ mockRepository.ReplayAll(); var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); var input = calculation.InputParameters; input.Attach(observerMock); var inputContext = new HeightStructuresInputContext(input, @@ -269,7 +270,7 @@ mockRepository.ReplayAll(); var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); var inputContext = new HeightStructuresInputContext(calculation.InputParameters, calculation, failureMechanism, @@ -300,7 +301,7 @@ mockRepository.ReplayAll(); var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); var inputContext = new HeightStructuresInputContext(calculation.InputParameters, calculation, failureMechanism, @@ -329,7 +330,7 @@ mockRepository.ReplayAll(); var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); var inputContext = new HeightStructuresInputContext(calculation.InputParameters, calculation, failureMechanism, @@ -358,7 +359,7 @@ mockRepository.ReplayAll(); var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); var inputContext = new HeightStructuresInputContext(calculation.InputParameters, calculation, failureMechanism, Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -r8245c9add5586e4e544ab41195fb0af2b2a459e9 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationContextTreeNodeInfoTest.cs) (revision 8245c9add5586e4e544ab41195fb0af2b2a459e9) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationContextTreeNodeInfoTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -39,6 +39,7 @@ using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Probability; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.HeightStructures.Data; using Ringtoets.HeightStructures.Data.TestUtil; @@ -118,7 +119,7 @@ mocks.ReplayAll(); var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); var calculationContext = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSectionStub); // Call @@ -146,7 +147,7 @@ mocks.ReplayAll(); var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation = new HeightStructuresCalculation + var calculation = new StructuresCalculation { Output = new TestHeightStructuresOutput() }; @@ -178,7 +179,7 @@ var guiMock = mocks.StrictMock(); var failureMechanism = new HeightStructuresFailureMechanism(); var assessmentSectionStub = mocks.Stub(); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSectionStub); var menuBuilderMock = mocks.StrictMock(); @@ -217,7 +218,7 @@ var guiMock = mocks.StrictMock(); var failureMechanism = new HeightStructuresFailureMechanism(); var assessmentSectionStub = mocks.Stub(); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSectionStub); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); @@ -262,7 +263,7 @@ // Setup var failureMechanism = new HeightStructuresFailureMechanism(); var assessmentSectionStub = mocks.Stub(); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSectionStub); var guiMock = mocks.StrictMock(); @@ -302,7 +303,7 @@ var assessmentSectionStub = mocks.Stub(); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSectionStub); using (var treeViewControl = new TreeViewControl()) @@ -340,7 +341,7 @@ var assessmentSectionStub = mocks.Stub(); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSectionStub); using (var treeViewControl = new TreeViewControl()) @@ -389,7 +390,7 @@ var assessmentSectionStub = mocks.Stub(); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSectionStub); using (var treeViewControl = new TreeViewControl()) @@ -420,7 +421,7 @@ // Setup var failureMechanism = new HeightStructuresFailureMechanism(); var assessmentSectionStub = mocks.Stub(); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSectionStub); var guiMock = mocks.StrictMock(); @@ -460,7 +461,7 @@ var assessmentSectionStub = mocks.Stub(); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSectionStub); using (var treeViewControl = new TreeViewControl()) @@ -498,7 +499,7 @@ var assessmentSectionStub = mocks.Stub(); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSectionStub); using (var treeViewControl = new TreeViewControl()) @@ -547,7 +548,7 @@ var assessmentSectionStub = mocks.Stub(); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSectionStub); using (var treeViewControl = new TreeViewControl()) @@ -730,7 +731,7 @@ // Setup var group = new CalculationGroup(); var failureMechanism = new HeightStructuresFailureMechanism(); - var elementToBeRemoved = new HeightStructuresCalculation(); + var elementToBeRemoved = new StructuresCalculation(); var observerMock = mocks.StrictMock(); var assessmentSectionStub = mocks.Stub(); var calculationContext = new HeightStructuresCalculationContext(elementToBeRemoved, @@ -745,7 +746,7 @@ mocks.ReplayAll(); group.Children.Add(elementToBeRemoved); - group.Children.Add(new HeightStructuresCalculation()); + group.Children.Add(new StructuresCalculation()); group.Attach(observerMock); // Precondition @@ -766,7 +767,7 @@ // Setup var group = new CalculationGroup(); var failureMechanism = new HeightStructuresFailureMechanism(); - var elementToBeRemoved = new HeightStructuresCalculation(); + var elementToBeRemoved = new StructuresCalculation(); var assessmentSectionStub = mocks.Stub(); var calculationContext = new HeightStructuresCalculationContext(elementToBeRemoved, failureMechanism, Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -r176feef0b55aa8f7a7ebd229d7da1a679ce54303 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 176feef0b55aa8f7a7ebd229d7da1a679ce54303) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -38,6 +38,7 @@ using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.Helpers; using Ringtoets.HeightStructures.Data; using Ringtoets.HeightStructures.Data.TestUtil; @@ -141,7 +142,7 @@ var failureMechanism = new HeightStructuresFailureMechanism(); var group = new CalculationGroup(); var childGroup = new CalculationGroup(); - var childCalculation = new HeightStructuresCalculation(); + var childCalculation = new StructuresCalculation(); group.Children.Add(childGroup); group.Children.Add(calculationItemMock); @@ -414,7 +415,7 @@ { Children = { - new HeightStructuresCalculation() + new StructuresCalculation() } }; @@ -452,7 +453,7 @@ { Children = { - new HeightStructuresCalculation() + new StructuresCalculation() } }; @@ -461,7 +462,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionStub = mocks.Stub(); @@ -499,7 +500,7 @@ { Children = { - new HeightStructuresCalculation() + new StructuresCalculation() } }; @@ -508,7 +509,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionStub = mocks.Stub(); var nodeData = new HeightStructuresCalculationGroupContext(group, @@ -548,7 +549,7 @@ { Children = { - new HeightStructuresCalculation() + new StructuresCalculation() } }; @@ -565,7 +566,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionStub = mocks.Stub(); var nodeData = new HeightStructuresCalculationGroupContext(group, @@ -606,7 +607,7 @@ { Children = { - new HeightStructuresCalculation() + new StructuresCalculation() } }; @@ -644,7 +645,7 @@ { Children = { - new HeightStructuresCalculation() + new StructuresCalculation() } }; @@ -653,7 +654,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionStub = mocks.Stub(); @@ -691,7 +692,7 @@ { Children = { - new HeightStructuresCalculation() + new StructuresCalculation() } }; @@ -700,7 +701,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionStub = mocks.Stub(); var nodeData = new HeightStructuresCalculationGroupContext(group, @@ -740,7 +741,7 @@ { Children = { - new HeightStructuresCalculation() + new StructuresCalculation() } }; @@ -757,7 +758,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionStub = mocks.Stub(); var nodeData = new HeightStructuresCalculationGroupContext(group, @@ -1007,7 +1008,7 @@ var nodeData = new HeightStructuresCalculationGroupContext(group, failureMechanism, assessmentSectionStub); - var calculation = new HeightStructuresCalculation + var calculation = new StructuresCalculation { Name = "Nieuwe berekening" }; @@ -1035,7 +1036,7 @@ // Assert Assert.AreEqual(2, group.Children.Count); var newlyAddedItem = group.Children.Last(); - Assert.IsInstanceOf(newlyAddedItem); + Assert.IsInstanceOf>(newlyAddedItem); Assert.AreEqual("Nieuwe berekening (1)", newlyAddedItem.Name, "An item with the same name default name already exists, therefore '(1)' needs to be appended."); } @@ -1093,7 +1094,7 @@ contextMenu.Items[contextGenerateCalculationsIndexRootGroup].PerformClick(); // Then - var heightStructuresCalculations = failureMechanism.Calculations.OfType().ToArray(); + var heightStructuresCalculations = failureMechanism.Calculations.OfType>().ToArray(); Assert.AreEqual(1, heightStructuresCalculations.Length); Assert.AreSame(structure1, heightStructuresCalculations[0].InputParameters.Structure); } @@ -1151,7 +1152,7 @@ contextMenu.Items[contextGenerateCalculationsIndexRootGroup].PerformClick(); // Then - Assert.AreEqual(0, failureMechanism.Calculations.OfType().Count()); + Assert.AreEqual(0, failureMechanism.Calculations.OfType>().Count()); } } } @@ -1177,7 +1178,7 @@ { Children = { - new HeightStructuresCalculation + new StructuresCalculation { Name = existingCalculationName } @@ -1218,7 +1219,7 @@ contextMenu.Items[contextGenerateCalculationsIndexRootGroup].PerformClick(); // Then - var heightStructuresCalculations = failureMechanism.Calculations.OfType().ToArray(); + var heightStructuresCalculations = failureMechanism.Calculations.OfType>().ToArray(); Assert.AreEqual(2, heightStructuresCalculations.Length); Assert.AreEqual(expectedNewName, heightStructuresCalculations[1].Name); } @@ -1282,7 +1283,7 @@ new Point2D(0, 0) })); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); group.Children.Add(calculation); failureMechanism.SectionResults.First().Calculation = calculation; @@ -1308,7 +1309,7 @@ var parentNodeData = new HeightStructuresCalculationGroupContext(parentGroup, failureMechanism, assessmentSectionStub); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); observerMock.Expect(o => o.UpdateObserver()); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs =================================================================== diff -u -r176feef0b55aa8f7a7ebd229d7da1a679ce54303 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision 176feef0b55aa8f7a7ebd229d7da1a679ce54303) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -36,6 +36,7 @@ using Ringtoets.Common.Data; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.HeightStructures.Data; using Ringtoets.HeightStructures.Data.TestUtil; @@ -401,7 +402,7 @@ // Setup var guiMock = mocksRepository.StrictMock(); var failureMechanism = new HeightStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionMock = mocksRepository.StrictMock(); var nodeData = new HeightStructuresFailureMechanismContext(failureMechanism, assessmentSectionMock); @@ -439,7 +440,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionMock = mocksRepository.Stub(); @@ -477,7 +478,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionMock = mocksRepository.Stub(); assessmentSectionMock.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); @@ -517,7 +518,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); string validFilePath = Path.Combine(testDataPath, "complete.sqlite"); @@ -559,7 +560,7 @@ // Setup var guiMock = mocksRepository.StrictMock(); var failureMechanism = new HeightStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionMock = mocksRepository.StrictMock(); var nodeData = new HeightStructuresFailureMechanismContext(failureMechanism, assessmentSectionMock); @@ -597,7 +598,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionMock = mocksRepository.Stub(); @@ -635,7 +636,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionMock = mocksRepository.Stub(); assessmentSectionMock.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); @@ -675,7 +676,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); string validFilePath = Path.Combine(testDataPath, "complete.sqlite"); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresInputContextTreeNodeInfoTest.cs =================================================================== diff -u -r7823eab06c968c167d9d5b24a30acaa344478dc0 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresInputContextTreeNodeInfoTest.cs (.../HeightStructuresInputContextTreeNodeInfoTest.cs) (revision 7823eab06c968c167d9d5b24a30acaa344478dc0) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresInputContextTreeNodeInfoTest.cs (.../HeightStructuresInputContextTreeNodeInfoTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -27,6 +27,7 @@ using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.Structures; using Ringtoets.HeightStructures.Data; using Ringtoets.HeightStructures.Forms.PresentationObjects; using Ringtoets.HeightStructures.Plugin; @@ -91,7 +92,7 @@ var assessmentSectionStub = mocksRepository.Stub(); mocksRepository.ReplayAll(); - var heightStructuresCalculation = new HeightStructuresCalculation(); + var heightStructuresCalculation = new StructuresCalculation(); var heightStructuresInputContext = new HeightStructuresInputContext( heightStructuresCalculation.InputParameters, heightStructuresCalculation, @@ -112,7 +113,7 @@ var assessmentSectionStub = mocksRepository.Stub(); mocksRepository.ReplayAll(); - var heightStructuresCalculation = new HeightStructuresCalculation(); + var heightStructuresCalculation = new StructuresCalculation(); var heightStructuresInputContext = new HeightStructuresInputContext( heightStructuresCalculation.InputParameters, heightStructuresCalculation, Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresScenarioRowTest.cs =================================================================== diff -u -rc899b9042ee83f3ac6d6213515d7edacfbe8c414 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresScenarioRowTest.cs (.../HeightStructuresScenarioRowTest.cs) (revision c899b9042ee83f3ac6d6213515d7edacfbe8c414) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresScenarioRowTest.cs (.../HeightStructuresScenarioRowTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -25,6 +25,7 @@ using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms; using Ringtoets.HeightStructures.Data; using Ringtoets.HeightStructures.Forms.Views; @@ -51,7 +52,7 @@ // Assert Assert.AreSame(sectionResult.Section.Name, row.Name); Assert.AreSame(sectionResult.Calculation, row.Calculation); - Assert.IsInstanceOf>(row); + Assert.IsInstanceOf>>(row); } [Test] @@ -78,7 +79,7 @@ var row = new HeightStructuresScenarioRow(sectionResult); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); // Call row.Calculation = calculation; @@ -107,7 +108,7 @@ var row = new HeightStructuresScenarioRow(sectionResult); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); // Call row.Calculation = calculation; Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresScenariosViewTest.cs =================================================================== diff -u -rc899b9042ee83f3ac6d6213515d7edacfbe8c414 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresScenariosViewTest.cs (.../HeightStructuresScenariosViewTest.cs) (revision c899b9042ee83f3ac6d6213515d7edacfbe8c414) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresScenariosViewTest.cs (.../HeightStructuresScenariosViewTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -29,6 +29,7 @@ using NUnit.Framework; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms; using Ringtoets.HeightStructures.Data; using Ringtoets.HeightStructures.Data.TestUtil; @@ -249,8 +250,8 @@ view.Data = failureMechanism.CalculationsGroup; view.FailureMechanism = failureMechanism; - var calculationA = (HeightStructuresCalculation) failureMechanism.CalculationsGroup.Children[0]; - var calculationB = (HeightStructuresCalculation) failureMechanism.CalculationsGroup.Children[1]; + var calculationA = (StructuresCalculation)failureMechanism.CalculationsGroup.Children[0]; + var calculationB = (StructuresCalculation)failureMechanism.CalculationsGroup.Children[1]; calculationA.InputParameters.Structure = calculationB.InputParameters.Structure; @@ -284,8 +285,8 @@ view.Data = failureMechanism.CalculationsGroup; view.FailureMechanism = failureMechanism; - var calculationB = ((HeightStructuresCalculation) failureMechanism.CalculationsGroup.Children[1]); - var calculationC = new HeightStructuresCalculation + var calculationB = ((StructuresCalculation)failureMechanism.CalculationsGroup.Children[1]); + var calculationC = new StructuresCalculation { Name = "CalculationC" }; @@ -347,15 +348,15 @@ var failureMechanism = new HeightStructuresFailureMechanism(); var matchingPointA = new Point2D(0, 0); var matchingPointB = new Point2D(20, 20); - var calculationA = new HeightStructuresCalculation + var calculationA = new StructuresCalculation { Name = "CalculationA", InputParameters = { Structure = new TestHeightStructure(matchingPointA) } }; - var calculationB = new HeightStructuresCalculation + var calculationB = new StructuresCalculation { Name = "CalculationB", InputParameters = Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Integration.Test/HeightStructuresCalculationActivityIntegrationTest.cs =================================================================== diff -u -r1a6804681b0758a5761e39099e4b6de65f9cf4a2 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Integration.Test/HeightStructuresCalculationActivityIntegrationTest.cs (.../HeightStructuresCalculationActivityIntegrationTest.cs) (revision 1a6804681b0758a5761e39099e4b6de65f9cf4a2) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Integration.Test/HeightStructuresCalculationActivityIntegrationTest.cs (.../HeightStructuresCalculationActivityIntegrationTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -32,6 +32,7 @@ using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.IO.FileImporters; using Ringtoets.HeightStructures.Data; using Ringtoets.HeightStructures.Data.TestUtil; @@ -66,7 +67,7 @@ new Point2D(1, 1) })); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); var activity = new HeightStructuresCalculationActivity(calculation, "", failureMechanism, assessmentSection); @@ -104,7 +105,7 @@ new Point2D(1, 1) })); - var calculation = new HeightStructuresCalculation() + var calculation = new StructuresCalculation() { InputParameters = { @@ -149,7 +150,7 @@ new Point2D(1, 1) })); - var calculation = new HeightStructuresCalculation() + var calculation = new StructuresCalculation() { InputParameters = { @@ -648,7 +649,7 @@ new Point2D(1, 1) })); - var calculation = new HeightStructuresCalculation + var calculation = new StructuresCalculation { InputParameters = { Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Integration.Test/HeightStructuresScenariosViewIntegrationTest.cs =================================================================== diff -u -rba2eefab3569d05ed59629b5d02dc8420bc1163a -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Integration.Test/HeightStructuresScenariosViewIntegrationTest.cs (.../HeightStructuresScenariosViewIntegrationTest.cs) (revision ba2eefab3569d05ed59629b5d02dc8420bc1163a) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Integration.Test/HeightStructuresScenariosViewIntegrationTest.cs (.../HeightStructuresScenariosViewIntegrationTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -27,6 +27,7 @@ using NUnit.Framework; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Calculation; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.Helpers; using Ringtoets.HeightStructures.Data; using Ringtoets.HeightStructures.Forms.Views; @@ -105,7 +106,7 @@ // Call foreach (var structure in assessmentSection.HeightStructures.HeightStructures) { - calculationsGroup.Children.Add(new HeightStructuresCalculation + calculationsGroup.Children.Add(new StructuresCalculation { Name = NamingHelper.GetUniqueName(((CalculationGroup) view.Data).Children, structure.Name, c => c.Name), InputParameters = @@ -152,7 +153,7 @@ foreach (var structure in assessmentSection.HeightStructures.HeightStructures) { - calculationsGroup.Children.Add(new HeightStructuresCalculation + calculationsGroup.Children.Add(new StructuresCalculation { Name = NamingHelper.GetUniqueName(calculationsGroup.Children, structure.Name, c => c.Name), InputParameters = @@ -166,7 +167,7 @@ // Call foreach (var calculationBase in calculationsGroup.Children) { - var calculation = (HeightStructuresCalculation) calculationBase; + var calculation = (StructuresCalculation)calculationBase; calculation.Name += "_changed"; } @@ -204,7 +205,7 @@ foreach (var structure in assessmentSection.HeightStructures.HeightStructures) { - assessmentSection.HeightStructures.CalculationsGroup.Children.Add(new HeightStructuresCalculation + assessmentSection.HeightStructures.CalculationsGroup.Children.Add(new StructuresCalculation { Name = NamingHelper.GetUniqueName(assessmentSection.HeightStructures.CalculationsGroup.Children, structure.Name + "Calculation", c => c.Name), InputParameters = @@ -216,8 +217,8 @@ // Call var calculationsGroup = assessmentSection.HeightStructures.CalculationsGroup; - ((HeightStructuresCalculation) calculationsGroup.Children[1]).InputParameters.Structure = - ((HeightStructuresCalculation) calculationsGroup.Children[0]).InputParameters.Structure; + ((StructuresCalculation)calculationsGroup.Children[1]).InputParameters.Structure = + ((StructuresCalculation)calculationsGroup.Children[0]).InputParameters.Structure; calculationsGroup.NotifyObservers(); // Assert Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationActivityTest.cs =================================================================== diff -u -rf109332b5185b4445e2f1b9386dc1fe4063ff20f -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationActivityTest.cs (.../HeightStructuresCalculationActivityTest.cs) (revision f109332b5185b4445e2f1b9386dc1fe4063ff20f) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationActivityTest.cs (.../HeightStructuresCalculationActivityTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -24,6 +24,7 @@ using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.Structures; using Ringtoets.HeightStructures.Data; namespace Ringtoets.HeightStructures.Service.Test @@ -40,7 +41,7 @@ mocks.ReplayAll(); var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); // Call var activity = new HeightStructuresCalculationActivity(calculation, "", failureMechanism, assessmentSectionMock); @@ -82,7 +83,7 @@ mocks.ReplayAll(); var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); // Call TestDelegate call = () => new HeightStructuresCalculationActivity(calculation, null, failureMechanism, assessmentSectionMock); @@ -101,7 +102,7 @@ var assessmentSectionMock = mocks.StrictMock(); mocks.ReplayAll(); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); // Call TestDelegate call = () => new HeightStructuresCalculationActivity(calculation, "", null, assessmentSectionMock); @@ -117,7 +118,7 @@ { // Setup var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); // Call TestDelegate call = () => new HeightStructuresCalculationActivity(calculation, "", failureMechanism, null); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationServiceTest.cs =================================================================== diff -u -r1a6804681b0758a5761e39099e4b6de65f9cf4a2 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationServiceTest.cs (.../HeightStructuresCalculationServiceTest.cs) (revision 1a6804681b0758a5761e39099e4b6de65f9cf4a2) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationServiceTest.cs (.../HeightStructuresCalculationServiceTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -32,6 +32,7 @@ using Ringtoets.Common.Data.Contribution; using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.HeightStructures.Data; using Ringtoets.HeightStructures.Data.TestUtil; using Ringtoets.HydraRing.Calculation.Calculator.Factory; @@ -60,7 +61,7 @@ const string name = ""; - HeightStructuresCalculation calculation = new HeightStructuresCalculation + var calculation = new StructuresCalculation { Name = name, InputParameters = @@ -100,7 +101,7 @@ const string name = ""; - HeightStructuresCalculation calculation = new HeightStructuresCalculation + var calculation = new StructuresCalculation { Name = name, InputParameters = @@ -139,7 +140,7 @@ const string name = ""; - HeightStructuresCalculation calculation = new TestHeightStructuresCalculation() + var calculation = new TestHeightStructuresCalculation() { Name = name, InputParameters = @@ -456,7 +457,7 @@ const string name = ""; - HeightStructuresCalculation calculation = new TestHeightStructuresCalculation() + var calculation = new TestHeightStructuresCalculation() { Name = name, InputParameters = @@ -547,7 +548,7 @@ new Point2D(1, 1) })); - var calculation = new HeightStructuresCalculation + var calculation = new StructuresCalculation { InputParameters = { @@ -611,7 +612,7 @@ new Point2D(1, 1) })); - HeightStructuresCalculation calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculation { InputParameters = { @@ -697,7 +698,7 @@ new Point2D(1, 1) })); - HeightStructuresCalculation calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculation { InputParameters = { Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresDataSynchronizationServiceTest.cs =================================================================== diff -u -rfbdcde760eb5401367c8b922504819cd263d58a2 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresDataSynchronizationServiceTest.cs (.../HeightStructuresDataSynchronizationServiceTest.cs) (revision fbdcde760eb5401367c8b922504819cd263d58a2) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresDataSynchronizationServiceTest.cs (.../HeightStructuresDataSynchronizationServiceTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -24,6 +24,7 @@ using System.Linq; using NUnit.Framework; using Ringtoets.Common.Data.Probability; +using Ringtoets.Common.Data.Structures; using Ringtoets.HeightStructures.Data; using Ringtoets.HydraRing.Data; @@ -48,27 +49,27 @@ { // Setup var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation1 = new HeightStructuresCalculation + var calculation1 = new StructuresCalculation { Output = new ProbabilityAssessmentOutput(0, 0, 0, 0, 0) }; - var calculation2 = new HeightStructuresCalculation + var calculation2 = new StructuresCalculation { Output = new ProbabilityAssessmentOutput(0, 0, 0, 0, 0) }; - var calculation3 = new HeightStructuresCalculation(); + var calculation3 = new StructuresCalculation(); failureMechanism.CalculationsGroup.Children.Add(calculation1); failureMechanism.CalculationsGroup.Children.Add(calculation2); failureMechanism.CalculationsGroup.Children.Add(calculation3); // Call - IEnumerable affectedItems = HeightStructuresDataSynchronizationService.ClearAllCalculationOutput(failureMechanism); + IEnumerable> affectedItems = HeightStructuresDataSynchronizationService.ClearAllCalculationOutput(failureMechanism); // Assert - foreach (HeightStructuresCalculation calculation in failureMechanism.CalculationsGroup.Children.Cast()) + foreach (StructuresCalculation calculation in failureMechanism.CalculationsGroup.Children.Cast>()) { Assert.IsNull(calculation.Output); } @@ -94,7 +95,7 @@ public void ClearCalculationOutput_WithCalculation_ClearsOutput() { // Setup - var calculation = new HeightStructuresCalculation + var calculation = new StructuresCalculation { Output = new ProbabilityAssessmentOutput(0, 0, 0, 0, 0) }; @@ -124,33 +125,33 @@ var failureMechanism = new HeightStructuresFailureMechanism(); var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, string.Empty, 0, 0); - var calculation1 = new HeightStructuresCalculation + var calculation1 = new StructuresCalculation { InputParameters = { HydraulicBoundaryLocation = hydraulicBoundaryLocation } }; - var calculation2 = new HeightStructuresCalculation + var calculation2 = new StructuresCalculation { InputParameters = { HydraulicBoundaryLocation = hydraulicBoundaryLocation } }; - var calculation3 = new HeightStructuresCalculation(); + var calculation3 = new StructuresCalculation(); failureMechanism.CalculationsGroup.Children.Add(calculation1); failureMechanism.CalculationsGroup.Children.Add(calculation2); failureMechanism.CalculationsGroup.Children.Add(calculation3); // Call - IEnumerable affectedItems = HeightStructuresDataSynchronizationService.ClearHydraulicBoundaryLocations(failureMechanism); + IEnumerable> affectedItems = HeightStructuresDataSynchronizationService.ClearHydraulicBoundaryLocations(failureMechanism); // Assert - foreach (HeightStructuresCalculation calculation in failureMechanism.CalculationsGroup.Children.Cast()) + foreach (StructuresCalculation calculation in failureMechanism.CalculationsGroup.Children.Cast>()) { Assert.IsNull(calculation.InputParameters.HydraulicBoundaryLocation); } @@ -179,7 +180,7 @@ var failureMechanism = new HeightStructuresFailureMechanism(); var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, string.Empty, 0, 0); - var calculation1 = new HeightStructuresCalculation + var calculation1 = new StructuresCalculation { InputParameters = { @@ -188,7 +189,7 @@ Output = new ProbabilityAssessmentOutput(0, 0, 0, 0, 0) }; - var calculation2 = new HeightStructuresCalculation + var calculation2 = new StructuresCalculation { InputParameters = { @@ -197,17 +198,17 @@ Output = new ProbabilityAssessmentOutput(0, 0, 0, 0, 0) }; - var calculation3 = new HeightStructuresCalculation(); + var calculation3 = new StructuresCalculation(); failureMechanism.CalculationsGroup.Children.Add(calculation1); failureMechanism.CalculationsGroup.Children.Add(calculation2); failureMechanism.CalculationsGroup.Children.Add(calculation3); // Call - IEnumerable affectedItems = HeightStructuresDataSynchronizationService.ClearAllCalculationOutputAndHydraulicBoundaryLocations(failureMechanism); + IEnumerable> affectedItems = HeightStructuresDataSynchronizationService.ClearAllCalculationOutputAndHydraulicBoundaryLocations(failureMechanism); // Assert - foreach (HeightStructuresCalculation calculation in failureMechanism.CalculationsGroup.Children.Cast()) + foreach (StructuresCalculation calculation in failureMechanism.CalculationsGroup.Children.Cast>()) { Assert.IsNull(calculation.InputParameters.HydraulicBoundaryLocation); Assert.IsNull(calculation.Output); @@ -226,33 +227,33 @@ var failureMechanism = new HeightStructuresFailureMechanism(); var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, string.Empty, 0, 0); - var calculation1 = new HeightStructuresCalculation + var calculation1 = new StructuresCalculation { InputParameters = { HydraulicBoundaryLocation = hydraulicBoundaryLocation } }; - var calculation2 = new HeightStructuresCalculation + var calculation2 = new StructuresCalculation { InputParameters = { HydraulicBoundaryLocation = hydraulicBoundaryLocation } }; - var calculation3 = new HeightStructuresCalculation(); + var calculation3 = new StructuresCalculation(); failureMechanism.CalculationsGroup.Children.Add(calculation1); failureMechanism.CalculationsGroup.Children.Add(calculation2); failureMechanism.CalculationsGroup.Children.Add(calculation3); // Call - IEnumerable affectedItems = HeightStructuresDataSynchronizationService.ClearAllCalculationOutputAndHydraulicBoundaryLocations(failureMechanism); + IEnumerable> affectedItems = HeightStructuresDataSynchronizationService.ClearAllCalculationOutputAndHydraulicBoundaryLocations(failureMechanism); // Assert - foreach (HeightStructuresCalculation calculation in failureMechanism.CalculationsGroup.Children.Cast()) + foreach (StructuresCalculation calculation in failureMechanism.CalculationsGroup.Children.Cast>()) { Assert.IsNull(calculation.InputParameters.HydraulicBoundaryLocation); } @@ -269,27 +270,27 @@ // Setup var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation1 = new HeightStructuresCalculation + var calculation1 = new StructuresCalculation { Output = new ProbabilityAssessmentOutput(0, 0, 0, 0, 0) }; - var calculation2 = new HeightStructuresCalculation + var calculation2 = new StructuresCalculation { Output = new ProbabilityAssessmentOutput(0, 0, 0, 0, 0) }; - var calculation3 = new HeightStructuresCalculation(); + var calculation3 = new StructuresCalculation(); failureMechanism.CalculationsGroup.Children.Add(calculation1); failureMechanism.CalculationsGroup.Children.Add(calculation2); failureMechanism.CalculationsGroup.Children.Add(calculation3); // Call - IEnumerable affectedItems = HeightStructuresDataSynchronizationService.ClearAllCalculationOutputAndHydraulicBoundaryLocations(failureMechanism); + IEnumerable> affectedItems = HeightStructuresDataSynchronizationService.ClearAllCalculationOutputAndHydraulicBoundaryLocations(failureMechanism); // Assert - foreach (HeightStructuresCalculation calculation in failureMechanism.CalculationsGroup.Children.Cast()) + foreach (StructuresCalculation calculation in failureMechanism.CalculationsGroup.Children.Cast>()) { Assert.IsNull(calculation.Output); } @@ -306,16 +307,16 @@ // Setup var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation1 = new HeightStructuresCalculation(); - var calculation2 = new HeightStructuresCalculation(); - var calculation3 = new HeightStructuresCalculation(); + var calculation1 = new StructuresCalculation(); + var calculation2 = new StructuresCalculation(); + var calculation3 = new StructuresCalculation(); failureMechanism.CalculationsGroup.Children.Add(calculation1); failureMechanism.CalculationsGroup.Children.Add(calculation2); failureMechanism.CalculationsGroup.Children.Add(calculation3); // Call - IEnumerable affectedItems = HeightStructuresDataSynchronizationService.ClearAllCalculationOutputAndHydraulicBoundaryLocations(failureMechanism); + IEnumerable> affectedItems = HeightStructuresDataSynchronizationService.ClearAllCalculationOutputAndHydraulicBoundaryLocations(failureMechanism); // Assert CollectionAssert.IsEmpty(affectedItems); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Utils.Test/HeightStructuresHelperTest.cs =================================================================== diff -u -r53785e0fd2752f08a43b649e0c4cd56955ec374d -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Utils.Test/HeightStructuresHelperTest.cs (.../HeightStructuresHelperTest.cs) (revision 53785e0fd2752f08a43b649e0c4cd56955ec374d) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Utils.Test/HeightStructuresHelperTest.cs (.../HeightStructuresHelperTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -26,6 +26,7 @@ using Core.Common.TestUtil; using NUnit.Framework; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.HeightStructures.Data; using Ringtoets.HeightStructures.Data.TestUtil; @@ -43,7 +44,7 @@ // Call TestDelegate test = () => HeightStructuresHelper.CollectCalculationsPerSection( null, - new HeightStructuresCalculation[] + new StructuresCalculation[] { null }); @@ -92,7 +93,7 @@ // Call TestDelegate test = () => HeightStructuresHelper.CollectCalculationsPerSection( twoSections, - new HeightStructuresCalculation[] + new StructuresCalculation[] { null }); @@ -145,7 +146,7 @@ public void FailureMechanismSectionForCalculation_ValidSectionWithoutCalculationStructureSet_ReturnsNull() { // Setup - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); // Call FailureMechanismSection failureMechanismSection = @@ -160,7 +161,7 @@ { // Setup var emptySections = new FailureMechanismSection[0]; - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); // Call FailureMechanismSection failureMechanismSection = @@ -326,7 +327,7 @@ sectionResult }, calculationInSectionA, - new HeightStructuresCalculation[] + new StructuresCalculation[] { null }); @@ -353,7 +354,7 @@ failureMechanismSectionResult }, calculationInSectionA, - Enumerable.Empty()); + Enumerable.Empty>()); // Assert Assert.IsNull(failureMechanismSectionResult.Calculation); @@ -413,15 +414,15 @@ failureMechanismSectionB }; - private readonly HeightStructuresCalculation calculationInSectionA = new HeightStructuresCalculation + private readonly StructuresCalculation calculationInSectionA = new StructuresCalculation { InputParameters = { Structure = new TestHeightStructure(new Point2D(1.1, 2.2)) } }; - private readonly HeightStructuresCalculation calculationInSectionB = new HeightStructuresCalculation + private readonly StructuresCalculation calculationInSectionB = new StructuresCalculation { InputParameters = { Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/FailureMechanismContributionViewIntegrationTest.cs =================================================================== diff -u -rce190360da30edf73fb464cc0fea1d9a795aa5d4 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/FailureMechanismContributionViewIntegrationTest.cs (.../FailureMechanismContributionViewIntegrationTest.cs) (revision ce190360da30edf73fb464cc0fea1d9a795aa5d4) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/FailureMechanismContributionViewIntegrationTest.cs (.../FailureMechanismContributionViewIntegrationTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -31,6 +31,7 @@ using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Contribution; using Ringtoets.Common.Data.Probability; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Data.TestUtil; using Ringtoets.GrassCoverErosionInwards.Data; using Ringtoets.HeightStructures.Data; @@ -91,8 +92,8 @@ { Output = new GrassCoverErosionInwardsOutput(0, false, new ProbabilityAssessmentOutput(0, 0, 0, 0, 0), 0) }; - var emptyHeightStructuresCalculation = new HeightStructuresCalculation(); - var heightStructuresCalculation = new HeightStructuresCalculation + var emptyHeightStructuresCalculation = new StructuresCalculation(); + var heightStructuresCalculation = new StructuresCalculation { Output = new ProbabilityAssessmentOutput(0, 0, 0, 0, 0) }; @@ -203,7 +204,7 @@ PipingCalculation emptyPipingCalculation = new PipingCalculation(new GeneralPipingInput()); GrassCoverErosionInwardsCalculation emptyGrassCoverErosionInwardsCalculation = new GrassCoverErosionInwardsCalculation(); - HeightStructuresCalculation emptyHeightStructuresCalculation = new HeightStructuresCalculation(); + var emptyHeightStructuresCalculation = new StructuresCalculation(); assessmentSection.PipingFailureMechanism.CalculationsGroup.Children.Add(emptyPipingCalculation); assessmentSection.GrassCoverErosionInwards.CalculationsGroup.Children.Add(emptyGrassCoverErosionInwardsCalculation); @@ -282,8 +283,8 @@ { Output = new GrassCoverErosionInwardsOutput(0, false, new ProbabilityAssessmentOutput(0, 0, 0, 0, 0), 0) }; - HeightStructuresCalculation emptyHeightStructuresCalculation = new HeightStructuresCalculation(); - HeightStructuresCalculation heightStructuresCalculation = new HeightStructuresCalculation + var emptyHeightStructuresCalculation = new StructuresCalculation(); + var heightStructuresCalculation = new StructuresCalculation { Output = new ProbabilityAssessmentOutput(0, 0, 0, 0, 0) }; @@ -369,8 +370,8 @@ { Output = new GrassCoverErosionInwardsOutput(0, false, new ProbabilityAssessmentOutput(0, 0, 0, 0, 0), 0) }; - HeightStructuresCalculation emptyHeightStructuresCalculation = new HeightStructuresCalculation(); - HeightStructuresCalculation heightStructuresCalculation = new HeightStructuresCalculation + var emptyHeightStructuresCalculation = new StructuresCalculation(); + var heightStructuresCalculation = new StructuresCalculation { Output = new ProbabilityAssessmentOutput(0, 0, 0, 0, 0) }; @@ -451,7 +452,7 @@ PipingCalculation emptyPipingCalculation = new PipingCalculation(new GeneralPipingInput()); GrassCoverErosionInwardsCalculation emptyGrassCoverErosionInwardsCalculation = new GrassCoverErosionInwardsCalculation(); - HeightStructuresCalculation emptyHeightStructuresCalculation = new HeightStructuresCalculation(); + var emptyHeightStructuresCalculation = new StructuresCalculation(); assessmentSection.PipingFailureMechanism.CalculationsGroup.Children.Add(emptyPipingCalculation); assessmentSection.GrassCoverErosionInwards.CalculationsGroup.Children.Add(emptyGrassCoverErosionInwardsCalculation); @@ -507,7 +508,7 @@ PipingCalculation emptyPipingCalculation = new PipingCalculation(new GeneralPipingInput()); GrassCoverErosionInwardsCalculation emptyGrassCoverErosionInwardsCalculation = new GrassCoverErosionInwardsCalculation(); - HeightStructuresCalculation emptyHeightStructuresCalculation = new HeightStructuresCalculation(); + var emptyHeightStructuresCalculation = new StructuresCalculation(); assessmentSection.PipingFailureMechanism.CalculationsGroup.Children.Add(emptyPipingCalculation); assessmentSection.GrassCoverErosionInwards.CalculationsGroup.Children.Add(emptyGrassCoverErosionInwardsCalculation); Index: Ringtoets/Integration/test/Ringtoets.Integration.Service.Test/RingtoetsDataSynchronizationServiceTest.cs =================================================================== diff -u -r2973c5f790a5131e427bd5f73e2a620044199639 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/Integration/test/Ringtoets.Integration.Service.Test/RingtoetsDataSynchronizationServiceTest.cs (.../RingtoetsDataSynchronizationServiceTest.cs) (revision 2973c5f790a5131e427bd5f73e2a620044199639) +++ Ringtoets/Integration/test/Ringtoets.Integration.Service.Test/RingtoetsDataSynchronizationServiceTest.cs (.../RingtoetsDataSynchronizationServiceTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -28,6 +28,7 @@ using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.Probability; +using Ringtoets.Common.Data.Structures; using Ringtoets.GrassCoverErosionInwards.Data; using Ringtoets.GrassCoverErosionOutwards.Data; using Ringtoets.HeightStructures.Data; @@ -73,8 +74,8 @@ Output = new GrassCoverErosionInwardsOutput(0, false, new ProbabilityAssessmentOutput(0, 0, 0, 0, 0), 0) }; - var emptyHeightStructuresCalculation = new HeightStructuresCalculation(); - var heightStructuresCalculation = new HeightStructuresCalculation + var emptyHeightStructuresCalculation = new StructuresCalculation(); + var heightStructuresCalculation = new StructuresCalculation { Output = new ProbabilityAssessmentOutput(0, 0, 0, 0, 0) }; @@ -186,12 +187,12 @@ { // Setup var failureMechanism1 = new HeightStructuresFailureMechanism(); - failureMechanism1.CalculationsGroup.Children.Add(new HeightStructuresCalculation + failureMechanism1.CalculationsGroup.Children.Add(new StructuresCalculation { Output = new ProbabilityAssessmentOutput(0, 0, 0, 0, 0) }); var failureMechanism2 = new HeightStructuresFailureMechanism(); - failureMechanism2.CalculationsGroup.Children.Add(new HeightStructuresCalculation + failureMechanism2.CalculationsGroup.Children.Add(new StructuresCalculation { Output = new ProbabilityAssessmentOutput(0, 0, 0, 0, 0) }); @@ -209,8 +210,8 @@ IEnumerable affectedItems = RingtoetsDataSynchronizationService.ClearFailureMechanismCalculationOutputs(assessmentSection); // Assert - HeightStructuresCalculation calculation1 = (HeightStructuresCalculation) failureMechanism1.CalculationsGroup.Children[0]; - HeightStructuresCalculation calculation2 = (HeightStructuresCalculation) failureMechanism2.CalculationsGroup.Children[0]; + StructuresCalculation calculation1 = (StructuresCalculation)failureMechanism1.CalculationsGroup.Children[0]; + StructuresCalculation calculation2 = (StructuresCalculation)failureMechanism2.CalculationsGroup.Children[0]; Assert.IsNull(calculation1.Output); Assert.IsNull(calculation2.Output); CollectionAssert.AreEqual(new[] @@ -259,8 +260,8 @@ Output = new GrassCoverErosionInwardsOutput(0, false, new ProbabilityAssessmentOutput(0, 0, 0, 0, 0), 0) }; - var emptyHeightStructuresCalculation = new HeightStructuresCalculation(); - var heightStructuresCalculation = new HeightStructuresCalculation + var emptyHeightStructuresCalculation = new StructuresCalculation(); + var heightStructuresCalculation = new StructuresCalculation { InputParameters = { @@ -365,8 +366,8 @@ } }; - var emptyHeightStructuresCalculation = new HeightStructuresCalculation(); - var heightStructuresCalculation = new HeightStructuresCalculation + var emptyHeightStructuresCalculation = new StructuresCalculation(); + var heightStructuresCalculation = new StructuresCalculation { InputParameters = { @@ -453,8 +454,8 @@ Output = new GrassCoverErosionInwardsOutput(0, false, new ProbabilityAssessmentOutput(0, 0, 0, 0, 0), 0) }; - var emptyHeightStructuresCalculation = new HeightStructuresCalculation(); - var heightStructuresCalculation = new HeightStructuresCalculation + var emptyHeightStructuresCalculation = new StructuresCalculation(); + var heightStructuresCalculation = new StructuresCalculation { Output = new ProbabilityAssessmentOutput(0, 0, 0, 0, 0) }; @@ -519,7 +520,7 @@ var emptyPipingCalculation = new PipingCalculation(new GeneralPipingInput()); var emptyGrassCoverErosionInwardsCalculation = new GrassCoverErosionInwardsCalculation(); - var emptyHeightStructuresCalculation = new HeightStructuresCalculation(); + var emptyHeightStructuresCalculation = new StructuresCalculation(); var emptyStabilityStoneCoverWaveConditionsCalculation = new StabilityStoneCoverWaveConditionsCalculation(); var emptyGrassCoverErosionOutwardsCalculation = new GrassCoverErosionOutwardsWaveConditionsCalculation(); var emptyWaveImpactAshpaltCoverWaveConditionsCalculation = new WaveImpactAsphaltCoverWaveConditionsCalculation(); Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/Ringtoets.StabilityPointStructures.Data.csproj =================================================================== diff -u -r2b2da37541708b8ad95286e731010dd9d27d5070 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/Ringtoets.StabilityPointStructures.Data.csproj (.../Ringtoets.StabilityPointStructures.Data.csproj) (revision 2b2da37541708b8ad95286e731010dd9d27d5070) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/Ringtoets.StabilityPointStructures.Data.csproj (.../Ringtoets.StabilityPointStructures.Data.csproj) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -48,7 +48,6 @@ Resources.resx - Fisheye: Tag ab20c4eb4ca81bd3845d50210d2bdb301177af6a refers to a dead (removed) revision in file `Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/StabilityPointStructuresCalculation.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/StabilityPointStructuresFailureMechanism.cs =================================================================== diff -u -r2efa0fbe22fee2482e1583a7d6f5ccfdf168f660 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/StabilityPointStructuresFailureMechanism.cs (.../StabilityPointStructuresFailureMechanism.cs) (revision 2efa0fbe22fee2482e1583a7d6f5ccfdf168f660) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/StabilityPointStructuresFailureMechanism.cs (.../StabilityPointStructuresFailureMechanism.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -25,6 +25,7 @@ using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.StabilityPointStructures.Data.Properties; using RingtoetsCommonDataResources = Ringtoets.Common.Data.Properties.Resources; @@ -55,7 +56,7 @@ { get { - return CalculationsGroup.GetCalculations().OfType(); + return CalculationsGroup.GetCalculations().OfType>(); } } Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresCalculationContext.cs =================================================================== diff -u -rca23b1b155ca87c0aa4665fd919727570f31c781 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresCalculationContext.cs (.../StabilityPointStructuresCalculationContext.cs) (revision ca23b1b155ca87c0aa4665fd919727570f31c781) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresCalculationContext.cs (.../StabilityPointStructuresCalculationContext.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -21,26 +21,27 @@ using System; using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.StabilityPointStructures.Data; namespace Ringtoets.StabilityPointStructures.Forms.PresentationObjects { /// - /// Presentation object for all data required to configure an instance of + /// Presentation object for all data required to configure an instance of /// in order to prepare it for performing a calculation. /// - public class StabilityPointStructuresCalculationContext : FailureMechanismItemContextBase, - ICalculationContext + public class StabilityPointStructuresCalculationContext : FailureMechanismItemContextBase, StabilityPointStructuresFailureMechanism>, + ICalculationContext, StabilityPointStructuresFailureMechanism> { /// /// Creates a new instance of . /// - /// The instance wrapped by this context object. + /// The instance wrapped by this context object. /// The failure mechanism which the context belongs to. /// The assessment section which the calculation belongs to. /// When any input argument is null. - public StabilityPointStructuresCalculationContext(StabilityPointStructuresCalculation calculation, + public StabilityPointStructuresCalculationContext(StructuresCalculation calculation, StabilityPointStructuresFailureMechanism failureMechanism, IAssessmentSection assessmentSection) : base(calculation, failureMechanism, assessmentSection) {} Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresInputContext.cs =================================================================== diff -u -rca23b1b155ca87c0aa4665fd919727570f31c781 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresInputContext.cs (.../StabilityPointStructuresInputContext.cs) (revision ca23b1b155ca87c0aa4665fd919727570f31c781) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresInputContext.cs (.../StabilityPointStructuresInputContext.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -21,6 +21,7 @@ using System; using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.StabilityPointStructures.Data; @@ -41,7 +42,7 @@ /// The assessment section which the context belongs to. /// When any input argument is null. public StabilityPointStructuresInputContext(StabilityPointStructuresInput input, - StabilityPointStructuresCalculation calculation, + StructuresCalculation calculation, StabilityPointStructuresFailureMechanism failureMechanism, IAssessmentSection assessmentSection) : base(input, failureMechanism, assessmentSection) @@ -57,6 +58,6 @@ /// /// Gets the calculation item which the context belongs to. /// - public StabilityPointStructuresCalculation Calculation { get; private set; } + public StructuresCalculation Calculation { get; private set; } } } \ No newline at end of file Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs =================================================================== diff -u -r81e4be22ff8e2ea37c432625f91e986c95554297 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs (.../StabilityPointStructuresPlugin.cs) (revision 81e4be22ff8e2ea37c432625f91e986c95554297) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs (.../StabilityPointStructuresPlugin.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -30,6 +30,7 @@ using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.Probability; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.Helpers; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.Common.Forms.TreeNodeInfos; @@ -207,7 +208,7 @@ return null; } - private static void ValidateAll(IEnumerable calculations, IAssessmentSection assessmentSection) {} + private static void ValidateAll(IEnumerable> calculations, IAssessmentSection assessmentSection) { } private static void CalculateAll(StabilityPointStructuresFailureMechanismContext context) {} @@ -273,7 +274,7 @@ .AddSeparator() .AddValidateAllCalculationsInFailureMechanismItem( failureMechanismContext, - c => ValidateAll(c.WrappedData.Calculations.OfType(), c.Parent), + c => ValidateAll(c.WrappedData.Calculations.OfType>(), c.Parent), ValidateAllDataAvailableAndGetErrorMessageForCalculationsInFailureMechanism) .AddPerformAllCalculationsInFailureMechanismItem(failureMechanismContext, CalculateAll, ValidateAllDataAvailableAndGetErrorMessageForCalculationsInFailureMechanism) .AddClearAllCalculationOutputInFailureMechanismItem(failureMechanismContext.WrappedData) @@ -318,7 +319,7 @@ foreach (ICalculationBase calculationItem in context.WrappedData.Children) { - var calculation = calculationItem as StabilityPointStructuresCalculation; + var calculation = calculationItem as StructuresCalculation; var group = calculationItem as CalculationGroup; if (calculation != null) @@ -369,7 +370,7 @@ builder.AddSeparator() .AddValidateAllCalculationsInGroupItem(context, - c => ValidateAll(c.WrappedData.GetCalculations().OfType(), c.AssessmentSection), + c => ValidateAll(c.WrappedData.GetCalculations().OfType>(), c.AssessmentSection), ValidateAllDataAvailableAndGetErrorMessageForCalculationsInGroup) .AddPerformAllCalculationsInGroupItem(group, context, CalculateAll, ValidateAllDataAvailableAndGetErrorMessageForCalculationsInGroup) .AddClearAllCalculationOutputInGroupItem(group) @@ -411,7 +412,7 @@ private static void AddCalculation(StabilityPointStructuresCalculationGroupContext context) { - var calculation = new StabilityPointStructuresCalculation + var calculation = new StructuresCalculation { Name = NamingHelper.GetUniqueName(context.WrappedData.Children, RingtoetsCommonDataResources.Calculation_DefaultName, c => c.Name) }; @@ -455,7 +456,7 @@ { var builder = new RingtoetsContextMenuBuilder(Gui.Get(context, treeViewControl)); - StabilityPointStructuresCalculation calculation = context.WrappedData; + StructuresCalculation calculation = context.WrappedData; return builder.AddValidateCalculationItem(context, delegate { }, ValidateAllDataAvailableAndGetErrorMessageForCalculation) .AddPerformCalculationItem(calculation, context, Calculate, ValidateAllDataAvailableAndGetErrorMessageForCalculation) @@ -476,7 +477,7 @@ return ValidateAllDataAvailableAndGetErrorMessage(context.AssessmentSection, context.FailureMechanism); } - private static void Calculate(StabilityPointStructuresCalculation calculation, StabilityPointStructuresCalculationContext context) {} + private static void Calculate(StructuresCalculation calculation, StabilityPointStructuresCalculationContext context) { } private static void CalculationContextOnNodeRemoved(StabilityPointStructuresCalculationContext context, object parentData) { Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/Ringtoets.StabilityPointStructures.Data.Test.csproj =================================================================== diff -u -r2b2da37541708b8ad95286e731010dd9d27d5070 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/Ringtoets.StabilityPointStructures.Data.Test.csproj (.../Ringtoets.StabilityPointStructures.Data.Test.csproj) (revision 2b2da37541708b8ad95286e731010dd9d27d5070) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/Ringtoets.StabilityPointStructures.Data.Test.csproj (.../Ringtoets.StabilityPointStructures.Data.Test.csproj) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -54,7 +54,6 @@ - Fisheye: Tag ab20c4eb4ca81bd3845d50210d2bdb301177af6a refers to a dead (removed) revision in file `Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/StabilityPointStructuresCalculationTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/StabilityPointStructuresFailureMechanismTest.cs =================================================================== diff -u -r51627a4d3b99a6354bf5a01eb5ecaf8e1ab04611 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/StabilityPointStructuresFailureMechanismTest.cs (.../StabilityPointStructuresFailureMechanismTest.cs) (revision 51627a4d3b99a6354bf5a01eb5ecaf8e1ab04611) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/StabilityPointStructuresFailureMechanismTest.cs (.../StabilityPointStructuresFailureMechanismTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -25,6 +25,7 @@ using Rhino.Mocks; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; namespace Ringtoets.StabilityPointStructures.Data.Test { @@ -111,9 +112,9 @@ Children = { new CalculationGroup(), - new StabilityPointStructuresCalculation(), + new StructuresCalculation(), mocks.Stub(), - new StabilityPointStructuresCalculation() + new StructuresCalculation() } } }; @@ -125,7 +126,7 @@ // Assert Assert.AreEqual(2, calculations.Count); - CollectionAssert.AllItemsAreInstancesOfType(calculations, typeof(StabilityPointStructuresCalculation)); + CollectionAssert.AllItemsAreInstancesOfType(calculations, typeof(StructuresCalculation)); mocks.VerifyAll(); } } Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PresentationObjects/StabilityPointStructuresCalculationContextTest.cs =================================================================== diff -u -rca23b1b155ca87c0aa4665fd919727570f31c781 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PresentationObjects/StabilityPointStructuresCalculationContextTest.cs (.../StabilityPointStructuresCalculationContextTest.cs) (revision ca23b1b155ca87c0aa4665fd919727570f31c781) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PresentationObjects/StabilityPointStructuresCalculationContextTest.cs (.../StabilityPointStructuresCalculationContextTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -22,6 +22,7 @@ using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.StabilityPointStructures.Data; using Ringtoets.StabilityPointStructures.Forms.PresentationObjects; @@ -39,15 +40,15 @@ var assessmentSectionMock = mocksRepository.Stub(); mocksRepository.ReplayAll(); - var calculation = new StabilityPointStructuresCalculation(); + var calculation = new StructuresCalculation(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); // Call var context = new StabilityPointStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); // Assert - Assert.IsInstanceOf>(context); - Assert.IsInstanceOf>(context); + Assert.IsInstanceOf, StabilityPointStructuresFailureMechanism>>(context); + Assert.IsInstanceOf, StabilityPointStructuresFailureMechanism>>(context); Assert.AreSame(calculation, context.WrappedData); Assert.AreSame(failureMechanism, context.FailureMechanism); Assert.AreSame(assessmentSectionMock, context.AssessmentSection); Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PresentationObjects/StabilityPointStructuresInputContextTest.cs =================================================================== diff -u -rca23b1b155ca87c0aa4665fd919727570f31c781 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PresentationObjects/StabilityPointStructuresInputContextTest.cs (.../StabilityPointStructuresInputContextTest.cs) (revision ca23b1b155ca87c0aa4665fd919727570f31c781) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PresentationObjects/StabilityPointStructuresInputContextTest.cs (.../StabilityPointStructuresInputContextTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -23,6 +23,7 @@ using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.StabilityPointStructures.Data; using Ringtoets.StabilityPointStructures.Forms.PresentationObjects; @@ -47,7 +48,7 @@ mocksRepository.ReplayAll(); var input = new StabilityPointStructuresInput(); - var calculation = new StabilityPointStructuresCalculation(); + var calculation = new StructuresCalculation(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); // Call Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -r968cbe97d1a910b9bbb0fb52b22ece65126ed675 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresCalculationContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationContextTreeNodeInfoTest.cs) (revision 968cbe97d1a910b9bbb0fb52b22ece65126ed675) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresCalculationContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationContextTreeNodeInfoTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -37,6 +37,7 @@ using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Probability; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.HydraRing.Data; using Ringtoets.StabilityPointStructures.Data; @@ -112,7 +113,7 @@ var assessmentSectionMock = mocks.Stub(); mocks.ReplayAll(); - var calculation = new StabilityPointStructuresCalculation(); + var calculation = new StructuresCalculation(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); var calculationContext = new StabilityPointStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); @@ -140,7 +141,7 @@ var assessmentSectionMock = mocks.Stub(); mocks.ReplayAll(); - var calculation = new StabilityPointStructuresCalculation + var calculation = new StructuresCalculation { Output = new ProbabilityAssessmentOutput(0, 0, 0, 0, 0) }; @@ -172,7 +173,7 @@ var guiMock = mocks.StrictMock(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); var assessmentSectionMock = mocks.Stub(); - var calculation = new StabilityPointStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new StabilityPointStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); var menuBuilderMock = mocks.StrictMock(); menuBuilderMock.Expect(mb => mb.AddCustomItem(null)).IgnoreArguments().Return(menuBuilderMock); @@ -210,7 +211,7 @@ var guiMock = mocks.StrictMock(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); var assessmentSectionMock = mocks.StrictMock(); - var calculation = new StabilityPointStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new StabilityPointStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); string validFilePath = Path.Combine(testDataPath, "complete.sqlite"); @@ -263,7 +264,7 @@ // Setup var failureMechanism = new StabilityPointStructuresFailureMechanism(); var assessmentSectionMock = mocks.Stub(); - var calculation = new StabilityPointStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new StabilityPointStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); var guiMock = mocks.StrictMock(); @@ -299,7 +300,7 @@ })); var assessmentSectionMock = mocks.Stub(); - var calculation = new StabilityPointStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new StabilityPointStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); using (var treeViewControl = new TreeViewControl()) @@ -336,7 +337,7 @@ var assessmentSectionMock = mocks.Stub(); assessmentSectionMock.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); - var calculation = new StabilityPointStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new StabilityPointStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); using (var treeViewControl = new TreeViewControl()) @@ -381,7 +382,7 @@ var assessmentSectionMock = mocks.Stub(); assessmentSectionMock.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; - var calculation = new StabilityPointStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new StabilityPointStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); using (var treeViewControl = new TreeViewControl()) @@ -410,7 +411,7 @@ // Setup var failureMechanism = new StabilityPointStructuresFailureMechanism(); var assessmentSectionMock = mocks.Stub(); - var calculation = new StabilityPointStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new StabilityPointStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); var guiMock = mocks.StrictMock(); @@ -446,7 +447,7 @@ })); var assessmentSectionMock = mocks.Stub(); - var calculation = new StabilityPointStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new StabilityPointStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); using (var treeViewControl = new TreeViewControl()) @@ -482,7 +483,7 @@ var assessmentSectionMock = mocks.Stub(); assessmentSectionMock.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); - var calculation = new StabilityPointStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new StabilityPointStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); using (var treeViewControl = new TreeViewControl()) @@ -526,7 +527,7 @@ var assessmentSectionMock = mocks.Stub(); assessmentSectionMock.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; - var calculation = new StabilityPointStructuresCalculation(); + var calculation = new StructuresCalculation(); var nodeData = new StabilityPointStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); using (var treeViewControl = new TreeViewControl()) @@ -553,7 +554,7 @@ { // Setup var group = new CalculationGroup(); - var elementToBeRemoved = new StabilityPointStructuresCalculation(); + var elementToBeRemoved = new StructuresCalculation(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); var observerMock = mocks.StrictMock(); var assessmentSectionMock = mocks.Stub(); @@ -569,7 +570,7 @@ mocks.ReplayAll(); group.Children.Add(elementToBeRemoved); - group.Children.Add(new StabilityPointStructuresCalculation()); + group.Children.Add(new StructuresCalculation()); group.Attach(observerMock); // Precondition Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -r968cbe97d1a910b9bbb0fb52b22ece65126ed675 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 968cbe97d1a910b9bbb0fb52b22ece65126ed675) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -36,6 +36,7 @@ using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.HydraRing.Data; using Ringtoets.StabilityPointStructures.Data; using Ringtoets.StabilityPointStructures.Forms.PresentationObjects; @@ -135,7 +136,7 @@ var failureMechanism = new StabilityPointStructuresFailureMechanism(); var group = new CalculationGroup(); var childGroup = new CalculationGroup(); - var childCalculation = new StabilityPointStructuresCalculation(); + var childCalculation = new StructuresCalculation(); group.Children.Add(childGroup); group.Children.Add(childCalculation); @@ -263,7 +264,7 @@ { Children = { - new StabilityPointStructuresCalculation() + new StructuresCalculation() } }; @@ -300,7 +301,7 @@ { Children = { - new StabilityPointStructuresCalculation() + new StructuresCalculation() } }; @@ -309,7 +310,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new StabilityPointStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionMock = mocks.Stub(); assessmentSectionMock.HydraulicBoundaryDatabase = null; @@ -347,7 +348,7 @@ { Children = { - new StabilityPointStructuresCalculation() + new StructuresCalculation() } }; @@ -356,7 +357,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new StabilityPointStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionMock = mocks.Stub(); assessmentSectionMock.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); @@ -395,7 +396,7 @@ { Children = { - new StabilityPointStructuresCalculation() + new StructuresCalculation() } }; @@ -412,7 +413,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new StabilityPointStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionMock = mocks.Stub(); assessmentSectionMock.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; @@ -453,7 +454,7 @@ { Children = { - new StabilityPointStructuresCalculation() + new StructuresCalculation() } }; @@ -490,7 +491,7 @@ { Children = { - new StabilityPointStructuresCalculation() + new StructuresCalculation() } }; @@ -499,7 +500,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new StabilityPointStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionMock = mocks.Stub(); @@ -536,7 +537,7 @@ { Children = { - new StabilityPointStructuresCalculation() + new StructuresCalculation() } }; @@ -545,7 +546,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new StabilityPointStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionMock = mocks.Stub(); assessmentSectionMock.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); @@ -584,7 +585,7 @@ { Children = { - new StabilityPointStructuresCalculation() + new StructuresCalculation() } }; @@ -601,7 +602,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new StabilityPointStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionMock = mocks.Stub(); assessmentSectionMock.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; @@ -786,7 +787,7 @@ var nodeData = new StabilityPointStructuresCalculationGroupContext(group, failureMechanism, assessmentSectionMock); - var calculationItem = new StabilityPointStructuresCalculation + var calculationItem = new StructuresCalculation { Name = "Nieuwe berekening" }; @@ -814,7 +815,7 @@ // Assert Assert.AreEqual(2, group.Children.Count); var newlyAddedItem = group.Children.Last(); - Assert.IsInstanceOf(newlyAddedItem); + Assert.IsInstanceOf>(newlyAddedItem); Assert.AreEqual("Nieuwe berekening (1)", newlyAddedItem.Name, "An item with the same name default name already exists, therefore '(1)' needs to be appended."); } Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresFailureMechanismContextTreeNodeInfoTest.cs =================================================================== diff -u -r960caf730560a10eb725d31f3e796c371523ef53 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../StabilityPointStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision 960caf730560a10eb725d31f3e796c371523ef53) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../StabilityPointStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -34,6 +34,7 @@ using Ringtoets.Common.Data; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.HydraRing.Data; using Ringtoets.StabilityPointStructures.Data; @@ -422,7 +423,7 @@ // Setup var guiMock = mocksRepository.StrictMock(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new StabilityPointStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionMock = mocksRepository.Stub(); var nodeData = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSectionMock); @@ -456,7 +457,7 @@ // Setup var guiMock = mocksRepository.StrictMock(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new StabilityPointStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); failureMechanism.AddSection(new FailureMechanismSection("test", new[] { new Point2D(0, 0) @@ -495,7 +496,7 @@ // Setup var guiMock = mocksRepository.StrictMock(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new StabilityPointStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); failureMechanism.AddSection(new FailureMechanismSection("test", new[] { new Point2D(0, 0) @@ -536,7 +537,7 @@ // Setup var guiMock = mocksRepository.StrictMock(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new StabilityPointStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); failureMechanism.AddSection(new FailureMechanismSection("test", new[] { new Point2D(0, 0) @@ -583,7 +584,7 @@ // Setup var guiMock = mocksRepository.StrictMock(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new StabilityPointStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionMock = mocksRepository.Stub(); var nodeData = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSectionMock); @@ -617,7 +618,7 @@ // Setup var guiMock = mocksRepository.StrictMock(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new StabilityPointStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); failureMechanism.AddSection(new FailureMechanismSection("test", new[] { new Point2D(0, 0) @@ -656,7 +657,7 @@ // Setup var guiMock = mocksRepository.StrictMock(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new StabilityPointStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); failureMechanism.AddSection(new FailureMechanismSection("test", new[] { new Point2D(0, 0) @@ -697,7 +698,7 @@ // Setup var guiMock = mocksRepository.StrictMock(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new StabilityPointStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); failureMechanism.AddSection(new FailureMechanismSection("test", new[] { new Point2D(0, 0) Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresInputContextTreeNodeInfoTest.cs =================================================================== diff -u -rfd1f6126ab10cbe29592671b32a81b6cabd630ec -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresInputContextTreeNodeInfoTest.cs (.../StabilityPointStructuresInputContextTreeNodeInfoTest.cs) (revision fd1f6126ab10cbe29592671b32a81b6cabd630ec) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresInputContextTreeNodeInfoTest.cs (.../StabilityPointStructuresInputContextTreeNodeInfoTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -27,6 +27,7 @@ using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.Structures; using Ringtoets.StabilityPointStructures.Data; using Ringtoets.StabilityPointStructures.Forms.PresentationObjects; using Ringtoets.StabilityPointStructures.Plugin; @@ -90,7 +91,7 @@ var assessmentSectionMock = mocksRepository.Stub(); var stabilityPointStructuresInputContext = new StabilityPointStructuresInputContext( mocksRepository.Stub(), - mocksRepository.Stub(), + mocksRepository.Stub>(), new StabilityPointStructuresFailureMechanism(), assessmentSectionMock); @@ -110,7 +111,7 @@ var assessmentSectionMock = mocksRepository.Stub(); var stabilityPointStructuresInputContext = new StabilityPointStructuresInputContext( mocksRepository.Stub(), - mocksRepository.Stub(), + mocksRepository.Stub>(), new StabilityPointStructuresFailureMechanism(), assessmentSectionMock);