Index: Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -re3e3433c92e142f37d6a5ed931a70ad582c240bc -r65a75cae01f369b13fe748c08b4deb60c5198c82 --- Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision e3e3433c92e142f37d6a5ed931a70ad582c240bc) +++ Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 65a75cae01f369b13fe748c08b4deb60c5198c82) @@ -480,12 +480,12 @@ { Children = { - new StructuresCalculation() + new StructuresCalculationScenario() } }; var failureMechanism = new TestClosingStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculationScenario()); IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); @@ -530,12 +530,12 @@ { Children = { - new StructuresCalculation() + new StructuresCalculationScenario() } }; var failureMechanism = new TestClosingStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculationScenario()); IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(null, mocks, "invalidFilePath"); @@ -582,14 +582,14 @@ { Children = { - new StructuresCalculation() + new StructuresCalculationScenario() } }; string validFilePath = Path.Combine(testDataPath, "complete.sqlite"); var failureMechanism = new TestClosingStructuresFailureMechanism(); - failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculationScenario()); var hydraulicBoundaryDatabase = new HydraulicBoundaryDatabase { @@ -638,7 +638,7 @@ // Setup IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var failureMechanism = new TestClosingStructuresFailureMechanism(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { InputParameters = { @@ -692,7 +692,7 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var failureMechanism = new TestClosingStructuresFailureMechanism(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { InputParameters = { @@ -1181,7 +1181,7 @@ null, failureMechanism, assessmentSection); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { Name = "Nieuwe berekening" }; @@ -1209,7 +1209,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."); } @@ -1256,7 +1256,7 @@ { Children = { - new StructuresCalculation() + new StructuresCalculationScenario() } }; @@ -1294,7 +1294,7 @@ { Children = { - new StructuresCalculation + new StructuresCalculationScenario { InputParameters = { @@ -1339,7 +1339,7 @@ { Children = { - new StructuresCalculation + new StructuresCalculationScenario { InputParameters = { @@ -1382,7 +1382,7 @@ // Given IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var structure = new TestClosingStructure(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { InputParameters = { @@ -1429,7 +1429,7 @@ // Given IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var structure = new TestClosingStructure(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { InputParameters = { @@ -1490,7 +1490,7 @@ // Given IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mocks); var structure = new TestClosingStructure(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { InputParameters = { @@ -1558,7 +1558,7 @@ ClosingStructure structure2 = new TestClosingStructure("Structure 2"); var existingCalculationGroup = new CalculationGroup(); - var existingCalculation = new StructuresCalculation(); + var existingCalculation = new StructuresCalculationScenario(); var failureMechanism = new ClosingStructuresFailureMechanism { CalculationsGroup = @@ -1609,7 +1609,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); } @@ -1664,7 +1664,7 @@ contextMenu.Items[contextMenuGenerateCalculationsIndexRootGroup].PerformClick(); // Then - Assert.AreEqual(0, failureMechanism.Calculations.OfType>().Count()); + Assert.AreEqual(0, failureMechanism.Calculations.OfType>().Count()); } } } @@ -1686,7 +1686,7 @@ { Children = { - new StructuresCalculation + new StructuresCalculationScenario { Name = existingCalculationName } @@ -1730,7 +1730,7 @@ contextMenu.Items[contextMenuGenerateCalculationsIndexRootGroup].PerformClick(); // Then - StructuresCalculation[] closingStructuresCalculations = failureMechanism.Calculations.OfType>().ToArray(); + StructuresCalculationScenario[] closingStructuresCalculations = failureMechanism.Calculations.OfType>().ToArray(); Assert.AreEqual(2, closingStructuresCalculations.Length); Assert.AreEqual(expectedNewName, closingStructuresCalculations[1].Name); } @@ -1798,7 +1798,7 @@ FailureMechanismSectionTestFactory.CreateFailureMechanismSection() }); - var calculation = new StructuresCalculation(); + var calculation = new StructuresCalculationScenario(); group.Children.Add(calculation); ClosingStructuresFailureMechanismSectionResult result = failureMechanism.SectionResults.First(); @@ -1828,7 +1828,7 @@ null, failureMechanism, assessmentSection); - var calculation = new StructuresCalculation(); + var calculation = new StructuresCalculationScenario(); observer.Expect(o => o.UpdateObserver());