Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresContextTreeNodeInfoTest.cs =================================================================== diff -u -r4bf59bb3506b840b284efe0c0f4431b7876e0e5b -re46bec50706f5ea1a7754bbaebfc892745d8604a --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresContextTreeNodeInfoTest.cs (.../HeightStructuresContextTreeNodeInfoTest.cs) (revision 4bf59bb3506b840b284efe0c0f4431b7876e0e5b) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresContextTreeNodeInfoTest.cs (.../HeightStructuresContextTreeNodeInfoTest.cs) (revision e46bec50706f5ea1a7754bbaebfc892745d8604a) @@ -88,7 +88,8 @@ var failureMechanism = new HeightStructuresFailureMechanism(); - var heightStructuresContext = new HeightStructuresContext(failureMechanism.HeightStructures, failureMechanism, assessmentSection); + var heightStructuresContext = new HeightStructuresContext(failureMechanism.HeightStructuresCollection, + failureMechanism, assessmentSection); // Call string text = info.Text(heightStructuresContext); @@ -109,7 +110,8 @@ var failureMechanism = new HeightStructuresFailureMechanism(); - var heightStructuresContext = new HeightStructuresContext(failureMechanism.HeightStructures, failureMechanism, assessmentSection); + var heightStructuresContext = new HeightStructuresContext(failureMechanism.HeightStructuresCollection, + failureMechanism, assessmentSection); // Call Image image = info.Image(heightStructuresContext); @@ -127,18 +129,17 @@ var asssessmentSection = mocks.Stub(); mocks.ReplayAll(); - var failureMechanism = new HeightStructuresFailureMechanism + var failureMechanism = new HeightStructuresFailureMechanism(); + failureMechanism.HeightStructuresCollection.AddRange(new[] { - HeightStructures = - { - new TestHeightStructure() - } - }; + new TestHeightStructure("TestHeightStructure", "id") + }, "some path"); // Precondition - CollectionAssert.IsNotEmpty(failureMechanism.HeightStructures); + CollectionAssert.IsNotEmpty(failureMechanism.HeightStructuresCollection); - var heightStructuresContext = new HeightStructuresContext(failureMechanism.HeightStructures, failureMechanism, asssessmentSection); + var heightStructuresContext = new HeightStructuresContext(failureMechanism.HeightStructuresCollection, + failureMechanism, asssessmentSection); // Call Color color = info.ForeColor(heightStructuresContext); @@ -156,24 +157,21 @@ var assessmentSection = mocks.Stub(); mocks.ReplayAll(); - HeightStructure heightStructure1 = new TestHeightStructure(); - HeightStructure heightStructure2 = new TestHeightStructure(); - var failureMechanism = new HeightStructuresFailureMechanism + var failureMechanism = new HeightStructuresFailureMechanism(); + failureMechanism.HeightStructuresCollection.AddRange(new[] { - HeightStructures = - { - heightStructure1, - heightStructure2 - } - }; + new TestHeightStructure("TestHeightStructure 1", "first id"), + new TestHeightStructure("TestHeightStructure 2", "second id") + }, "some path"); - var heightStructuresContext = new HeightStructuresContext(failureMechanism.HeightStructures, failureMechanism, assessmentSection); + var heightStructuresContext = new HeightStructuresContext(failureMechanism.HeightStructuresCollection, + failureMechanism, assessmentSection); // Call object[] children = info.ChildNodeObjects(heightStructuresContext); // Assert - CollectionAssert.AreEqual(failureMechanism.HeightStructures, children); + CollectionAssert.AreEqual(failureMechanism.HeightStructuresCollection, children); mocks.VerifyAll(); } @@ -190,7 +188,8 @@ // Precondition CollectionAssert.IsEmpty(failureMechanism.HeightStructures); - var heightStructuresContext = new HeightStructuresContext(failureMechanism.HeightStructures, failureMechanism, asssessmentSection); + var heightStructuresContext = new HeightStructuresContext(failureMechanism.HeightStructuresCollection, + failureMechanism, asssessmentSection); // Call Color color = info.ForeColor(heightStructuresContext);