Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/AssessmentSectionBaseTreeNodeInfoTest.cs =================================================================== diff -u -r2ad324afda61327592af1226a9d8d3de01b614be -r7144ed9829e56a34e064267053216ffbcf6cff52 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/AssessmentSectionBaseTreeNodeInfoTest.cs (.../AssessmentSectionBaseTreeNodeInfoTest.cs) (revision 2ad324afda61327592af1226a9d8d3de01b614be) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/AssessmentSectionBaseTreeNodeInfoTest.cs (.../AssessmentSectionBaseTreeNodeInfoTest.cs) (revision 7144ed9829e56a34e064267053216ffbcf6cff52) @@ -10,9 +10,12 @@ using Rhino.Mocks; using Ringtoets.Common.Data; using Ringtoets.Common.Data.Contribution; -using Ringtoets.Integration.Data; +using Ringtoets.Integration.Data.Placeholders; using Ringtoets.Integration.Forms.PresentationObjects; using Ringtoets.Integration.Plugin; +using Ringtoets.Piping.Data; +using Ringtoets.Piping.Forms.PresentationObjects; + using RingtoetsIntegrationFormsResources = Ringtoets.Integration.Forms.Properties.Resources; namespace Ringtoets.Integration.Forms.Test.TreeNodeInfos @@ -110,21 +113,19 @@ public void ChildNodeObjects_Always_ReturnsChildsOnData() { // Setup - var failureMechanism = mocks.StrictMock(); - failureMechanism.Expect(f => f.Name).Return("some name"); - failureMechanism.Expect(f => f.Contribution).Return(100); - - mocks.ReplayAll(); - - var failureMechanismList = new List { failureMechanism }; + var failureMechanismList = new List + { + new PipingFailureMechanism(), + new FailureMechanismPlaceholder("A") + }; var contribution = new FailureMechanismContribution(failureMechanismList, 10.0, 2); var assessmentSection = new TestAssessmentSectionBase(contribution, failureMechanismList); // Call var objects = info.ChildNodeObjects(assessmentSection).ToArray(); // Assert - Assert.AreEqual(4, objects.Length); + Assert.AreEqual(5, objects.Length); var referenceLineContext = (ReferenceLineContext)objects[0]; Assert.AreSame(assessmentSection.ReferenceLine, referenceLineContext.WrappedData); Assert.AreSame(assessmentSection, referenceLineContext.Parent); @@ -135,8 +136,14 @@ Assert.AreSame(assessmentSection.HydraulicBoundaryDatabase, context.Parent.HydraulicBoundaryDatabase); Assert.AreSame(assessmentSection, context.Parent); - Assert.AreSame(failureMechanism, objects[3]); + var pipingFailureMechanismContext = (PipingFailureMechanismContext)objects[3]; + Assert.AreSame(failureMechanismList[0], pipingFailureMechanismContext.WrappedData); + Assert.AreSame(assessmentSection, pipingFailureMechanismContext.Parent); + var placeholderFailureMechanismContext = (FailureMechanismPlaceholderContext)objects[4]; + Assert.AreSame(failureMechanismList[1], placeholderFailureMechanismContext.WrappedData); + Assert.AreSame(assessmentSection, placeholderFailureMechanismContext.Parent); + mocks.VerifyAll(); }