Index: Riskeer/HeightStructures/src/Riskeer.HeightStructures.Forms/PresentationObjects/HeightStructuresCalculationScenarioContext.cs =================================================================== diff -u -r3cbba23100bde03baa7b08ea535b779bcb7ddf13 -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/HeightStructures/src/Riskeer.HeightStructures.Forms/PresentationObjects/HeightStructuresCalculationScenarioContext.cs (.../HeightStructuresCalculationScenarioContext.cs) (revision 3cbba23100bde03baa7b08ea535b779bcb7ddf13) +++ Riskeer/HeightStructures/src/Riskeer.HeightStructures.Forms/PresentationObjects/HeightStructuresCalculationScenarioContext.cs (.../HeightStructuresCalculationScenarioContext.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -31,7 +31,7 @@ /// /// Presentation object for all data required to configure a height structures calculation. /// - public class HeightStructuresCalculationScenarioContext : StructuresCalculationContext + public class HeightStructuresCalculationScenarioContext : StructuresCalculationScenarioContext { /// /// Creates a new instance of . @@ -41,7 +41,7 @@ /// The failure mechanism which the context belongs to. /// The assessment section which the calculation belongs to. /// Thrown when any input argument is null. - public HeightStructuresCalculationScenarioContext(StructuresCalculation calculation, + public HeightStructuresCalculationScenarioContext(StructuresCalculationScenario calculation, CalculationGroup parent, HeightStructuresFailureMechanism failureMechanism, IAssessmentSection assessmentSection) Index: Riskeer/HeightStructures/src/Riskeer.HeightStructures.Plugin/HeightStructuresPlugin.cs =================================================================== diff -u -r3cbba23100bde03baa7b08ea535b779bcb7ddf13 -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/HeightStructures/src/Riskeer.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision 3cbba23100bde03baa7b08ea535b779bcb7ddf13) +++ Riskeer/HeightStructures/src/Riskeer.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -458,17 +458,14 @@ foreach (ICalculationBase calculationItem in context.WrappedData.Children) { - var calculation = calculationItem as StructuresCalculation; - var group = calculationItem as CalculationGroup; - - if (calculation != null) + if (calculationItem is StructuresCalculationScenario calculation) { childNodeObjects.Add(new HeightStructuresCalculationScenarioContext(calculation, context.WrappedData, context.FailureMechanism, context.AssessmentSection)); } - else if (group != null) + else if (calculationItem is CalculationGroup group) { childNodeObjects.Add(new HeightStructuresCalculationGroupContext(group, context.WrappedData, Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Data.Test/HeightStructuresFailureMechanismSectionResultDetailedAssessmentExtensionsTest.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Data.Test/HeightStructuresFailureMechanismSectionResultDetailedAssessmentExtensionsTest.cs (.../HeightStructuresFailureMechanismSectionResultDetailedAssessmentExtensionsTest.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Data.Test/HeightStructuresFailureMechanismSectionResultDetailedAssessmentExtensionsTest.cs (.../HeightStructuresFailureMechanismSectionResultDetailedAssessmentExtensionsTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -118,7 +118,7 @@ FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); var failureMechanismSectionResult = new HeightStructuresFailureMechanismSectionResult(section) { - Calculation = new TestHeightStructuresCalculation() + Calculation = new TestHeightStructuresCalculationScenario() }; // Call @@ -143,7 +143,7 @@ FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); var failureMechanismSectionResult = new HeightStructuresFailureMechanismSectionResult(section) { - Calculation = new TestHeightStructuresCalculation + Calculation = new TestHeightStructuresCalculationScenario { Output = new TestStructuresOutput(0.8) } Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Data.TestUtil.Test/TestHeightStructuresCalculationScenarioTest.cs =================================================================== diff -u --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Data.TestUtil.Test/TestHeightStructuresCalculationScenarioTest.cs (revision 0) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Data.TestUtil.Test/TestHeightStructuresCalculationScenarioTest.cs (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -0,0 +1,66 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer 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 NUnit.Framework; +using Riskeer.Common.Data.Structures; +using Riskeer.Common.Data.TestUtil; + +namespace Riskeer.HeightStructures.Data.TestUtil.Test +{ + [TestFixture] + public class TestHeightStructuresCalculationScenarioTest + { + [Test] + public void Constructor_DefaultPropertyValuesAreSet() + { + // Call + var calculation = new TestHeightStructuresCalculationScenario(); + + // Assert + Assert.IsInstanceOf>(calculation); + Assert.AreEqual("Nieuwe berekening", calculation.Name); + Assert.AreEqual(1, calculation.Contribution, calculation.Contribution.GetAccuracy()); + Assert.IsTrue(calculation.IsRelevant); + Assert.IsNotNull(calculation.InputParameters); + Assert.IsNull(calculation.Comments.Body); + Assert.IsFalse(calculation.HasOutput); + + Assert.IsNotNull(calculation.InputParameters.Structure); + Assert.AreEqual(2, calculation.InputParameters.LevelCrestStructure.Mean.NumberOfDecimalPlaces); + Assert.AreEqual(5.74, calculation.InputParameters.LevelCrestStructure.Mean.Value); + Assert.AreEqual(2, calculation.InputParameters.StructureNormalOrientation.NumberOfDecimalPlaces); + Assert.AreEqual(115, calculation.InputParameters.StructureNormalOrientation.Value); + Assert.AreEqual(2, calculation.InputParameters.AllowedLevelIncreaseStorage.Mean.NumberOfDecimalPlaces); + Assert.AreEqual(1.0, calculation.InputParameters.AllowedLevelIncreaseStorage.Mean.Value); + Assert.AreEqual(2, calculation.InputParameters.StorageStructureArea.Mean.NumberOfDecimalPlaces); + Assert.AreEqual(1.0, calculation.InputParameters.StorageStructureArea.Mean.Value); + Assert.AreEqual(2, calculation.InputParameters.FlowWidthAtBottomProtection.Mean.NumberOfDecimalPlaces); + Assert.AreEqual(18, calculation.InputParameters.FlowWidthAtBottomProtection.Mean.Value); + Assert.AreEqual(2, calculation.InputParameters.CriticalOvertoppingDischarge.Mean.NumberOfDecimalPlaces); + Assert.AreEqual(1, calculation.InputParameters.CriticalOvertoppingDischarge.Mean.Value); + Assert.AreEqual(2, calculation.InputParameters.WidthFlowApertures.Mean.NumberOfDecimalPlaces); + Assert.AreEqual(18, calculation.InputParameters.WidthFlowApertures.Mean.Value); + Assert.AreEqual(2, calculation.InputParameters.DeviationWaveDirection.NumberOfDecimalPlaces); + Assert.AreEqual(0.0, calculation.InputParameters.DeviationWaveDirection.Value); + Assert.AreEqual(1.0, calculation.InputParameters.FailureProbabilityStructureWithErosion); + } + } +} \ No newline at end of file Fisheye: Tag d1c333df3a55ad8baba0d1cc0c4cff54c69668d7 refers to a dead (removed) revision in file `Riskeer/HeightStructures/test/Riskeer.HeightStructures.Data.TestUtil.Test/TestHeightStructuresCalculationTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag d1c333df3a55ad8baba0d1cc0c4cff54c69668d7 refers to a dead (removed) revision in file `Riskeer/HeightStructures/test/Riskeer.HeightStructures.Data.TestUtil/TestHeightStructuresCalculation.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Data.TestUtil/TestHeightStructuresCalculationScenario.cs =================================================================== diff -u --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Data.TestUtil/TestHeightStructuresCalculationScenario.cs (revision 0) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Data.TestUtil/TestHeightStructuresCalculationScenario.cs (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -0,0 +1,55 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer 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.Data; +using Riskeer.Common.Data.Structures; + +namespace Riskeer.HeightStructures.Data.TestUtil +{ + /// + /// Height structures calculation scenario for testing purposes. + /// + public class TestHeightStructuresCalculationScenario : StructuresCalculationScenario + { + /// + /// Creates a new instance of . + /// + public TestHeightStructuresCalculationScenario() + { + InputParameters.Structure = new TestHeightStructure(); + InputParameters.LevelCrestStructure.Mean = (RoundedDouble) 5.74; + InputParameters.LevelCrestStructure.StandardDeviation = (RoundedDouble) 0.94; + InputParameters.StorageStructureArea.Mean = (RoundedDouble) 1.0; + InputParameters.StorageStructureArea.CoefficientOfVariation = (RoundedDouble) 1.10; + InputParameters.StructureNormalOrientation = (RoundedDouble) 115; + InputParameters.AllowedLevelIncreaseStorage.Mean = (RoundedDouble) 1.0; + InputParameters.AllowedLevelIncreaseStorage.StandardDeviation = (RoundedDouble) 0.12; + InputParameters.FlowWidthAtBottomProtection.Mean = (RoundedDouble) 18; + InputParameters.FlowWidthAtBottomProtection.StandardDeviation = (RoundedDouble) 8.2; + InputParameters.CriticalOvertoppingDischarge.Mean = (RoundedDouble) 1.0; + InputParameters.CriticalOvertoppingDischarge.CoefficientOfVariation = (RoundedDouble) 0.88; + InputParameters.WidthFlowApertures.Mean = (RoundedDouble) 18; + InputParameters.WidthFlowApertures.StandardDeviation = (RoundedDouble) 2; + InputParameters.FailureProbabilityStructureWithErosion = 1.0; + InputParameters.DeviationWaveDirection = (RoundedDouble) 0; + } + } +} \ No newline at end of file Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresCalculationScenarioContextTest.cs =================================================================== diff -u -r3cbba23100bde03baa7b08ea535b779bcb7ddf13 -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresCalculationScenarioContextTest.cs (.../HeightStructuresCalculationScenarioContextTest.cs) (revision 3cbba23100bde03baa7b08ea535b779bcb7ddf13) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresCalculationScenarioContextTest.cs (.../HeightStructuresCalculationScenarioContextTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -41,15 +41,15 @@ var assessmentSection = mocksRepository.Stub(); mocksRepository.ReplayAll(); - var calculation = new StructuresCalculation(); + var calculation = new StructuresCalculationScenario(); var failureMechanism = new HeightStructuresFailureMechanism(); var parent = new CalculationGroup(); // Call var context = new HeightStructuresCalculationScenarioContext(calculation, parent, failureMechanism, assessmentSection); // Assert - Assert.IsInstanceOf>(context); + Assert.IsInstanceOf>(context); Assert.AreSame(calculation, context.WrappedData); Assert.AreSame(parent, context.Parent); Assert.AreSame(failureMechanism, context.FailureMechanism); @@ -65,7 +65,7 @@ var assessmentSection = mocksRepository.Stub(); mocksRepository.ReplayAll(); - var calculation = new StructuresCalculation(); + var calculation = new StructuresCalculationScenario(); var failureMechanism = new HeightStructuresFailureMechanism(); var parent = new CalculationGroup(); var context = new HeightStructuresCalculationScenarioContext(calculation, parent, failureMechanism, assessmentSection); @@ -81,7 +81,7 @@ private class DerivedHeightStructuresCalculationScenarioContext : HeightStructuresCalculationScenarioContext { - public DerivedHeightStructuresCalculationScenarioContext(StructuresCalculation calculation, + public DerivedHeightStructuresCalculationScenarioContext(StructuresCalculationScenario calculation, CalculationGroup parent, HeightStructuresFailureMechanism failureMechanism, IAssessmentSection assessmentSection) Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresOutputContextTest.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresOutputContextTest.cs (.../HeightStructuresOutputContextTest.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresOutputContextTest.cs (.../HeightStructuresOutputContextTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -41,7 +41,7 @@ var assessmentSection = mocks.Stub(); mocks.ReplayAll(); - var calculation = new TestHeightStructuresCalculation(); + var calculation = new TestHeightStructuresCalculationScenario(); var failureMechanism = new HeightStructuresFailureMechanism(); // Call @@ -63,7 +63,7 @@ var assessmentSection = mocks.Stub(); mocks.ReplayAll(); - var calculation = new TestHeightStructuresCalculation(); + var calculation = new TestHeightStructuresCalculationScenario(); // Call TestDelegate call = () => new HeightStructuresOutputContext(calculation, null, assessmentSection); Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismSectionResultRowTest.cs =================================================================== diff -u -r98f26089b79e2cc68603066a181a3854189e80ad -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismSectionResultRowTest.cs (.../HeightStructuresFailureMechanismSectionResultRowTest.cs) (revision 98f26089b79e2cc68603066a181a3854189e80ad) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismSectionResultRowTest.cs (.../HeightStructuresFailureMechanismSectionResultRowTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -391,9 +391,9 @@ } } - private static TestHeightStructuresCalculation CreateCalculationWithOutput() + private static TestHeightStructuresCalculationScenario CreateCalculationWithOutput() { - return new TestHeightStructuresCalculation + return new TestHeightStructuresCalculationScenario { Output = new TestStructuresOutput() }; @@ -675,7 +675,7 @@ var sectionResult = new HeightStructuresFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()) { - Calculation = new TestHeightStructuresCalculation(), + Calculation = new TestHeightStructuresCalculationScenario(), SimpleAssessmentResult = simpleAssessmentResult }; @@ -706,7 +706,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(failureMechanism, mocks); mocks.ReplayAll(); - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { Output = new TestStructuresOutput(double.NaN) }; @@ -771,7 +771,7 @@ var sectionResult = new HeightStructuresFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()) { - Calculation = new TestHeightStructuresCalculation(), + Calculation = new TestHeightStructuresCalculationScenario(), UseManualAssembly = true }; @@ -800,7 +800,7 @@ var sectionResult = new HeightStructuresFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()) { - Calculation = new TestHeightStructuresCalculation(), + Calculation = new TestHeightStructuresCalculationScenario(), DetailedAssessmentResult = DetailedAssessmentProbabilityOnlyResultType.NotAssessed }; Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.IO.Test/Configurations/HeightStructuresCalculationConfigurationExporterTest.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.IO.Test/Configurations/HeightStructuresCalculationConfigurationExporterTest.cs (.../HeightStructuresCalculationConfigurationExporterTest.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.IO.Test/Configurations/HeightStructuresCalculationConfigurationExporterTest.cs (.../HeightStructuresCalculationConfigurationExporterTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -121,7 +121,7 @@ private static StructuresCalculation CreateFullCalculation() { - return new TestHeightStructuresCalculation + return new TestHeightStructuresCalculationScenario { Name = "full config", InputParameters = @@ -229,7 +229,7 @@ protected override StructuresCalculation CreateCalculation() { - return new TestHeightStructuresCalculation(); + return new TestHeightStructuresCalculationScenario(); } protected override HeightStructuresCalculationConfigurationExporter CallConfigurationFilePathConstructor(IEnumerable calculations, string filePath) Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Integration.Test/HeightStructuresCalculationActivityIntegrationTest.cs =================================================================== diff -u -re7f074df2c06a1c0b7d628f75dd87f0552d11e08 -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Integration.Test/HeightStructuresCalculationActivityIntegrationTest.cs (.../HeightStructuresCalculationActivityIntegrationTest.cs) (revision e7f074df2c06a1c0b7d628f75dd87f0552d11e08) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Integration.Test/HeightStructuresCalculationActivityIntegrationTest.cs (.../HeightStructuresCalculationActivityIntegrationTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -104,7 +104,7 @@ DataImportHelper.ImportHydraulicBoundaryDatabase(assessmentSection, validFilePath); var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -165,7 +165,7 @@ DataImportHelper.ImportHydraulicBoundaryDatabase(assessmentSection, validFilePath); var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -207,7 +207,7 @@ DataImportHelper.ImportHydraulicBoundaryDatabase(assessmentSection, validFilePath); var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -319,7 +319,7 @@ mockRepository.ReplayAll(); var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -378,7 +378,7 @@ mockRepository.ReplayAll(); var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -437,7 +437,7 @@ mockRepository.ReplayAll(); var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/ExportInfos/HeightStructuresCalculationGroupContextExportInfoTest.cs =================================================================== diff -u -r277b8107bf8ffad7dad7fa6dbb75cdb23a0feee2 -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/ExportInfos/HeightStructuresCalculationGroupContextExportInfoTest.cs (.../HeightStructuresCalculationGroupContextExportInfoTest.cs) (revision 277b8107bf8ffad7dad7fa6dbb75cdb23a0feee2) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/ExportInfos/HeightStructuresCalculationGroupContextExportInfoTest.cs (.../HeightStructuresCalculationGroupContextExportInfoTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -138,7 +138,7 @@ if (hasCalculation) { - calculationGroup.Children.Add(new TestHeightStructuresCalculation()); + calculationGroup.Children.Add(new TestHeightStructuresCalculationScenario()); } var context = new HeightStructuresCalculationGroupContext(calculationGroup, Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/ExportInfos/HeightStructuresCalculationScenarioContextExportInfoTest.cs =================================================================== diff -u -r3cbba23100bde03baa7b08ea535b779bcb7ddf13 -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/ExportInfos/HeightStructuresCalculationScenarioContextExportInfoTest.cs (.../HeightStructuresCalculationScenarioContextExportInfoTest.cs) (revision 3cbba23100bde03baa7b08ea535b779bcb7ddf13) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/ExportInfos/HeightStructuresCalculationScenarioContextExportInfoTest.cs (.../HeightStructuresCalculationScenarioContextExportInfoTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -89,7 +89,7 @@ var assessmentSection = mocks.Stub(); mocks.ReplayAll(); - var context = new HeightStructuresCalculationScenarioContext(new TestHeightStructuresCalculation(), + var context = new HeightStructuresCalculationScenarioContext(new TestHeightStructuresCalculationScenario(), new CalculationGroup(), new HeightStructuresFailureMechanism(), assessmentSection); @@ -108,7 +108,7 @@ var assessmentSection = mocks.Stub(); mocks.ReplayAll(); - var context = new HeightStructuresCalculationScenarioContext(new TestHeightStructuresCalculation(), + var context = new HeightStructuresCalculationScenarioContext(new TestHeightStructuresCalculationScenario(), new CalculationGroup(), new HeightStructuresFailureMechanism(), assessmentSection); Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/FileImporters/HeightStructureUpdateDataStrategyTest.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/FileImporters/HeightStructureUpdateDataStrategyTest.cs (.../HeightStructureUpdateDataStrategyTest.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/FileImporters/HeightStructureUpdateDataStrategyTest.cs (.../HeightStructureUpdateDataStrategyTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -320,7 +320,7 @@ HeightStructure readStructure = new TestHeightStructure(sameId, "new structure"); HeightStructure structure = new TestHeightStructure(sameId, "original structure"); - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -373,7 +373,7 @@ var affectedStructure = new TestHeightStructure(affectedId, "Old name"); var unaffectedStructure = new TestHeightStructure(unaffectedId, unaffectedStructureName); - var affectedCalculation = new TestHeightStructuresCalculation + var affectedCalculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -382,7 +382,7 @@ Output = new TestStructuresOutput() }; - var unaffectedCalculation = new TestHeightStructuresCalculation + var unaffectedCalculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -446,7 +446,7 @@ const string removedId = "sameId"; HeightStructure structure = new TestHeightStructure(removedId, "original structure"); - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -500,7 +500,7 @@ var removedStructure = new TestHeightStructure(removedId, "Old name"); var unaffectedStructure = new TestHeightStructure(unaffectedId, unaffectedStructureName); - var affectedCalculation = new TestHeightStructuresCalculation + var affectedCalculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -509,7 +509,7 @@ Output = new TestStructuresOutput() }; - var unaffectedCalculation = new TestHeightStructuresCalculation + var unaffectedCalculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -572,7 +572,7 @@ HeightStructure readStructure = new TestHeightStructure(updatedMatchingPoint, sameId); HeightStructure structure = new TestHeightStructure(originalMatchingPoint, sameId); - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -651,7 +651,7 @@ var originalMatchingPoint = new Point2D(0, 0); HeightStructure removedStructure = new TestHeightStructure(originalMatchingPoint, sameId); - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/PropertyInfos/HeightStructuresInputContextPropertyInfoTest.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/PropertyInfos/HeightStructuresInputContextPropertyInfoTest.cs (.../HeightStructuresInputContextPropertyInfoTest.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/PropertyInfos/HeightStructuresInputContextPropertyInfoTest.cs (.../HeightStructuresInputContextPropertyInfoTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -67,7 +67,7 @@ var assessmentSection = mocks.Stub(); mocks.ReplayAll(); - var calculation = new TestHeightStructuresCalculation(); + var calculation = new TestHeightStructuresCalculationScenario(); var failureMechanism = new HeightStructuresFailureMechanism(); var context = new HeightStructuresInputContext(calculation.InputParameters, calculation, failureMechanism, assessmentSection); Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/PropertyInfos/HeightStrucutesOutputPropertyInfoTest.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/PropertyInfos/HeightStrucutesOutputPropertyInfoTest.cs (.../HeightStrucutesOutputPropertyInfoTest.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/PropertyInfos/HeightStrucutesOutputPropertyInfoTest.cs (.../HeightStrucutesOutputPropertyInfoTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -69,7 +69,7 @@ mocks.ReplayAll(); var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { Output = new StructuresOutput(0, null) }; Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -r3cbba23100bde03baa7b08ea535b779bcb7ddf13 -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 3cbba23100bde03baa7b08ea535b779bcb7ddf13) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -144,7 +144,7 @@ var failureMechanism = new HeightStructuresFailureMechanism(); var group = new CalculationGroup(); var childGroup = new CalculationGroup(); - var childCalculation = new StructuresCalculation(); + var childCalculation = new StructuresCalculationScenario(); group.Children.Add(childGroup); group.Children.Add(calculationItem); @@ -869,12 +869,12 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var failureMechanism = new HeightStructuresFailureMechanism(); - var calculationWithIllustrationPoints = new TestHeightStructuresCalculation + var calculationWithIllustrationPoints = new TestHeightStructuresCalculationScenario { Output = new TestStructuresOutput(new TestGeneralResultFaultTreeIllustrationPoint()) }; - var calculationWithOutput = new TestHeightStructuresCalculation + var calculationWithOutput = new TestHeightStructuresCalculationScenario { Output = new TestStructuresOutput() }; @@ -885,7 +885,7 @@ { calculationWithIllustrationPoints, calculationWithOutput, - new TestHeightStructuresCalculation() + new TestHeightStructuresCalculationScenario() } }; @@ -918,7 +918,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var failureMechanism = new HeightStructuresFailureMechanism(); - var calculationWithOutput = new TestHeightStructuresCalculation + var calculationWithOutput = new TestHeightStructuresCalculationScenario { Output = new TestStructuresOutput() }; @@ -928,7 +928,7 @@ Children = { calculationWithOutput, - new TestHeightStructuresCalculation() + new TestHeightStructuresCalculationScenario() } }; @@ -958,12 +958,12 @@ public void GivenCalculationsWithIllustrationPoints_WhenClearIllustrationPointsClickedAndAborted_ThenInquiryAndIllustrationPointsNotCleared() { // Given - var calculationWithIllustrationPoints = new TestHeightStructuresCalculation + var calculationWithIllustrationPoints = new TestHeightStructuresCalculationScenario { Output = new TestStructuresOutput(new TestGeneralResultFaultTreeIllustrationPoint()) }; - var calculationWithOutput = new TestHeightStructuresCalculation + var calculationWithOutput = new TestHeightStructuresCalculationScenario { Output = new TestStructuresOutput() }; @@ -974,7 +974,7 @@ { calculationWithIllustrationPoints, calculationWithOutput, - new TestHeightStructuresCalculation() + new TestHeightStructuresCalculationScenario() } }; @@ -1021,12 +1021,12 @@ public void GivenCalculationsWithIllustrationPoints_WhenClearIllustrationPointsClickedAndContinued_ThenInquiryAndIllustrationPointsCleared() { // Given - var calculationWithIllustrationPoints = new TestHeightStructuresCalculation + var calculationWithIllustrationPoints = new TestHeightStructuresCalculationScenario { Output = new TestStructuresOutput(new TestGeneralResultFaultTreeIllustrationPoint()) }; - var calculationWithOutput = new TestHeightStructuresCalculation + var calculationWithOutput = new TestHeightStructuresCalculationScenario { Output = new TestStructuresOutput() }; @@ -1037,7 +1037,7 @@ { calculationWithIllustrationPoints, calculationWithOutput, - new TestHeightStructuresCalculation() + new TestHeightStructuresCalculationScenario() } }; @@ -1092,15 +1092,15 @@ var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); var failureMechanism = new TestHeightStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new TestHeightStructuresCalculation + failureMechanism.CalculationsGroup.Children.Add(new TestHeightStructuresCalculationScenario { Name = "A", InputParameters = { HydraulicBoundaryLocation = new TestHydraulicBoundaryLocation() } }); - failureMechanism.CalculationsGroup.Children.Add(new TestHeightStructuresCalculation + failureMechanism.CalculationsGroup.Children.Add(new TestHeightStructuresCalculationScenario { Name = "B", InputParameters = @@ -1187,15 +1187,15 @@ var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); var failureMechanism = new TestHeightStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new TestHeightStructuresCalculation + failureMechanism.CalculationsGroup.Children.Add(new TestHeightStructuresCalculationScenario { Name = "A", InputParameters = { HydraulicBoundaryLocation = new TestHydraulicBoundaryLocation() } }); - failureMechanism.CalculationsGroup.Children.Add(new TestHeightStructuresCalculation + failureMechanism.CalculationsGroup.Children.Add(new TestHeightStructuresCalculationScenario { Name = "B", InputParameters = Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationScenarioContextTreeNodeInfoTest.cs =================================================================== diff -u -r3cbba23100bde03baa7b08ea535b779bcb7ddf13 -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationScenarioContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationScenarioContextTreeNodeInfoTest.cs) (revision 3cbba23100bde03baa7b08ea535b779bcb7ddf13) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationScenarioContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationScenarioContextTreeNodeInfoTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -119,7 +119,7 @@ var failureMechanism = new HeightStructuresFailureMechanism(); var parent = new CalculationGroup(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { Output = hasOutput ? new TestStructuresOutput() : null }; @@ -153,7 +153,7 @@ var failureMechanism = new HeightStructuresFailureMechanism(); var assessmentSection = new AssessmentSectionStub(); var parent = new CalculationGroup(); - var calculation = new StructuresCalculation(); + var calculation = new StructuresCalculationScenario(); var nodeData = new HeightStructuresCalculationScenarioContext(calculation, parent, failureMechanism, assessmentSection); var menuBuilder = mocks.StrictMock(); @@ -216,7 +216,7 @@ var failureMechanism = new TestHeightStructuresFailureMechanism(); var parent = new CalculationGroup(); - var calculation = new StructuresCalculation(); + var calculation = new StructuresCalculationScenario(); var nodeData = new HeightStructuresCalculationScenarioContext(calculation, parent, failureMechanism, assessmentSection); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); @@ -285,7 +285,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var parent = new CalculationGroup(); - var calculation = new StructuresCalculation(); + var calculation = new StructuresCalculationScenario(); var failureMechanism = new TestHeightStructuresFailureMechanism(); var nodeData = new HeightStructuresCalculationScenarioContext(calculation, parent, failureMechanism, assessmentSection); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); @@ -320,7 +320,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var parent = new CalculationGroup(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { InputParameters = { @@ -361,7 +361,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var parent = new CalculationGroup(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { InputParameters = { @@ -403,7 +403,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var structure = new TestHeightStructure(); var parent = new CalculationGroup(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { InputParameters = { @@ -452,7 +452,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var structure = new TestHeightStructure(); var parent = new CalculationGroup(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { InputParameters = { @@ -515,7 +515,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var structure = new TestHeightStructure(); var parent = new CalculationGroup(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { InputParameters = { @@ -579,7 +579,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var failureMechanism = new TestHeightStructuresFailureMechanism(); var parent = new CalculationGroup(); - var calculation = new StructuresCalculation(); + var calculation = new StructuresCalculationScenario(); var nodeData = new HeightStructuresCalculationScenarioContext(calculation, parent, failureMechanism, assessmentSection); using (var treeViewControl = new TreeViewControl()) @@ -611,7 +611,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(null, mocks, "invalidFilePath"); var failureMechanism = new TestHeightStructuresFailureMechanism(); var parent = new CalculationGroup(); - var calculation = new StructuresCalculation(); + var calculation = new StructuresCalculationScenario(); var nodeData = new HeightStructuresCalculationScenarioContext(calculation, parent, failureMechanism, assessmentSection); using (var treeViewControl = new TreeViewControl()) @@ -655,7 +655,7 @@ var failureMechanism = new TestHeightStructuresFailureMechanism(); var parent = new CalculationGroup(); - var calculation = new StructuresCalculation(); + var calculation = new StructuresCalculationScenario(); var nodeData = new HeightStructuresCalculationScenarioContext(calculation, parent, failureMechanism, assessmentSection); using (var treeViewControl = new TreeViewControl()) @@ -686,7 +686,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var failureMechanism = new TestHeightStructuresFailureMechanism(); var parent = new CalculationGroup(); - var calculation = new StructuresCalculation(); + var calculation = new StructuresCalculationScenario(); var nodeData = new HeightStructuresCalculationScenarioContext(calculation, parent, failureMechanism, assessmentSection); using (var treeViewControl = new TreeViewControl()) @@ -718,7 +718,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(null, mocks, "invalidFilePath"); var failureMechanism = new TestHeightStructuresFailureMechanism(); var parent = new CalculationGroup(); - var calculation = new StructuresCalculation(); + var calculation = new StructuresCalculationScenario(); var nodeData = new HeightStructuresCalculationScenarioContext(calculation, parent, failureMechanism, assessmentSection); using (var treeViewControl = new TreeViewControl()) @@ -761,7 +761,7 @@ assessmentSection.Stub(a => a.HydraulicBoundaryDatabase).Return(hydraulicBoundaryDatabase); var parent = new CalculationGroup(); - var calculation = new StructuresCalculation(); + var calculation = new StructuresCalculationScenario(); var failureMechanism = new TestHeightStructuresFailureMechanism(); var nodeData = new HeightStructuresCalculationScenarioContext(calculation, parent, failureMechanism, assessmentSection); @@ -793,7 +793,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var failureMechanism = new TestHeightStructuresFailureMechanism(); var parent = new CalculationGroup(); - var calculation = new StructuresCalculation(); + var calculation = new StructuresCalculationScenario(); var nodeData = new HeightStructuresCalculationScenarioContext(calculation, parent, @@ -831,7 +831,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var failureMechanism = new TestHeightStructuresFailureMechanism(); var parent = new CalculationGroup(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { InputParameters = { @@ -877,7 +877,7 @@ var foreshoreProfileInput = new TestForeshoreProfile(); var parent = new CalculationGroup(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { InputParameters = { @@ -927,7 +927,7 @@ var foreshoreProfileInput = new TestForeshoreProfile(true); var parent = new CalculationGroup(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { InputParameters = { @@ -980,7 +980,7 @@ var foreshoreProfileInput = new TestForeshoreProfile(true); var parent = new CalculationGroup(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { InputParameters = { @@ -1078,7 +1078,7 @@ assessmentSection.Stub(a => a.HydraulicBoundaryDatabase).Return(hydraulicBoundaryDatabase); var parent = new CalculationGroup(); - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -1162,7 +1162,7 @@ assessmentSection.Stub(a => a.HydraulicBoundaryDatabase).Return(hydraulicBoundaryDatabase); var parent = new CalculationGroup(); - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -1207,7 +1207,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var parent = new CalculationGroup(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { Output = new TestStructuresOutput(new TestGeneralResultFaultTreeIllustrationPoint()) }; @@ -1242,7 +1242,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var parent = new CalculationGroup(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { Output = new TestStructuresOutput() }; @@ -1277,7 +1277,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var parent = new CalculationGroup(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { Output = new TestStructuresOutput(new TestGeneralResultFaultTreeIllustrationPoint()) }; @@ -1325,7 +1325,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var parent = new CalculationGroup(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { Output = new TestStructuresOutput(new TestGeneralResultFaultTreeIllustrationPoint()) }; @@ -1373,7 +1373,7 @@ // Setup var group = new CalculationGroup(); var failureMechanism = new HeightStructuresFailureMechanism(); - var elementToBeRemoved = new StructuresCalculation(); + var elementToBeRemoved = new StructuresCalculationScenario(); var observer = mocks.StrictMock(); var assessmentSection = mocks.Stub(); var calculationContext = new HeightStructuresCalculationScenarioContext(elementToBeRemoved, @@ -1390,7 +1390,7 @@ mocks.ReplayAll(); group.Children.Add(elementToBeRemoved); - group.Children.Add(new StructuresCalculation()); + group.Children.Add(new StructuresCalculationScenario()); group.Attach(observer); // Precondition @@ -1411,7 +1411,7 @@ // Setup var group = new CalculationGroup(); var failureMechanism = new HeightStructuresFailureMechanism(); - var elementToBeRemoved = new StructuresCalculation(); + var elementToBeRemoved = new StructuresCalculationScenario(); var assessmentSection = mocks.Stub(); var calculationContext = new HeightStructuresCalculationScenarioContext(elementToBeRemoved, group, Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs =================================================================== diff -u -r56d072b8342f3e54ba89124ab918bd1529e257a3 -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision 56d072b8342f3e54ba89124ab918bd1529e257a3) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -674,15 +674,15 @@ var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); var failureMechanism = new TestHeightStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new TestHeightStructuresCalculation + failureMechanism.CalculationsGroup.Children.Add(new TestHeightStructuresCalculationScenario { Name = "A", InputParameters = { HydraulicBoundaryLocation = new TestHydraulicBoundaryLocation() } }); - failureMechanism.CalculationsGroup.Children.Add(new TestHeightStructuresCalculation + failureMechanism.CalculationsGroup.Children.Add(new TestHeightStructuresCalculationScenario { Name = "B", InputParameters = @@ -767,15 +767,15 @@ { // Setup var failureMechanism = new TestHeightStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new TestHeightStructuresCalculation + failureMechanism.CalculationsGroup.Children.Add(new TestHeightStructuresCalculationScenario { Name = "A", InputParameters = { HydraulicBoundaryLocation = new TestHydraulicBoundaryLocation() } }); - failureMechanism.CalculationsGroup.Children.Add(new TestHeightStructuresCalculation + failureMechanism.CalculationsGroup.Children.Add(new TestHeightStructuresCalculationScenario { Name = "B", InputParameters = @@ -831,12 +831,12 @@ public void ContextMenuStrip_FailureMechanismWithCalculationsContainingIllustrationPoints_ContextMenuItemClearIllustrationPointsEnabled() { // Setup - var calculationWithIllustrationPoints = new TestHeightStructuresCalculation + var calculationWithIllustrationPoints = new TestHeightStructuresCalculationScenario { Output = new TestStructuresOutput(new TestGeneralResultFaultTreeIllustrationPoint()) }; - var calculationWithOutput = new TestHeightStructuresCalculation + var calculationWithOutput = new TestHeightStructuresCalculationScenario { Output = new TestStructuresOutput() }; @@ -849,7 +849,7 @@ { calculationWithIllustrationPoints, calculationWithOutput, - new TestHeightStructuresCalculation() + new TestHeightStructuresCalculationScenario() } } }; @@ -883,7 +883,7 @@ public void ContextMenuStrip_FailureMechanismWithCalculationsWithoutIllustrationPoints_ContextMenuItemClearIllustrationPointsDisabled() { // Setup - var calculationWithOutput = new TestHeightStructuresCalculation + var calculationWithOutput = new TestHeightStructuresCalculationScenario { Output = new TestStructuresOutput() }; @@ -895,7 +895,7 @@ Children = { calculationWithOutput, - new TestHeightStructuresCalculation() + new TestHeightStructuresCalculationScenario() } } }; @@ -929,12 +929,12 @@ public void GivenCalculationsWithIllustrationPoints_WhenClearIllustrationPointsClickedAndAborted_ThenInquiryAndIllustrationPointsNotCleared() { // Given - var calculationWithIllustrationPoints = new TestHeightStructuresCalculation + var calculationWithIllustrationPoints = new TestHeightStructuresCalculationScenario { Output = new TestStructuresOutput(new TestGeneralResultFaultTreeIllustrationPoint()) }; - var calculationWithOutput = new TestHeightStructuresCalculation + var calculationWithOutput = new TestHeightStructuresCalculationScenario { Output = new TestStructuresOutput() }; @@ -947,7 +947,7 @@ { calculationWithIllustrationPoints, calculationWithOutput, - new TestHeightStructuresCalculation() + new TestHeightStructuresCalculationScenario() } } }; @@ -996,12 +996,12 @@ public void GivenCalculationsWithIllustrationPoints_WhenClearIllustrationPointsClickedAndContinued_ThenInquiryAndIllustrationPointsCleared() { // Given - var calculationWithIllustrationPoints = new TestHeightStructuresCalculation + var calculationWithIllustrationPoints = new TestHeightStructuresCalculationScenario { Output = new TestStructuresOutput(new TestGeneralResultFaultTreeIllustrationPoint()) }; - var calculationWithOutput = new TestHeightStructuresCalculation + var calculationWithOutput = new TestHeightStructuresCalculationScenario { Output = new TestStructuresOutput() }; @@ -1014,7 +1014,7 @@ { calculationWithIllustrationPoints, calculationWithOutput, - new TestHeightStructuresCalculation() + new TestHeightStructuresCalculationScenario() } } }; Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Service.Test/HeightStructuresCalculationActivityFactoryTest.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Service.Test/HeightStructuresCalculationActivityFactoryTest.cs (.../HeightStructuresCalculationActivityFactoryTest.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Service.Test/HeightStructuresCalculationActivityFactoryTest.cs (.../HeightStructuresCalculationActivityFactoryTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -281,7 +281,7 @@ private static StructuresCalculation CreateValidCalculation() { - return new TestHeightStructuresCalculation + return new TestHeightStructuresCalculationScenario { InputParameters = { Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Service.Test/HeightStructuresCalculationServiceTest.cs =================================================================== diff -u -r12c732c4549e943a1700d17c3d00b6ddacfcb8c5 -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Service.Test/HeightStructuresCalculationServiceTest.cs (.../HeightStructuresCalculationServiceTest.cs) (revision 12c732c4549e943a1700d17c3d00b6ddacfcb8c5) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Service.Test/HeightStructuresCalculationServiceTest.cs (.../HeightStructuresCalculationServiceTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -76,7 +76,7 @@ const string expectedValidationMessage = "De waarde voor 'Oriëntatie' moet een concreet getal zijn."; - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -118,7 +118,7 @@ string expectedValidationMessage = $"De verwachtingswaarde voor '{parameterName}' moet een concreet getal zijn."; - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -162,7 +162,7 @@ string expectedValidationMessage = $"De verwachtingswaarde voor '{parameterName}' moet een positief getal zijn."; - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -209,7 +209,7 @@ string expectedValidationMessage = $"De standaardafwijking voor '{parameterName}' moet groter zijn dan of gelijk zijn aan 0."; - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -255,7 +255,7 @@ string expectedValidationMessage = $"De variatiecoëfficiënt voor '{parameterName}' moet groter zijn dan of gelijk zijn aan 0."; - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -298,7 +298,7 @@ validHydraulicBoundaryDatabaseFilePath); mockRepository.ReplayAll(); - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -336,7 +336,7 @@ validHydraulicBoundaryDatabaseFilePath); mockRepository.ReplayAll(); - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -379,7 +379,7 @@ .Return(new TestStructuresCalculator()); mockRepository.ReplayAll(); - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -447,7 +447,7 @@ .Return(new TestStructuresCalculator()); mockRepository.ReplayAll(); - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -498,7 +498,7 @@ .Return(calculator); mockRepository.ReplayAll(); - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -572,7 +572,7 @@ .Return(calculator); mockRepository.ReplayAll(); - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -650,7 +650,7 @@ .Return(calculator); mockRepository.ReplayAll(); - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -714,7 +714,7 @@ .Return(calculator); mockRepository.ReplayAll(); - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -778,7 +778,7 @@ .Return(calculator); mockRepository.ReplayAll(); - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -856,7 +856,7 @@ .Return(calculator); mockRepository.ReplayAll(); - var calculation = new TestHeightStructuresCalculation + var calculation = new TestHeightStructuresCalculationScenario { InputParameters = { Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Service.Test/HeightStructuresDataSynchronizationServiceTest.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Service.Test/HeightStructuresDataSynchronizationServiceTest.cs (.../HeightStructuresDataSynchronizationServiceTest.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Service.Test/HeightStructuresDataSynchronizationServiceTest.cs (.../HeightStructuresDataSynchronizationServiceTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -83,26 +83,26 @@ structureToKeep }, "path/to/structures"); - var calculationWithOutput = new TestHeightStructuresCalculation + var calculationWithOutput = new TestHeightStructuresCalculationScenario { Output = new TestStructuresOutput() }; - var calculationWithStructureToRemove = new TestHeightStructuresCalculation + var calculationWithStructureToRemove = new TestHeightStructuresCalculationScenario { InputParameters = { Structure = structureToRemove } }; - var calculationWithStructureToKeepAndOutput = new TestHeightStructuresCalculation + var calculationWithStructureToKeepAndOutput = new TestHeightStructuresCalculationScenario { InputParameters = { Structure = structureToKeep }, Output = new TestStructuresOutput() }; - var calculationWithStructureToRemoveAndOutput = new TestHeightStructuresCalculation + var calculationWithStructureToRemoveAndOutput = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -561,7 +561,7 @@ var structure1 = new TestHeightStructure(new Point2D(1, 0), "Id 1,0"); var structure2 = new TestHeightStructure(new Point2D(3, 0), "Id 3,0"); var profile = new TestForeshoreProfile(); - StructuresCalculation calculation1 = new TestHeightStructuresCalculation + StructuresCalculation calculation1 = new TestHeightStructuresCalculationScenario { InputParameters = { @@ -570,15 +570,15 @@ }, Output = new TestStructuresOutput() }; - StructuresCalculation calculation2 = new TestHeightStructuresCalculation + StructuresCalculation calculation2 = new TestHeightStructuresCalculationScenario { InputParameters = { ForeshoreProfile = profile, Structure = structure2 } }; - StructuresCalculation calculation3 = new TestHeightStructuresCalculation + StructuresCalculation calculation3 = new TestHeightStructuresCalculationScenario { InputParameters = { Index: Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Observers/AssessmentSectionResultObserverTest.cs =================================================================== diff -u -re3e3433c92e142f37d6a5ed931a70ad582c240bc -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Observers/AssessmentSectionResultObserverTest.cs (.../AssessmentSectionResultObserverTest.cs) (revision e3e3433c92e142f37d6a5ed931a70ad582c240bc) +++ Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Observers/AssessmentSectionResultObserverTest.cs (.../AssessmentSectionResultObserverTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -278,7 +278,7 @@ { // Given AssessmentSection assessmentSection = CreateAssessmentSection(); - var calculation = new TestHeightStructuresCalculation(); + var calculation = new TestHeightStructuresCalculationScenario(); assessmentSection.HeightStructures.CalculationsGroup.Children.Add(calculation); using (var resultObserver = new AssessmentSectionResultObserver(assessmentSection)) Index: Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Views/AssemblyResultPerSectionViewTest.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Views/AssemblyResultPerSectionViewTest.cs (.../AssemblyResultPerSectionViewTest.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Views/AssemblyResultPerSectionViewTest.cs (.../AssemblyResultPerSectionViewTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -342,7 +342,7 @@ // Given AssessmentSection assessmentSection = TestDataGenerator.GetAssessmentSectionWithAllFailureMechanismSectionsAndResults( new Random(21).NextEnumValue()); - var calculation = new TestHeightStructuresCalculation(); + var calculation = new TestHeightStructuresCalculationScenario(); assessmentSection.HeightStructures.CalculationsGroup.Children.Add(calculation); using (new AssemblyToolCalculatorFactoryConfig()) Index: Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Views/AssemblyResultTotalViewTest.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Views/AssemblyResultTotalViewTest.cs (.../AssemblyResultTotalViewTest.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Views/AssemblyResultTotalViewTest.cs (.../AssemblyResultTotalViewTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -493,7 +493,7 @@ { // Given var assessmentSection = new AssessmentSection(new Random(21).NextEnumValue()); - var calculation = new TestHeightStructuresCalculation(); + var calculation = new TestHeightStructuresCalculationScenario(); assessmentSection.HeightStructures.CalculationsGroup.Children.Add(calculation); using (AssemblyResultTotalView view = ShowAssemblyResultTotalView(assessmentSection)) Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/AssessmentSectionTreeNodeInfoTest.cs =================================================================== diff -u -re3e3433c92e142f37d6a5ed931a70ad582c240bc -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/AssessmentSectionTreeNodeInfoTest.cs (.../AssessmentSectionTreeNodeInfoTest.cs) (revision e3e3433c92e142f37d6a5ed931a70ad582c240bc) +++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/AssessmentSectionTreeNodeInfoTest.cs (.../AssessmentSectionTreeNodeInfoTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -772,7 +772,7 @@ private static void AddHeightStructuresCalculation(AssessmentSection assessmentSection, HydraulicBoundaryLocation hydraulicBoundaryLocation) { - assessmentSection.HeightStructures.CalculationsGroup.Children.Add(new TestHeightStructuresCalculation + assessmentSection.HeightStructures.CalculationsGroup.Children.Add(new TestHeightStructuresCalculationScenario { InputParameters = { Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/ViewInfos/GeneralResultFaultTreeIllustrationPointViewInfoTest.cs =================================================================== diff -u -r3cbba23100bde03baa7b08ea535b779bcb7ddf13 -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/ViewInfos/GeneralResultFaultTreeIllustrationPointViewInfoTest.cs (.../GeneralResultFaultTreeIllustrationPointViewInfoTest.cs) (revision 3cbba23100bde03baa7b08ea535b779bcb7ddf13) +++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/ViewInfos/GeneralResultFaultTreeIllustrationPointViewInfoTest.cs (.../GeneralResultFaultTreeIllustrationPointViewInfoTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -150,7 +150,7 @@ protected override ICalculationContext GetCalculationContextWithCalculation() { return new HeightStructuresCalculationScenarioContext( - new StructuresCalculation(), + new StructuresCalculationScenario(), new CalculationGroup(), new HeightStructuresFailureMechanism(), new AssessmentSection(AssessmentSectionComposition.Dike)); Index: Riskeer/Integration/test/Riskeer.Integration.Service.Test/AssessmentSectionCalculationActivityFactoryTest.cs =================================================================== diff -u -re3e3433c92e142f37d6a5ed931a70ad582c240bc -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/Integration/test/Riskeer.Integration.Service.Test/AssessmentSectionCalculationActivityFactoryTest.cs (.../AssessmentSectionCalculationActivityFactoryTest.cs) (revision e3e3433c92e142f37d6a5ed931a70ad582c240bc) +++ Riskeer/Integration/test/Riskeer.Integration.Service.Test/AssessmentSectionCalculationActivityFactoryTest.cs (.../AssessmentSectionCalculationActivityFactoryTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -391,7 +391,7 @@ private static void AddHeightStructuresCalculation(AssessmentSection assessmentSection, HydraulicBoundaryLocation hydraulicBoundaryLocation) { - assessmentSection.HeightStructures.CalculationsGroup.Children.Add(new TestHeightStructuresCalculation + assessmentSection.HeightStructures.CalculationsGroup.Children.Add(new TestHeightStructuresCalculationScenario { InputParameters = { Index: Riskeer/Integration/test/Riskeer.Integration.Test/FileImporters/ForeshoreProfileUpdateDataStrategyIntegrationTest.cs =================================================================== diff -u -re3e3433c92e142f37d6a5ed931a70ad582c240bc -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 --- Riskeer/Integration/test/Riskeer.Integration.Test/FileImporters/ForeshoreProfileUpdateDataStrategyIntegrationTest.cs (.../ForeshoreProfileUpdateDataStrategyIntegrationTest.cs) (revision e3e3433c92e142f37d6a5ed931a70ad582c240bc) +++ Riskeer/Integration/test/Riskeer.Integration.Test/FileImporters/ForeshoreProfileUpdateDataStrategyIntegrationTest.cs (.../ForeshoreProfileUpdateDataStrategyIntegrationTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) @@ -312,7 +312,7 @@ { unaffectedForeshoreProfile }, sourceFilePath); - var unaffectedCalculation = new TestHeightStructuresCalculation + var unaffectedCalculation = new TestHeightStructuresCalculationScenario { InputParameters = {