Index: Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs =================================================================== diff -u -r3c1ed9049be26ab9460bf2192c55149c45fbba3c -rcb903e8cdb76e9733979fe508ee097107c022a28 --- Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs (.../AddNewDemoAssessmentSectionCommand.cs) (revision 3c1ed9049be26ab9460bf2192c55149c45fbba3c) +++ Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs (.../AddNewDemoAssessmentSectionCommand.cs) (revision cb903e8cdb76e9733979fe508ee097107c022a28) @@ -158,7 +158,7 @@ { HeightStructuresFailureMechanism failureMechanism = demoAssessmentSection.HeightStructures; - var calculation = new HeightStructuresCalculation(failureMechanism.GeneralInput, failureMechanism.ProbabilityAssessmentInput); + var calculation = new HeightStructuresCalculation(failureMechanism.GeneralInput); failureMechanism.CalculationsGroup.Children.Add(calculation); calculation.InputParameters.HydraulicBoundaryLocation = demoAssessmentSection.HydraulicBoundaryDatabase.Locations.First(hl => hl.Id == 1300001); calculation.InputParameters.NotifyObservers(); Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresCalculation.cs =================================================================== diff -u -r95e76a7e90e94621a5e9773c2a365fa8e3b6dd31 -rcb903e8cdb76e9733979fe508ee097107c022a28 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresCalculation.cs (.../HeightStructuresCalculation.cs) (revision 95e76a7e90e94621a5e9773c2a365fa8e3b6dd31) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresCalculation.cs (.../HeightStructuresCalculation.cs) (revision cb903e8cdb76e9733979fe508ee097107c022a28) @@ -38,20 +38,10 @@ /// /// General height structures calculation input parameters /// that apply to each calculation. - /// General probabilistic assessment parameters that apply to each - /// calculation. - /// Thrown when - /// is null. - /// is null. - /// - public HeightStructuresCalculation(GeneralHeightStructuresInput generalInputParameters, ProbabilityAssessmentInput probabilityAssessmentInput) + /// Thrown when is null. + public HeightStructuresCalculation(GeneralHeightStructuresInput generalInputParameters) { - if (probabilityAssessmentInput == null) - { - throw new ArgumentNullException("probabilityAssessmentInput"); - } InputParameters = new HeightStructuresInput(generalInputParameters); - ProbabilityAssessmentInput = probabilityAssessmentInput; Name = Resources.HeightStructuresCalculation_DefaultName; AddDemoInput(); } @@ -62,11 +52,6 @@ public HeightStructuresInput InputParameters { get; private set; } /// - /// Gets the probability assessment input. - /// - public ProbabilityAssessmentInput ProbabilityAssessmentInput { get; private set; } - - /// /// Gets or sets , which contains the results of a height structures calculation. /// public ProbabilityAssessmentOutput Output { get; set; } Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresGuiPlugin.cs =================================================================== diff -u -rd15d2685068662952431175bdca1fafb2e56da60 -rcb903e8cdb76e9733979fe508ee097107c022a28 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresGuiPlugin.cs (.../HeightStructuresGuiPlugin.cs) (revision d15d2685068662952431175bdca1fafb2e56da60) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresGuiPlugin.cs (.../HeightStructuresGuiPlugin.cs) (revision cb903e8cdb76e9733979fe508ee097107c022a28) @@ -135,7 +135,8 @@ }; } - private static ExceedanceProbabilityCalculationActivity CreateHydraRingExceedenceProbabilityCalculationActivity(FailureMechanismSection failureMechanismSection, + private static ExceedanceProbabilityCalculationActivity CreateHydraRingExceedenceProbabilityCalculationActivity(ProbabilityAssessmentInput probabilityAssessmentInput, + FailureMechanismSection failureMechanismSection, string hlcdDirectory, HeightStructuresCalculation calculation) { @@ -167,14 +168,15 @@ inputParameters.DeviationOfTheWaveDirection, inputParameters.StormDuration.Mean, inputParameters.StormDuration.StandardDeviation), calculation.ClearOutput, - output => { ParseHydraRingOutput(calculation, output); }); + output => { ParseHydraRingOutput(calculation, probabilityAssessmentInput, output); }); } private void CalculateAll(HeightStructuresFailureMechanism failureMechanism, IEnumerable calculations, IAssessmentSection assessmentSection) { // TODO: Remove "Where" filter when validation is implemented ActivityProgressDialogRunner.Run(Gui.MainWindow, calculations.Where(calc => calc.InputParameters.HydraulicBoundaryLocation != null) .Select(calc => CreateHydraRingExceedenceProbabilityCalculationActivity( + failureMechanism.ProbabilityAssessmentInput, failureMechanism.Sections.First(), // TODO: Pass dike section based on cross section of structure with reference line Path.GetDirectoryName(assessmentSection.HydraulicBoundaryDatabase.FilePath), calc)).ToList()); @@ -201,11 +203,11 @@ return null; } - private static void ParseHydraRingOutput(HeightStructuresCalculation calculation, ExceedanceProbabilityCalculationOutput output) + private static void ParseHydraRingOutput(HeightStructuresCalculation calculation, ProbabilityAssessmentInput probabilityAssessmentInput, ExceedanceProbabilityCalculationOutput output) { if (output != null) { - calculation.Output = ProbabilityAssessmentService.Calculate(calculation.ProbabilityAssessmentInput, output.Beta); + calculation.Output = ProbabilityAssessmentService.Calculate(probabilityAssessmentInput, output.Beta); calculation.NotifyObservers(); } else @@ -415,7 +417,7 @@ private static void AddCalculation(HeightStructuresCalculationGroupContext context) { - var calculation = new HeightStructuresCalculation(context.FailureMechanism.GeneralInput, context.FailureMechanism.ProbabilityAssessmentInput) + var calculation = new HeightStructuresCalculation(context.FailureMechanism.GeneralInput) { Name = NamingHelper.GetUniqueName(context.WrappedData.Children, HeightStructuresDataResources.HeightStructuresCalculation_DefaultName, c => c.Name) }; @@ -495,6 +497,7 @@ return; } var activity = CreateHydraRingExceedenceProbabilityCalculationActivity( + context.FailureMechanism.ProbabilityAssessmentInput, context.FailureMechanism.Sections.First(), // TODO: Pass dike section based on cross section of calculation with reference line Path.GetDirectoryName(context.AssessmentSection.HydraulicBoundaryDatabase.FilePath), calculation); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresCalculationTest.cs =================================================================== diff -u -r95e76a7e90e94621a5e9773c2a365fa8e3b6dd31 -rcb903e8cdb76e9733979fe508ee097107c022a28 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresCalculationTest.cs (.../HeightStructuresCalculationTest.cs) (revision 95e76a7e90e94621a5e9773c2a365fa8e3b6dd31) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresCalculationTest.cs (.../HeightStructuresCalculationTest.cs) (revision cb903e8cdb76e9733979fe508ee097107c022a28) @@ -33,47 +33,28 @@ [Test] public void Constructor_NullGeneralInput_ThrowsArgumentNullException() { - // Setup - var probabilityAssessmentInput = new ProbabilityAssessmentInput(); - // Call - TestDelegate test = () => new HeightStructuresCalculation(null, probabilityAssessmentInput); + TestDelegate test = () => new HeightStructuresCalculation(null); // Assert var exception = Assert.Throws(test); Assert.AreEqual("generalInputParameters", exception.ParamName); } [Test] - public void Constructor_NullProbabilityAssessmentInput_ThrowsArgumentNullException() - { - // Setup - var generalInput = new GeneralHeightStructuresInput(); - - // Call - TestDelegate test = () => new HeightStructuresCalculation(generalInput, null); - - // Assert - var exception = Assert.Throws(test); - Assert.AreEqual("probabilityAssessmentInput", exception.ParamName); - } - - [Test] public void Constructor_DefaultPropertyValuesAreSet() { // Setup var generalInput = new GeneralHeightStructuresInput(); - var probabilityAssessmentInput = new ProbabilityAssessmentInput(); // Call - var calculation = new HeightStructuresCalculation(generalInput, probabilityAssessmentInput); + var calculation = new HeightStructuresCalculation(generalInput); // Assert Assert.IsInstanceOf(calculation); Assert.IsInstanceOf(calculation); Assert.AreEqual("Nieuwe berekening", calculation.Name); Assert.IsNotNull(calculation.InputParameters); - Assert.AreEqual(probabilityAssessmentInput, calculation.ProbabilityAssessmentInput); Assert.IsNull(calculation.Comments); Assert.IsFalse(calculation.HasOutput); AssertDemoInput(calculation.InputParameters); @@ -84,8 +65,7 @@ { // Setup var generalInput = new GeneralHeightStructuresInput(); - var probabilityAssessmentInput = new ProbabilityAssessmentInput(); - var calculation = new HeightStructuresCalculation(generalInput, probabilityAssessmentInput) + var calculation = new HeightStructuresCalculation(generalInput) { Output = new TestHeightStructuresOutput() }; @@ -102,8 +82,7 @@ { // Setup var generalInput = new GeneralHeightStructuresInput(); - var probabilityAssessmentInput = new ProbabilityAssessmentInput(); - var calculation = new HeightStructuresCalculation(generalInput, probabilityAssessmentInput) + var calculation = new HeightStructuresCalculation(generalInput) { Output = null }; @@ -117,8 +96,7 @@ { // Setup var generalInput = new GeneralHeightStructuresInput(); - var probabilityAssessmentInput = new ProbabilityAssessmentInput(); - var calculation = new HeightStructuresCalculation(generalInput, probabilityAssessmentInput) + var calculation = new HeightStructuresCalculation(generalInput) { Output = new TestHeightStructuresOutput() }; @@ -132,8 +110,7 @@ { // Setup var generalInput = new GeneralHeightStructuresInput(); - var probabilityAssessmentInput = new ProbabilityAssessmentInput(); - var calculation = new HeightStructuresCalculation(generalInput, probabilityAssessmentInput); + var calculation = new HeightStructuresCalculation(generalInput); // Call ICalculationInput input = calculation.GetObservableInput(); @@ -147,8 +124,7 @@ { // Setup var generalInput = new GeneralHeightStructuresInput(); - var probabilityAssessmentInput = new ProbabilityAssessmentInput(); - var calculation = new HeightStructuresCalculation(generalInput, probabilityAssessmentInput) + var calculation = new HeightStructuresCalculation(generalInput) { Output = new TestHeightStructuresOutput() }; Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresFailureMechanismTest.cs =================================================================== diff -u -r3c1ed9049be26ab9460bf2192c55149c45fbba3c -rcb903e8cdb76e9733979fe508ee097107c022a28 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresFailureMechanismTest.cs (.../HeightStructuresFailureMechanismTest.cs) (revision 3c1ed9049be26ab9460bf2192c55149c45fbba3c) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresFailureMechanismTest.cs (.../HeightStructuresFailureMechanismTest.cs) (revision cb903e8cdb76e9733979fe508ee097107c022a28) @@ -25,7 +25,6 @@ using Rhino.Mocks; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.FailureMechanism; -using Ringtoets.Common.Data.Probability; namespace Ringtoets.HeightStructures.Data.Test { @@ -101,17 +100,16 @@ // Setup var mocks = new MockRepository(); var generalInput = new GeneralHeightStructuresInput(); - var probabilityAssessmentInput = new ProbabilityAssessmentInput(); var failureMechanism = new HeightStructuresFailureMechanism { CalculationsGroup = { Children = { new CalculationGroup(), - new HeightStructuresCalculation(generalInput, probabilityAssessmentInput), + new HeightStructuresCalculation(generalInput), mocks.StrictMock(), - new HeightStructuresCalculation(generalInput, probabilityAssessmentInput) + new HeightStructuresCalculation(generalInput) } } }; Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresCalculationContextTest.cs =================================================================== diff -u -r3c1ed9049be26ab9460bf2192c55149c45fbba3c -rcb903e8cdb76e9733979fe508ee097107c022a28 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresCalculationContextTest.cs (.../HeightStructuresCalculationContextTest.cs) (revision 3c1ed9049be26ab9460bf2192c55149c45fbba3c) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresCalculationContextTest.cs (.../HeightStructuresCalculationContextTest.cs) (revision cb903e8cdb76e9733979fe508ee097107c022a28) @@ -44,7 +44,7 @@ { // Setup var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation = new HeightStructuresCalculation(failureMechanism.GeneralInput, failureMechanism.ProbabilityAssessmentInput); + var calculation = new HeightStructuresCalculation(failureMechanism.GeneralInput); var assessmentSectionMock = mocksRepository.StrictMock(); mocksRepository.ReplayAll(); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -r95e76a7e90e94621a5e9773c2a365fa8e3b6dd31 -rcb903e8cdb76e9733979fe508ee097107c022a28 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationContextTreeNodeInfoTest.cs) (revision 95e76a7e90e94621a5e9773c2a365fa8e3b6dd31) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationContextTreeNodeInfoTest.cs) (revision cb903e8cdb76e9733979fe508ee097107c022a28) @@ -109,7 +109,7 @@ mocks.ReplayAll(); var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation = new HeightStructuresCalculation(failureMechanism.GeneralInput, failureMechanism.ProbabilityAssessmentInput); + var calculation = new HeightStructuresCalculation(failureMechanism.GeneralInput); var calculationContext = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); // Call @@ -139,7 +139,7 @@ mocks.ReplayAll(); var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation = new HeightStructuresCalculation(failureMechanism.GeneralInput, failureMechanism.ProbabilityAssessmentInput) + var calculation = new HeightStructuresCalculation(failureMechanism.GeneralInput) { Output = new TestHeightStructuresOutput() }; @@ -174,7 +174,7 @@ var treeViewControlMock = mocks.StrictMock(); var failureMechanism = new HeightStructuresFailureMechanism(); var assessmentSectionMock = mocks.StrictMock(); - var calculation = new HeightStructuresCalculation(failureMechanism.GeneralInput, failureMechanism.ProbabilityAssessmentInput); + var calculation = new HeightStructuresCalculation(failureMechanism.GeneralInput); var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); var menuBuilderMock = mocks.StrictMock(); @@ -213,7 +213,7 @@ var treeViewControlMock = mocks.StrictMock(); var failureMechanism = new HeightStructuresFailureMechanism(); var assessmentSectionMock = mocks.StrictMock(); - var calculation = new HeightStructuresCalculation(failureMechanism.GeneralInput, failureMechanism.ProbabilityAssessmentInput); + var calculation = new HeightStructuresCalculation(failureMechanism.GeneralInput); var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); @@ -251,8 +251,7 @@ var treeViewControlMock = mocks.StrictMock(); var failureMechanism = new HeightStructuresFailureMechanism(); var assessmentSectionMock = mocks.StrictMock(); - var calculation = new HeightStructuresCalculation(new GeneralHeightStructuresInput(), - new ProbabilityAssessmentInput()); + var calculation = new HeightStructuresCalculation(new GeneralHeightStructuresInput()); var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); var guiMock = mocks.StrictMock(); @@ -291,9 +290,7 @@ var assessmentSectionMock = mocks.StrictMock(); assessmentSectionMock.Expect(asm => asm.HydraulicBoundaryDatabase).Return(null); - var calculation = new HeightStructuresCalculation(new GeneralHeightStructuresInput(), - new ProbabilityAssessmentInput()); - + var calculation = new HeightStructuresCalculation(new GeneralHeightStructuresInput()); var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); guiMock.Expect(cmp => cmp.Get(nodeData, treeViewControlMock)).Return(new CustomItemsOnlyContextMenuBuilder()); @@ -331,9 +328,7 @@ var assessmentSectionMock = mocks.StrictMock(); assessmentSectionMock.Stub(asm => asm.HydraulicBoundaryDatabase).Return(new HydraulicBoundaryDatabase()); - var calculation = new HeightStructuresCalculation(new GeneralHeightStructuresInput(), - new ProbabilityAssessmentInput()); - + var calculation = new HeightStructuresCalculation(new GeneralHeightStructuresInput()); var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); guiMock.Expect(cmp => cmp.Get(nodeData, treeViewControlMock)).Return(new CustomItemsOnlyContextMenuBuilder()); @@ -380,9 +375,7 @@ var assessmentSectionMock = mocks.StrictMock(); assessmentSectionMock.Stub(asm => asm.HydraulicBoundaryDatabase).Return(hydraulicBoundaryDatabase); - var calculation = new HeightStructuresCalculation(new GeneralHeightStructuresInput(), - new ProbabilityAssessmentInput()); - + var calculation = new HeightStructuresCalculation(new GeneralHeightStructuresInput()); var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock); guiMock.Expect(cmp => cmp.Get(nodeData, treeViewControlMock)).Return(new CustomItemsOnlyContextMenuBuilder()); @@ -436,8 +429,7 @@ { HydraulicBoundaryDatabase = hydraulicBoundaryDatabase }; - var calculation = new HeightStructuresCalculation(new GeneralHeightStructuresInput(), - new ProbabilityAssessmentInput()) + var calculation = new HeightStructuresCalculation(new GeneralHeightStructuresInput()) { Output = new ProbabilityAssessmentOutput(double.NaN, double.NaN, double.NaN, double.NaN, double.NaN), InputParameters = @@ -486,7 +478,7 @@ // Setup var group = new CalculationGroup(); var failureMechanism = new HeightStructuresFailureMechanism(); - var elementToBeRemoved = new HeightStructuresCalculation(failureMechanism.GeneralInput, failureMechanism.ProbabilityAssessmentInput); + var elementToBeRemoved = new HeightStructuresCalculation(failureMechanism.GeneralInput); var observerMock = mocks.StrictMock(); var assessmentSectionMock = mocks.StrictMock(); var calculationContext = new HeightStructuresCalculationContext(elementToBeRemoved, @@ -501,7 +493,7 @@ mocks.ReplayAll(); group.Children.Add(elementToBeRemoved); - group.Children.Add(new HeightStructuresCalculation(failureMechanism.GeneralInput, failureMechanism.ProbabilityAssessmentInput)); + group.Children.Add(new HeightStructuresCalculation(failureMechanism.GeneralInput)); group.Attach(observerMock); // Precondition Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -r3c1ed9049be26ab9460bf2192c55149c45fbba3c -rcb903e8cdb76e9733979fe508ee097107c022a28 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 3c1ed9049be26ab9460bf2192c55149c45fbba3c) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision cb903e8cdb76e9733979fe508ee097107c022a28) @@ -37,7 +37,6 @@ using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.FailureMechanism; -using Ringtoets.Common.Data.Probability; using Ringtoets.HeightStructures.Data; using Ringtoets.HeightStructures.Forms.PresentationObjects; using Ringtoets.HeightStructures.Plugin; @@ -128,8 +127,7 @@ var failureMechanism = new HeightStructuresFailureMechanism(); var group = new CalculationGroup(); var childGroup = new CalculationGroup(); - var childCalculation = new HeightStructuresCalculation(failureMechanism.GeneralInput, - failureMechanism.ProbabilityAssessmentInput); + var childCalculation = new HeightStructuresCalculation(failureMechanism.GeneralInput); group.Children.Add(childGroup); group.Children.Add(calculationItemMock); @@ -347,7 +345,7 @@ { Children = { - new HeightStructuresCalculation(new GeneralHeightStructuresInput(), new ProbabilityAssessmentInput()) + new HeightStructuresCalculation(new GeneralHeightStructuresInput()) } }; @@ -388,7 +386,7 @@ { Children = { - new HeightStructuresCalculation(new GeneralHeightStructuresInput(), new ProbabilityAssessmentInput()) + new HeightStructuresCalculation(new GeneralHeightStructuresInput()) } }; @@ -397,9 +395,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation( - new GeneralHeightStructuresInput(), - new ProbabilityAssessmentInput())); + failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation(new GeneralHeightStructuresInput())); var assessmentSectionMock = mocks.StrictMock(); assessmentSectionMock.Stub(asm => asm.HydraulicBoundaryDatabase).Return(null); @@ -442,7 +438,7 @@ { Children = { - new HeightStructuresCalculation(new GeneralHeightStructuresInput(), new ProbabilityAssessmentInput()) + new HeightStructuresCalculation(new GeneralHeightStructuresInput()) } }; @@ -451,9 +447,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation( - new GeneralHeightStructuresInput(), - new ProbabilityAssessmentInput())); + failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation(new GeneralHeightStructuresInput())); var assessmentSectionMock = mocks.StrictMock(); assessmentSectionMock.Stub(asm => asm.HydraulicBoundaryDatabase).Return(new HydraulicBoundaryDatabase()); @@ -497,7 +491,7 @@ { Children = { - new HeightStructuresCalculation(new GeneralHeightStructuresInput(), new ProbabilityAssessmentInput()) + new HeightStructuresCalculation(new GeneralHeightStructuresInput()) } }; @@ -514,9 +508,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation( - new GeneralHeightStructuresInput(), - new ProbabilityAssessmentInput())); + failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation(new GeneralHeightStructuresInput())); var assessmentSectionMock = mocks.StrictMock(); assessmentSectionMock.Stub(asm => asm.HydraulicBoundaryDatabase).Return(hydraulicBoundaryDatabase); @@ -564,7 +556,7 @@ new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation(new GeneralHeightStructuresInput(), new ProbabilityAssessmentInput()) + failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation(new GeneralHeightStructuresInput()) { Name = "A", InputParameters = @@ -573,7 +565,7 @@ } }); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation(new GeneralHeightStructuresInput(), new ProbabilityAssessmentInput()) + failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation(new GeneralHeightStructuresInput()) { Name = "B", InputParameters = @@ -678,8 +670,7 @@ var nodeData = new HeightStructuresCalculationGroupContext(group, failureMechanism, assessmentSectionMock); - var calculation = new HeightStructuresCalculation(failureMechanism.GeneralInput, - failureMechanism.ProbabilityAssessmentInput) + var calculation = new HeightStructuresCalculation(failureMechanism.GeneralInput) { Name = "Nieuwe berekening" }; @@ -761,8 +752,7 @@ var parentNodeData = new HeightStructuresCalculationGroupContext(parentGroup, failureMechanism, assessmentSectionMock); - var calculation = new HeightStructuresCalculation(failureMechanism.GeneralInput, - failureMechanism.ProbabilityAssessmentInput); + var calculation = new HeightStructuresCalculation(failureMechanism.GeneralInput); observerMock.Expect(o => o.UpdateObserver()); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs =================================================================== diff -u -r49084c971c0de5668befdcf5c8d6b65debf0b659 -rcb903e8cdb76e9733979fe508ee097107c022a28 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision 49084c971c0de5668befdcf5c8d6b65debf0b659) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision cb903e8cdb76e9733979fe508ee097107c022a28) @@ -36,7 +36,6 @@ using Ringtoets.Common.Data; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.FailureMechanism; -using Ringtoets.Common.Data.Probability; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.HeightStructures.Data; using Ringtoets.HeightStructures.Forms.PresentationObjects; @@ -378,8 +377,7 @@ // Setup var guiMock = mocksRepository.StrictMock(); var failureMechanism = new HeightStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation(new GeneralHeightStructuresInput(), - new ProbabilityAssessmentInput())); + failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation(new GeneralHeightStructuresInput())); var assessmentSectionMock = mocksRepository.StrictMock(); var nodeData = new HeightStructuresFailureMechanismContext(failureMechanism, assessmentSectionMock); @@ -415,8 +413,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation(new GeneralHeightStructuresInput(), - new ProbabilityAssessmentInput())); + failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation(new GeneralHeightStructuresInput())); var assessmentSectionMock = mocksRepository.StrictMock(); assessmentSectionMock.Expect(asm => asm.HydraulicBoundaryDatabase).Return(null); @@ -454,8 +451,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation(new GeneralHeightStructuresInput(), - new ProbabilityAssessmentInput())); + failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation(new GeneralHeightStructuresInput())); var assessmentSectionMock = mocksRepository.StrictMock(); assessmentSectionMock.Stub(asm => asm.HydraulicBoundaryDatabase).Return(new HydraulicBoundaryDatabase()); @@ -495,8 +491,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation(new GeneralHeightStructuresInput(), - new ProbabilityAssessmentInput())); + failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation(new GeneralHeightStructuresInput())); string validFilePath = Path.Combine(testDataPath, "complete.sqlite"); @@ -548,15 +543,15 @@ }); failureMechanism.AddSection(section); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation(new GeneralHeightStructuresInput(), new ProbabilityAssessmentInput()) + failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation(new GeneralHeightStructuresInput()) { Name = "A", InputParameters = { HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2) } }); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation(new GeneralHeightStructuresInput(), new ProbabilityAssessmentInput()) + failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation(new GeneralHeightStructuresInput()) { Name = "B", InputParameters = Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresInputContextTreeNodeInfoTest.cs =================================================================== diff -u -r49084c971c0de5668befdcf5c8d6b65debf0b659 -rcb903e8cdb76e9733979fe508ee097107c022a28 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresInputContextTreeNodeInfoTest.cs (.../HeightStructuresInputContextTreeNodeInfoTest.cs) (revision 49084c971c0de5668befdcf5c8d6b65debf0b659) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresInputContextTreeNodeInfoTest.cs (.../HeightStructuresInputContextTreeNodeInfoTest.cs) (revision cb903e8cdb76e9733979fe508ee097107c022a28) @@ -27,7 +27,6 @@ using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; -using Ringtoets.Common.Data.Probability; using Ringtoets.HeightStructures.Data; using Ringtoets.HeightStructures.Forms.PresentationObjects; using Ringtoets.HeightStructures.Plugin; @@ -80,11 +79,10 @@ { // Setup var generalInput = new GeneralHeightStructuresInput(); - var probabilityAssessmentInput = new ProbabilityAssessmentInput(); var assessmentSectionMock = mocksRepository.StrictMock(); var heightStructuresInputContext = new HeightStructuresInputContext( new HeightStructuresInput(new GeneralHeightStructuresInput()), - new HeightStructuresCalculation(generalInput, probabilityAssessmentInput), + new HeightStructuresCalculation(generalInput), new HeightStructuresFailureMechanism(), assessmentSectionMock); @@ -104,10 +102,9 @@ // Setup var assessmentSectionMock = mocksRepository.StrictMock(); var generalInput = new GeneralHeightStructuresInput(); - var probabilityAssessmentInput = new ProbabilityAssessmentInput(); var heightStructuresInputContext = new HeightStructuresInputContext( new HeightStructuresInput(new GeneralHeightStructuresInput()), - new HeightStructuresCalculation(generalInput, probabilityAssessmentInput), + new HeightStructuresCalculation(generalInput), new HeightStructuresFailureMechanism(), assessmentSectionMock);