Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -r176feef0b55aa8f7a7ebd229d7da1a679ce54303 -rab20c4eb4ca81bd3845d50210d2bdb301177af6a --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 176feef0b55aa8f7a7ebd229d7da1a679ce54303) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) @@ -38,6 +38,7 @@ using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.Helpers; using Ringtoets.HeightStructures.Data; using Ringtoets.HeightStructures.Data.TestUtil; @@ -141,7 +142,7 @@ var failureMechanism = new HeightStructuresFailureMechanism(); var group = new CalculationGroup(); var childGroup = new CalculationGroup(); - var childCalculation = new HeightStructuresCalculation(); + var childCalculation = new StructuresCalculation(); group.Children.Add(childGroup); group.Children.Add(calculationItemMock); @@ -414,7 +415,7 @@ { Children = { - new HeightStructuresCalculation() + new StructuresCalculation() } }; @@ -452,7 +453,7 @@ { Children = { - new HeightStructuresCalculation() + new StructuresCalculation() } }; @@ -461,7 +462,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionStub = mocks.Stub(); @@ -499,7 +500,7 @@ { Children = { - new HeightStructuresCalculation() + new StructuresCalculation() } }; @@ -508,7 +509,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionStub = mocks.Stub(); var nodeData = new HeightStructuresCalculationGroupContext(group, @@ -548,7 +549,7 @@ { Children = { - new HeightStructuresCalculation() + new StructuresCalculation() } }; @@ -565,7 +566,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionStub = mocks.Stub(); var nodeData = new HeightStructuresCalculationGroupContext(group, @@ -606,7 +607,7 @@ { Children = { - new HeightStructuresCalculation() + new StructuresCalculation() } }; @@ -644,7 +645,7 @@ { Children = { - new HeightStructuresCalculation() + new StructuresCalculation() } }; @@ -653,7 +654,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionStub = mocks.Stub(); @@ -691,7 +692,7 @@ { Children = { - new HeightStructuresCalculation() + new StructuresCalculation() } }; @@ -700,7 +701,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionStub = mocks.Stub(); var nodeData = new HeightStructuresCalculationGroupContext(group, @@ -740,7 +741,7 @@ { Children = { - new HeightStructuresCalculation() + new StructuresCalculation() } }; @@ -757,7 +758,7 @@ { new Point2D(0, 0) })); - failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); var assessmentSectionStub = mocks.Stub(); var nodeData = new HeightStructuresCalculationGroupContext(group, @@ -1007,7 +1008,7 @@ var nodeData = new HeightStructuresCalculationGroupContext(group, failureMechanism, assessmentSectionStub); - var calculation = new HeightStructuresCalculation + var calculation = new StructuresCalculation { Name = "Nieuwe berekening" }; @@ -1035,7 +1036,7 @@ // Assert Assert.AreEqual(2, group.Children.Count); var newlyAddedItem = group.Children.Last(); - Assert.IsInstanceOf(newlyAddedItem); + Assert.IsInstanceOf>(newlyAddedItem); Assert.AreEqual("Nieuwe berekening (1)", newlyAddedItem.Name, "An item with the same name default name already exists, therefore '(1)' needs to be appended."); } @@ -1093,7 +1094,7 @@ contextMenu.Items[contextGenerateCalculationsIndexRootGroup].PerformClick(); // Then - var heightStructuresCalculations = failureMechanism.Calculations.OfType().ToArray(); + var heightStructuresCalculations = failureMechanism.Calculations.OfType>().ToArray(); Assert.AreEqual(1, heightStructuresCalculations.Length); Assert.AreSame(structure1, heightStructuresCalculations[0].InputParameters.Structure); } @@ -1151,7 +1152,7 @@ contextMenu.Items[contextGenerateCalculationsIndexRootGroup].PerformClick(); // Then - Assert.AreEqual(0, failureMechanism.Calculations.OfType().Count()); + Assert.AreEqual(0, failureMechanism.Calculations.OfType>().Count()); } } } @@ -1177,7 +1178,7 @@ { Children = { - new HeightStructuresCalculation + new StructuresCalculation { Name = existingCalculationName } @@ -1218,7 +1219,7 @@ contextMenu.Items[contextGenerateCalculationsIndexRootGroup].PerformClick(); // Then - var heightStructuresCalculations = failureMechanism.Calculations.OfType().ToArray(); + var heightStructuresCalculations = failureMechanism.Calculations.OfType>().ToArray(); Assert.AreEqual(2, heightStructuresCalculations.Length); Assert.AreEqual(expectedNewName, heightStructuresCalculations[1].Name); } @@ -1282,7 +1283,7 @@ new Point2D(0, 0) })); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); group.Children.Add(calculation); failureMechanism.SectionResults.First().Calculation = calculation; @@ -1308,7 +1309,7 @@ var parentNodeData = new HeightStructuresCalculationGroupContext(parentGroup, failureMechanism, assessmentSectionStub); - var calculation = new HeightStructuresCalculation(); + var calculation = new StructuresCalculation(); observerMock.Expect(o => o.UpdateObserver());