Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/Piping/StochasticSoilProfileCreateExtensions.cs =================================================================== diff -u -r0fbb881c5c82f540f01772234b3c1faadfab07f9 -rb5e8e61b14bbdc9307a0eb69a27275bb929a2fdf --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/Piping/StochasticSoilProfileCreateExtensions.cs (.../StochasticSoilProfileCreateExtensions.cs) (revision 0fbb881c5c82f540f01772234b3c1faadfab07f9) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/Piping/StochasticSoilProfileCreateExtensions.cs (.../StochasticSoilProfileCreateExtensions.cs) (revision b5e8e61b14bbdc9307a0eb69a27275bb929a2fdf) @@ -44,6 +44,7 @@ var entity = new StochasticSoilProfileEntity { Probability = profile.Probability, + Type = Convert.ToByte(profile.SoilProfileType), SoilProfileEntity = profile.SoilProfile.Create(registry), Order = order }; Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/Piping/StochasticSoilProfileEntityReadExtensions.cs =================================================================== diff -u -r0fbb881c5c82f540f01772234b3c1faadfab07f9 -rb5e8e61b14bbdc9307a0eb69a27275bb929a2fdf --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/Piping/StochasticSoilProfileEntityReadExtensions.cs (.../StochasticSoilProfileEntityReadExtensions.cs) (revision 0fbb881c5c82f540f01772234b3c1faadfab07f9) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/Piping/StochasticSoilProfileEntityReadExtensions.cs (.../StochasticSoilProfileEntityReadExtensions.cs) (revision b5e8e61b14bbdc9307a0eb69a27275bb929a2fdf) @@ -50,7 +50,7 @@ return collector.Get(entity); } - var profile = new StochasticSoilProfile(entity.Probability, SoilProfileType.SoilProfile1D, -1); + var profile = new StochasticSoilProfile(entity.Probability, (SoilProfileType)entity.Type, -1); entity.ReadSoilProfile(profile, collector); collector.Read(entity, profile); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/StochasticSoilProfileCreateExtensionsTest.cs =================================================================== diff -u -rf4efcc2bb58d597f4a19884d98d0ab79bab04b1c -rb5e8e61b14bbdc9307a0eb69a27275bb929a2fdf --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/StochasticSoilProfileCreateExtensionsTest.cs (.../StochasticSoilProfileCreateExtensionsTest.cs) (revision f4efcc2bb58d597f4a19884d98d0ab79bab04b1c) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/StochasticSoilProfileCreateExtensionsTest.cs (.../StochasticSoilProfileCreateExtensionsTest.cs) (revision b5e8e61b14bbdc9307a0eb69a27275bb929a2fdf) @@ -23,6 +23,7 @@ using Application.Ringtoets.Storage.Create; using Application.Ringtoets.Storage.Create.Piping; using Application.Ringtoets.Storage.DbContext; +using Core.Common.TestUtil; using NUnit.Framework; using Ringtoets.Piping.Data; using Ringtoets.Piping.KernelWrapper.TestUtil; @@ -48,13 +49,15 @@ } [Test] - public void Create_WithCollector_ReturnsStochasticSoilProfileEntityWithPropertiesSet() + [TestCase(SoilProfileType.SoilProfile1D)] + [TestCase(SoilProfileType.SoilProfile2D)] + public void Create_WithCollector_ReturnsStochasticSoilProfileEntityWithPropertiesSet(SoilProfileType type) { // Setup var random = new Random(21); double probability = random.NextDouble(); int order = random.Next(); - var stochasticSoilProfile = new StochasticSoilProfile(probability, SoilProfileType.SoilProfile1D, -1) + var stochasticSoilProfile = new StochasticSoilProfile(probability, type, -1) { SoilProfile = new TestPipingSoilProfile() }; @@ -66,6 +69,7 @@ // Assert Assert.IsNotNull(entity); Assert.AreEqual(probability, entity.Probability); + Assert.AreEqual(Convert.ToByte(type), entity.Type); Assert.AreEqual(order, entity.Order); } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/Piping/StochasticSoilProfileEntityReadExtensionsTest.cs =================================================================== diff -u -r545b105a213ed85564861b4bcf6d2d6425dbde50 -rb5e8e61b14bbdc9307a0eb69a27275bb929a2fdf --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/Piping/StochasticSoilProfileEntityReadExtensionsTest.cs (.../StochasticSoilProfileEntityReadExtensionsTest.cs) (revision 545b105a213ed85564861b4bcf6d2d6425dbde50) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/Piping/StochasticSoilProfileEntityReadExtensionsTest.cs (.../StochasticSoilProfileEntityReadExtensionsTest.cs) (revision b5e8e61b14bbdc9307a0eb69a27275bb929a2fdf) @@ -25,6 +25,7 @@ using Application.Ringtoets.Storage.Read.Piping; using NUnit.Framework; using Ringtoets.Piping.Data; +using Ringtoets.Piping.Primitives; namespace Application.Ringtoets.Storage.Test.Read.Piping { @@ -46,14 +47,17 @@ } [Test] - public void Read_WithCollector_ReturnsNewStochasticSoilProfileWithPropertiesSetAndEntityRegistered() + [TestCase(1)] + [TestCase(2)] + public void Read_WithCollector_ReturnsNewStochasticSoilProfileWithPropertiesSetAndEntityRegistered(byte soilProfileType) { // Setup var random = new Random(21); double probability = random.NextDouble(); var entity = new StochasticSoilProfileEntity { Probability = probability, + Type = soilProfileType, SoilProfileEntity = new SoilProfileEntity { SoilLayerEntities = @@ -70,7 +74,7 @@ // Assert Assert.IsNotNull(profile); Assert.AreEqual(probability, profile.Probability, 1e-6); - + Assert.AreEqual((SoilProfileType)soilProfileType, profile.SoilProfileType); Assert.IsTrue(collector.Contains(entity)); } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil.Test/RingtoetsProjectTestHelperTest.cs =================================================================== diff -u -rfc86b96d416f7114060023c6ce714e655002788d -rb5e8e61b14bbdc9307a0eb69a27275bb929a2fdf --- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil.Test/RingtoetsProjectTestHelperTest.cs (.../RingtoetsProjectTestHelperTest.cs) (revision fc86b96d416f7114060023c6ce714e655002788d) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil.Test/RingtoetsProjectTestHelperTest.cs (.../RingtoetsProjectTestHelperTest.cs) (revision b5e8e61b14bbdc9307a0eb69a27275bb929a2fdf) @@ -100,7 +100,7 @@ Assert.AreEqual(-1, stochasticSoilProfile1.SoilProfileId); StochasticSoilProfile stochasticSoilProfile2 = soilModel.StochasticSoilProfiles[1]; Assert.AreEqual(0.8, stochasticSoilProfile2.Probability); - Assert.AreEqual(SoilProfileType.SoilProfile1D, stochasticSoilProfile2.SoilProfileType); + Assert.AreEqual(SoilProfileType.SoilProfile2D, stochasticSoilProfile2.SoilProfileType); Assert.AreEqual(-1, stochasticSoilProfile2.SoilProfileId); Assert.AreEqual("some/path/to/surfaceLineFile", failureMechanism.SurfaceLines.SourcePath); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs =================================================================== diff -u -rba715436cd0186ee10a1edc13d547ee27bea4c89 -rb5e8e61b14bbdc9307a0eb69a27275bb929a2fdf --- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision ba715436cd0186ee10a1edc13d547ee27bea4c89) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision b5e8e61b14bbdc9307a0eb69a27275bb929a2fdf) @@ -665,7 +665,7 @@ { SoilProfile = pipingSoilProfile }, - new StochasticSoilProfile(0.8, SoilProfileType.SoilProfile1D, -1) + new StochasticSoilProfile(0.8, SoilProfileType.SoilProfile2D, -1) { SoilProfile = new TestPipingSoilProfile() } Index: Ringtoets/Piping/src/Ringtoets.Piping.Primitives/SoilProfileType.cs =================================================================== diff -u -rbf334f50530164badedba45a78f3aab857ae1bf6 -rb5e8e61b14bbdc9307a0eb69a27275bb929a2fdf --- Ringtoets/Piping/src/Ringtoets.Piping.Primitives/SoilProfileType.cs (.../SoilProfileType.cs) (revision bf334f50530164badedba45a78f3aab857ae1bf6) +++ Ringtoets/Piping/src/Ringtoets.Piping.Primitives/SoilProfileType.cs (.../SoilProfileType.cs) (revision b5e8e61b14bbdc9307a0eb69a27275bb929a2fdf) @@ -29,11 +29,11 @@ /// /// One dimensional soil profile. /// - SoilProfile1D, + SoilProfile1D = 1, /// /// One dimensional soil profile. /// - SoilProfile2D + SoilProfile2D = 2 } } \ No newline at end of file