Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/Ringtoets.StabilityPointStructures.Data.Test.csproj
===================================================================
diff -u -r341ddc4bed3bbbae529c1c282d15cc9b593d1e6a -r803fbebd35cdc089c8167604fc4580c1ff90d7c3
--- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/Ringtoets.StabilityPointStructures.Data.Test.csproj (.../Ringtoets.StabilityPointStructures.Data.Test.csproj) (revision 341ddc4bed3bbbae529c1c282d15cc9b593d1e6a)
+++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/Ringtoets.StabilityPointStructures.Data.Test.csproj (.../Ringtoets.StabilityPointStructures.Data.Test.csproj) (revision 803fbebd35cdc089c8167604fc4580c1ff90d7c3)
@@ -41,6 +41,10 @@
..\..\..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll
True
+
+ ..\..\..\..\packages\RhinoMocks.3.6.1\lib\net\Rhino.Mocks.dll
+ True
+
Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/StabilityPointStructuresFailureMechanismTest.cs
===================================================================
diff -u -r341ddc4bed3bbbae529c1c282d15cc9b593d1e6a -r803fbebd35cdc089c8167604fc4580c1ff90d7c3
--- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/StabilityPointStructuresFailureMechanismTest.cs (.../StabilityPointStructuresFailureMechanismTest.cs) (revision 341ddc4bed3bbbae529c1c282d15cc9b593d1e6a)
+++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/StabilityPointStructuresFailureMechanismTest.cs (.../StabilityPointStructuresFailureMechanismTest.cs) (revision 803fbebd35cdc089c8167604fc4580c1ff90d7c3)
@@ -22,6 +22,8 @@
using System.Linq;
using Core.Common.Base.Geometry;
using NUnit.Framework;
+using Rhino.Mocks;
+using Ringtoets.Common.Data.Calculation;
using Ringtoets.Common.Data.FailureMechanism;
namespace Ringtoets.StabilityPointStructures.Data.Test
@@ -95,5 +97,35 @@
Assert.AreEqual(0, failureMechanism.Sections.Count());
Assert.AreEqual(0, failureMechanism.SectionResults.Count());
}
+
+ [Test]
+ public void Calculations_MultipleChildrenAdded_ReturnStabilityPointStructuresCalculations()
+ {
+ // Setup
+ var mocks = new MockRepository();
+ var failureMechanism = new StabilityPointStructuresFailureMechanism
+ {
+ CalculationsGroup =
+ {
+ Children =
+ {
+ new CalculationGroup(),
+ new StabilityPointStructuresCalculation(),
+ mocks.StrictMock(),
+ new StabilityPointStructuresCalculation()
+ }
+ }
+ };
+
+ mocks.ReplayAll();
+
+ // Call
+ var calculations = failureMechanism.Calculations.ToList();
+
+ // Assert
+ Assert.AreEqual(2, calculations.Count);
+ CollectionAssert.AllItemsAreInstancesOfType(calculations, typeof(StabilityPointStructuresCalculation));
+ mocks.VerifyAll();
+ }
}
}
\ No newline at end of file
Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/packages.config
===================================================================
diff -u -rae14c5d4e4624fa87390e6d63bb419c648e12dda -r803fbebd35cdc089c8167604fc4580c1ff90d7c3
--- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/packages.config (.../packages.config) (revision ae14c5d4e4624fa87390e6d63bb419c648e12dda)
+++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/packages.config (.../packages.config) (revision 803fbebd35cdc089c8167604fc4580c1ff90d7c3)
@@ -23,4 +23,5 @@
-->
+
\ No newline at end of file