Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StochasticSoilModelEntityReadExtensionsTest.cs =================================================================== diff -u -rd9bbfea8e0f8e620379c9b51e427d24560b7cbd4 -ra20f5008f39cfa4fd6f94572fd07a011f76609f4 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StochasticSoilModelEntityReadExtensionsTest.cs (.../StochasticSoilModelEntityReadExtensionsTest.cs) (revision d9bbfea8e0f8e620379c9b51e427d24560b7cbd4) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StochasticSoilModelEntityReadExtensionsTest.cs (.../StochasticSoilModelEntityReadExtensionsTest.cs) (revision a20f5008f39cfa4fd6f94572fd07a011f76609f4) @@ -246,10 +246,15 @@ public void ReadAsMacroStabilityInwardsStochasticSoilModel_WithMinimumEntity_ReturnsNewStochasticSoilModelWithPropertiesSet() { // Setup + var random = new Random(21); + var geometry = new[] + { + new Point2D(random.NextDouble(), random.NextDouble()) + }; var entity = new StochasticSoilModelEntity { Name = "testName", - StochasticSoilModelSegmentPointXml = new Point2DXmlSerializer().ToXml(new Point2D[0]) + StochasticSoilModelSegmentPointXml = new Point2DXmlSerializer().ToXml(geometry) }; var collector = new ReadConversionCollector(); @@ -259,18 +264,24 @@ // Assert Assert.IsNotNull(model); Assert.AreEqual(entity.Name, model.Name); - CollectionAssert.IsEmpty(model.Geometry); + CollectionAssert.AreEqual(geometry, model.Geometry); CollectionAssert.IsEmpty(model.StochasticSoilProfiles); } [Test] public void ReadAsMacroStabilityInwardsStochasticSoilModel_WithStochasticSoilProfiles_ReturnsNewMacroStabilityInwardsStochasticSoilModelWithStochasticSoilProfiles() { // Setup + var random = new Random(21); + string segmentPointsXml = new Point2DXmlSerializer().ToXml(new[] + { + new Point2D(random.NextDouble(), random.NextDouble()) + }); + var entity = new StochasticSoilModelEntity { Name = "StochasticSoilModel", - StochasticSoilModelSegmentPointXml = new Point2DXmlSerializer().ToXml(new Point2D[0]), + StochasticSoilModelSegmentPointXml = segmentPointsXml, MacroStabilityInwardsStochasticSoilProfileEntities = { new MacroStabilityInwardsStochasticSoilProfileEntity @@ -342,10 +353,16 @@ public void ReadAsMacroStabilityInwardsStochasticSoilModel_SameStochasticSoilModelEntityMultipleTimes_ReturnSameStochasticSoilModel() { // Setup + var random = new Random(21); + string segmentPointsXml = new Point2DXmlSerializer().ToXml(new[] + { + new Point2D(random.NextDouble(), random.NextDouble()) + }); + var entity = new StochasticSoilModelEntity { Name = "StochasticSoilModel", - StochasticSoilModelSegmentPointXml = new Point2DXmlSerializer().ToXml(new Point2D[0]) + StochasticSoilModelSegmentPointXml = segmentPointsXml }; var collector = new ReadConversionCollector();