Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -r493f5782760f6e8a65213bbbce141be20751e7c1 -r48605dff2e892ad7fe634924e8ca8cd8674f0d9a --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationContextTreeNodeInfoTest.cs) (revision 493f5782760f6e8a65213bbbce141be20751e7c1) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationContextTreeNodeInfoTest.cs) (revision 48605dff2e892ad7fe634924e8ca8cd8674f0d9a) @@ -44,7 +44,6 @@ using Ringtoets.Common.Data.Contribution; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Hydraulics; -using Ringtoets.Common.Data.Probability; using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Forms.PresentationObjects; @@ -112,41 +111,17 @@ } [Test] - public void ChildNodeObjects_CalculationWithoutOutput_ReturnCollectionWithEmptyOutputObject() + [TestCase(true)] + [TestCase(false)] + public void ChildNodeObjects_Always_ReturnsChildrenOfData(bool hasOutput) { var assessmentSection = mocks.Stub(); mocks.ReplayAll(); var failureMechanism = new ClosingStructuresFailureMechanism(); - var calculation = new StructuresCalculation(); - var calculationContext = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSection); - - // Call - object[] children = info.ChildNodeObjects(calculationContext).ToArray(); - - // Assert - Assert.AreEqual(3, children.Length); - - var comment = children[0] as Comment; - Assert.AreSame(calculationContext.WrappedData.Comments, comment); - - var closingStructuresInputContext = children[1] as ClosingStructuresInputContext; - Assert.IsNotNull(closingStructuresInputContext); - Assert.AreSame(calculationContext.WrappedData.InputParameters, closingStructuresInputContext.WrappedData); - - Assert.IsInstanceOf(children[2]); - } - - [Test] - public void ChildNodeObjects_CalculationWithOutput_ReturnCollectionWithOutputObject() - { - var assessmentSection = mocks.Stub(); - mocks.ReplayAll(); - - var failureMechanism = new ClosingStructuresFailureMechanism(); var calculation = new StructuresCalculation { - Output = new TestStructuresOutput() + Output = hasOutput ? new TestStructuresOutput() : null }; var calculationContext = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSection);