Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -rd1c333df3a55ad8baba0d1cc0c4cff54c69668d7 -rd7538c5a971f790602c7c6d0e7722c82696fc103 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision d1c333df3a55ad8baba0d1cc0c4cff54c69668d7) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision d7538c5a971f790602c7c6d0e7722c82696fc103) @@ -483,12 +483,12 @@ { Children = { - new StructuresCalculation() + new StructuresCalculationScenario() } }; var failureMechanism = new TestHeightStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculationScenario()); IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var nodeData = new HeightStructuresCalculationGroupContext(group, @@ -526,12 +526,12 @@ { Children = { - new StructuresCalculation() + new StructuresCalculationScenario() } }; var failureMechanism = new TestHeightStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculationScenario()); IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(null, mocks, "invalidFilePath"); @@ -571,14 +571,14 @@ { Children = { - new StructuresCalculation() + new StructuresCalculationScenario() } }; string validFilePath = Path.Combine(testDataPath, "complete.sqlite"); var failureMechanism = new TestHeightStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculationScenario()); var hydraulicBoundaryDatabase = new HydraulicBoundaryDatabase { @@ -624,12 +624,12 @@ { Children = { - new StructuresCalculation() + new StructuresCalculationScenario() } }; var failureMechanism = new TestHeightStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculationScenario()); IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); @@ -668,12 +668,12 @@ { Children = { - new StructuresCalculation() + new StructuresCalculationScenario() } }; var failureMechanism = new TestHeightStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculationScenario()); IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(null, mocks, "invalidFilePath"); @@ -713,14 +713,14 @@ { Children = { - new StructuresCalculation() + new StructuresCalculationScenario() } }; string validFilePath = Path.Combine(testDataPath, "complete.sqlite"); var failureMechanism = new TestHeightStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculationScenario()); var hydraulicBoundaryDatabase = new HydraulicBoundaryDatabase { @@ -764,7 +764,7 @@ // Setup IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var failureMechanism = new TestHeightStructuresFailureMechanism(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { InputParameters = { @@ -818,7 +818,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var failureMechanism = new TestHeightStructuresFailureMechanism(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { InputParameters = { @@ -1305,7 +1305,7 @@ null, failureMechanism, assessmentSection); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { Name = "Nieuwe berekening" }; @@ -1333,7 +1333,7 @@ // Assert Assert.AreEqual(2, group.Children.Count); ICalculationBase newlyAddedItem = group.Children.Last(); - Assert.IsInstanceOf>(newlyAddedItem); + Assert.IsInstanceOf>(newlyAddedItem); Assert.AreEqual("Nieuwe berekening (1)", newlyAddedItem.Name, "An item with the same name default name already exists, therefore '(1)' needs to be appended."); } @@ -1380,7 +1380,7 @@ { Children = { - new StructuresCalculation() + new StructuresCalculationScenario() } }; @@ -1418,7 +1418,7 @@ { Children = { - new StructuresCalculation + new StructuresCalculationScenario { InputParameters = { @@ -1463,7 +1463,7 @@ { Children = { - new StructuresCalculation + new StructuresCalculationScenario { InputParameters = { @@ -1506,7 +1506,7 @@ // Given IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var structure = new TestHeightStructure(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { InputParameters = { @@ -1553,7 +1553,7 @@ // Given IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var structure = new TestHeightStructure(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { InputParameters = { @@ -1614,7 +1614,7 @@ // Given IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var structure = new TestHeightStructure(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { InputParameters = { @@ -1681,7 +1681,7 @@ HeightStructure structure1 = new TestHeightStructure("Structure Id", "Structure 1"); var existingCalculationGroup = new CalculationGroup(); - var existingCalculation = new StructuresCalculation(); + var existingCalculation = new StructuresCalculationScenario(); var failureMechanism = new HeightStructuresFailureMechanism { CalculationsGroup = @@ -1732,7 +1732,7 @@ Assert.AreEqual(3, failureMechanism.CalculationsGroup.Children.Count); Assert.AreSame(existingCalculationGroup, failureMechanism.CalculationsGroup.Children[0]); Assert.AreSame(existingCalculation, failureMechanism.CalculationsGroup.Children[1]); - var generatedCalculation = failureMechanism.CalculationsGroup.Children[2] as StructuresCalculation; + var generatedCalculation = failureMechanism.CalculationsGroup.Children[2] as StructuresCalculationScenario; Assert.IsNotNull(generatedCalculation); Assert.AreSame(structure1, generatedCalculation.InputParameters.Structure); } @@ -1786,7 +1786,7 @@ contextMenu.Items[contextMenuGenerateCalculationsIndexRootGroup].PerformClick(); // Then - Assert.AreEqual(0, failureMechanism.Calculations.OfType>().Count()); + Assert.AreEqual(0, failureMechanism.Calculations.OfType>().Count()); } } } @@ -1808,7 +1808,7 @@ { Children = { - new StructuresCalculation + new StructuresCalculationScenario { Name = existingCalculationName } @@ -1853,7 +1853,7 @@ contextMenu.Items[contextMenuGenerateCalculationsIndexRootGroup].PerformClick(); // Then - StructuresCalculation[] heightStructuresCalculations = failureMechanism.Calculations.OfType>().ToArray(); + StructuresCalculationScenario[] heightStructuresCalculations = failureMechanism.Calculations.OfType>().ToArray(); Assert.AreEqual(2, heightStructuresCalculations.Length); Assert.AreEqual(expectedNewName, heightStructuresCalculations[1].Name); } @@ -1921,7 +1921,7 @@ parentGroup.Children.Add(group); - var calculation = new StructuresCalculation(); + var calculation = new StructuresCalculationScenario(); group.Children.Add(calculation); HeightStructuresFailureMechanismSectionResult result = failureMechanism.SectionResults.First(); @@ -1951,7 +1951,7 @@ null, failureMechanism, assessmentSection); - var calculation = new StructuresCalculation(); + var calculation = new StructuresCalculationScenario(); observer.Expect(o => o.UpdateObserver());