Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StochasticSoilModelEntityReadExtensions.cs =================================================================== diff -u -r1ba21a629ef9ee35b003e5f5e66f26f5b8bc7766 -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StochasticSoilModelEntityReadExtensions.cs (.../StochasticSoilModelEntityReadExtensions.cs) (revision 1ba21a629ef9ee35b003e5f5e66f26f5b8bc7766) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StochasticSoilModelEntityReadExtensions.cs (.../StochasticSoilModelEntityReadExtensions.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -101,11 +101,10 @@ return collector.GetMacroStabilityInwardsStochasticSoilModel(entity); } - var model = new MacroStabilityInwardsStochasticSoilModel(entity.Name); + Point2D[] geometry = ReadSegmentPoints(entity.StochasticSoilModelSegmentPointXml).ToArray(); + var model = new MacroStabilityInwardsStochasticSoilModel(entity.Name, geometry); entity.ReadStochasticSoilProfiles(model, collector); - model.Geometry.AddRange(ReadSegmentPoints(entity.StochasticSoilModelSegmentPointXml)); - collector.Read(entity, model); return model; Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacroStabilityInwards/MacroStabilityInwardsStochasticSoilModelCreateExtensionsTest.cs =================================================================== diff -u -r342550ddfacbc6b0253b9b452da4aa68c3fac73f -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacroStabilityInwards/MacroStabilityInwardsStochasticSoilModelCreateExtensionsTest.cs (.../MacroStabilityInwardsStochasticSoilModelCreateExtensionsTest.cs) (revision 342550ddfacbc6b0253b9b452da4aa68c3fac73f) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacroStabilityInwards/MacroStabilityInwardsStochasticSoilModelCreateExtensionsTest.cs (.../MacroStabilityInwardsStochasticSoilModelCreateExtensionsTest.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -127,12 +127,12 @@ { // Setup var random = new Random(31); - var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("testName"); - stochasticSoilModel.Geometry.AddRange(new[] + var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("testName", new[] { new Point2D(random.NextDouble(), random.NextDouble()), new Point2D(random.NextDouble(), random.NextDouble()) }); + var registry = new PersistenceRegistry(); // Call Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs =================================================================== diff -u -r2be62a16f4a6d90a76ebb53967a7b7ea3a445cd1 -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision 2be62a16f4a6d90a76ebb53967a7b7ea3a445cd1) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -1194,14 +1194,13 @@ macroStabilityInwardsFailureMechanism.StochasticSoilModels.AddRange(new[] { - new MacroStabilityInwardsStochasticSoilModel("MacroStabilityInwards model name") + new MacroStabilityInwardsStochasticSoilModel("MacroStabilityInwards model name", new[] { - Geometry = - { - referenceLineGeometryPoints[1], - referenceLineGeometryPoints[2], - referenceLineGeometryPoints[3] - }, + referenceLineGeometryPoints[1], + referenceLineGeometryPoints[2], + referenceLineGeometryPoints[3] + }) + { StochasticSoilProfiles = { new MacroStabilityInwardsStochasticSoilProfile(0.3, soilProfile1D), Index: Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.Designer.cs =================================================================== diff -u -r712da6c28f4791abfecb52200bb9f397d400f081 -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 712da6c28f4791abfecb52200bb9f397d400f081) +++ Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -1694,24 +1694,6 @@ } /// - /// Looks up a localized string similar to Geen lagen gevonden voor de ondergrondschematisatie.. - /// - public static string SoilProfile_Cannot_construct_SoilProfile_without_layers { - get { - return ResourceManager.GetString("SoilProfile_Cannot_construct_SoilProfile_without_layers", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Eén of meerdere lagen hebben een top onder de bodem van de ondergrondschematisatie.. - /// - public static string SoilProfile_Layers_Layer_top_below_profile_bottom { - get { - return ResourceManager.GetString("SoilProfile_Layers_Layer_top_below_profile_bottom", resourceCulture); - } - } - - /// /// Looks up a localized string similar to Het uitlezen van de ondergrondschematisatie is mislukt.. /// public static string SoilProfile1DReader_ReadSoilProfile_Failed_to_construct_profile_from_read_data { Index: Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.resx =================================================================== diff -u -r712da6c28f4791abfecb52200bb9f397d400f081 -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.resx (.../Resources.resx) (revision 712da6c28f4791abfecb52200bb9f397d400f081) +++ Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.resx (.../Resources.resx) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -821,9 +821,6 @@ Ondergrondschematisatie bevat geen geldige waarde in kolom '{0}'. - - Eén of meerdere lagen hebben een top onder de bodem van de ondergrondschematisatie. - De segmenten van de geometrie van de laag vormen geen lus. @@ -871,9 +868,6 @@ Het uitlezen van de ondergrondschematisatie is mislukt. - - Geen lagen gevonden voor de ondergrondschematisatie. - Het stochastische ondergrondmodel met '{0}' als faalmechanisme type is niet ondersteund. Alleen stochastische ondergrondmodellen met '{1}' als faalmechanisme type zijn ondersteund. Index: Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/SoilProfile2D.cs =================================================================== diff -u -rd0d3ed3067ec66c52283bd4d1c44011b1a412492 -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/SoilProfile2D.cs (.../SoilProfile2D.cs) (revision d0d3ed3067ec66c52283bd4d1c44011b1a412492) +++ Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/SoilProfile2D.cs (.../SoilProfile2D.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -22,7 +22,6 @@ using System; using System.Collections.Generic; using System.Linq; -using Ringtoets.Common.IO.Properties; namespace Ringtoets.Common.IO.SoilProfile { @@ -77,11 +76,11 @@ /// public double IntersectionX { get; set; } - public string Name { get; } - /// /// Gets the collection of preconsolidation stresses that are defined for the profile. /// public IEnumerable PreconsolidationStresses { get; } + + public string Name { get; } } } \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/StochasticSoilModelReader.cs =================================================================== diff -u -r712da6c28f4791abfecb52200bb9f397d400f081 -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/StochasticSoilModelReader.cs (.../StochasticSoilModelReader.cs) (revision 712da6c28f4791abfecb52200bb9f397d400f081) +++ Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/StochasticSoilModelReader.cs (.../StochasticSoilModelReader.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -236,14 +236,11 @@ /// Sets the geometry points of from the database. /// /// The stochastic soil model of which the geometry to set. - /// Thrown when the geometry could not be read. private void SetGeometry(StochasticSoilModel stochasticSoilModel) { if (!segmentPointReader.HasNext || segmentPointReader.ReadStochasticSoilModelId() != currentStochasticSoilModelId) { - throw new StochasticSoilModelException( - string.Format(Resources.SegmentPointReader_ReadSegmentPoint_StochasticSoilModel_0_must_contain_geometry, - ReadStochasticSoilModelName())); + return; } stochasticSoilModel.Geometry.AddRange(segmentPointReader.ReadSegmentPoints()); Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/SoilProfile/StochasticSoilModelReaderTest.cs =================================================================== diff -u -r160a9c837d4d9f890de425212e45b5392cf1dadd -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/SoilProfile/StochasticSoilModelReaderTest.cs (.../StochasticSoilModelReaderTest.cs) (revision 160a9c837d4d9f890de425212e45b5392cf1dadd) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/SoilProfile/StochasticSoilModelReaderTest.cs (.../StochasticSoilModelReaderTest.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -29,6 +29,7 @@ using NUnit.Framework; using Ringtoets.Common.IO.Exceptions; using Ringtoets.Common.IO.SoilProfile; +using Ringtoets.Common.IO.SoilProfile.Schema; namespace Ringtoets.Common.IO.Test.SoilProfile { @@ -279,23 +280,64 @@ } [Test] - public void ReadStochasticSoilModel_MissingSegmentPoint_ThrowsStochasticSoilModelException() + public void ReadStochasticSoilModel_EmptySoilModelAndNoGeometry_ReturnsSoilModelWithoutGeometry() { + string dbFile = Path.Combine(testDataPath, "modelWithoutGeometry.soil"); + + using (var reader = new StochasticSoilModelReader(dbFile)) + { + reader.Validate(); + + // Call + StochasticSoilModel model = reader.ReadStochasticSoilModel(); + + // Assert + Assert.AreEqual("SoilModel", model.Name); + Assert.AreEqual(FailureMechanismType.Piping, model.FailureMechanismType); + CollectionAssert.IsEmpty(model.Geometry); + } + + Assert.IsTrue(TestHelper.CanOpenFileForWrite(dbFile)); + } + + [Test] + public void GivenDatabaseWithStochasticSoilModelWithAndWithoutGeometry_WhenReading_ThenReturnsAllModels() + { // Setup string dbFile = Path.Combine(testDataPath, "skippedStochasticSoilModel.soil"); + var readModels = new List(); using (var reader = new StochasticSoilModelReader(dbFile)) { reader.Validate(); // Call - TestDelegate test = () => reader.ReadStochasticSoilModel(); + while (reader.HasNext) + { + readModels.Add(reader.ReadStochasticSoilModel()); + } // Assert - var exception = Assert.Throws(test); + Assert.IsFalse(reader.HasNext); - const string expectedMessage = "Het stochastische ondergrondmodel '36005_Stability' moet een geometrie bevatten."; - Assert.AreEqual(expectedMessage, exception.Message); + CollectionAssert.AreEqual(new[] + { + "36005_Stability", + "36005_Piping", + "36006_Stability", + "36006_Piping", + "36007_Stability", + "36007_Piping" + }, readModels.Select(m => m.Name)); + CollectionAssert.AreEqual(new[] + { + 1797, + 0, + 144, + 0, + 606, + 0 + }, readModels.Select(m => m.Geometry.Count)); } Assert.IsTrue(TestHelper.CanOpenFileForWrite(dbFile)); Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/StochasticSoilModelReader/skippedStochasticSoilModel.soil =================================================================== diff -u -r2dc7bb7aef782fd08d2474e14cc5486725896b38 -rda4a311b2ac60defe1a27a61c8d151f47268a941 Binary files differ Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsStochasticSoilModel.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsStochasticSoilModel.cs (.../MacroStabilityInwardsStochasticSoilModel.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsStochasticSoilModel.cs (.../MacroStabilityInwardsStochasticSoilModel.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -52,14 +52,42 @@ } /// + /// Creates a new instance of . + /// + /// Name of the segment soil model. + /// The geometry of the segment soil model. + /// Thrown when any parameter is null. + /// Thrown when is empty. + public MacroStabilityInwardsStochasticSoilModel(string name, IEnumerable geometry) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (geometry == null) + { + throw new ArgumentNullException(nameof(geometry)); + } + if (!geometry.Any()) + { + string message = string.Format("Het stochastische ondergrondmodel '{0}' moet een geometrie bevatten.", name); + throw new ArgumentException(); + } + + Name = name; + Geometry = geometry; + StochasticSoilProfiles = new List(); + } + + /// /// Gets the name of the segment soil model. /// public string Name { get; private set; } /// /// Gets the list of geometry points. /// - public List Geometry { get; } + public IEnumerable Geometry { get; private set; } /// /// Gets the list of . @@ -86,12 +114,8 @@ } Name = fromModel.Name; - Geometry.Clear(); - foreach (Point2D point in fromModel.Geometry) - { - Geometry.Add(point); - } - + Geometry = fromModel.Geometry; + var newSoilProfiles = new List(); var updatedProfiles = new List(); var addedProfiles = new List(); Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsStochasticSoilModelTransformer.cs =================================================================== diff -u -r712da6c28f4791abfecb52200bb9f397d400f081 -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsStochasticSoilModelTransformer.cs (.../MacroStabilityInwardsStochasticSoilModelTransformer.cs) (revision 712da6c28f4791abfecb52200bb9f397d400f081) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsStochasticSoilModelTransformer.cs (.../MacroStabilityInwardsStochasticSoilModelTransformer.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -52,8 +52,8 @@ throw new ImportedDataTransformException(message); } - var macroStabilityInwardsModel = new MacroStabilityInwardsStochasticSoilModel(stochasticSoilModel.Name); - macroStabilityInwardsModel.Geometry.AddRange(stochasticSoilModel.Geometry); + var macroStabilityInwardsModel = new MacroStabilityInwardsStochasticSoilModel(stochasticSoilModel.Name, + stochasticSoilModel.Geometry); macroStabilityInwardsModel.StochasticSoilProfiles.AddRange( TransformStochasticSoilProfiles(stochasticSoilModel.StochasticSoilProfiles, stochasticSoilModel.Name).ToArray()); return macroStabilityInwardsModel; Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilModelCollectionTest.cs =================================================================== diff -u -r78382ec129ddc7537096860680cef36f3796700d -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilModelCollectionTest.cs (.../MacroStabilityInwardsStochasticSoilModelCollectionTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilModelCollectionTest.cs (.../MacroStabilityInwardsStochasticSoilModelCollectionTest.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -23,6 +23,7 @@ using System.Collections.Generic; using System.Linq; using Core.Common.Base; +using Core.Common.Base.Geometry; using NUnit.Framework; using Ringtoets.Common.Data.TestUtil; using Ringtoets.MacroStabilityInwards.Data.SoilProfile; @@ -41,26 +42,26 @@ protected override IEnumerable UniqueElements() { - yield return new MacroStabilityInwardsStochasticSoilModel("Model A"); - yield return new MacroStabilityInwardsStochasticSoilModel("Model B"); + yield return new MacroStabilityInwardsStochasticSoilModel("Model A", GetValidGeometry()); + yield return new MacroStabilityInwardsStochasticSoilModel("Model B", GetValidGeometry()); } protected override IEnumerable SingleNonUniqueElements() { const string someName = "Soil model"; - yield return new MacroStabilityInwardsStochasticSoilModel(someName); - yield return new MacroStabilityInwardsStochasticSoilModel(someName); + yield return new MacroStabilityInwardsStochasticSoilModel(someName, GetValidGeometry()); + yield return new MacroStabilityInwardsStochasticSoilModel(someName, GetValidGeometry()); } protected override IEnumerable MultipleNonUniqueElements() { const string someName = "Soil model"; const string someOtherName = "Other soil model"; - yield return new MacroStabilityInwardsStochasticSoilModel(someName); - yield return new MacroStabilityInwardsStochasticSoilModel(someName); - yield return new MacroStabilityInwardsStochasticSoilModel(someOtherName); - yield return new MacroStabilityInwardsStochasticSoilModel(someOtherName); - yield return new MacroStabilityInwardsStochasticSoilModel(someOtherName); + yield return new MacroStabilityInwardsStochasticSoilModel(someName, GetValidGeometry()); + yield return new MacroStabilityInwardsStochasticSoilModel(someName, GetValidGeometry()); + yield return new MacroStabilityInwardsStochasticSoilModel(someOtherName, GetValidGeometry()); + yield return new MacroStabilityInwardsStochasticSoilModel(someOtherName, GetValidGeometry()); + yield return new MacroStabilityInwardsStochasticSoilModel(someOtherName, GetValidGeometry()); } protected override void AssertSingleNonUniqueElements(ArgumentException exception, IEnumerable itemsToAdd) @@ -77,5 +78,11 @@ Assert.AreEqual("Stochastische ondergrondmodellen moeten een unieke naam hebben. " + $"Gevonden dubbele elementen: {someName}, {someOtherName}.", exception.Message); } + + private static IEnumerable GetValidGeometry() + { + var random = new Random(21); + yield return new Point2D(random.NextDouble(), random.NextDouble()); + } } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilModelExtensionsTest.cs =================================================================== diff -u -r78382ec129ddc7537096860680cef36f3796700d -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilModelExtensionsTest.cs (.../MacroStabilityInwardsStochasticSoilModelExtensionsTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilModelExtensionsTest.cs (.../MacroStabilityInwardsStochasticSoilModelExtensionsTest.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -56,8 +56,7 @@ public void IntersectsWithSurfaceLineGeometry_SurfaceLineNull_ThrowArgumentNullException() { // Setup - var soilModel = new MacroStabilityInwardsStochasticSoilModel("A"); - soilModel.Geometry.AddRange(new[] + var soilModel = new MacroStabilityInwardsStochasticSoilModel("A", new[] { new Point2D(1.0, 0.0), new Point2D(5.0, 0.0) @@ -75,8 +74,7 @@ public void IntersectsWithSurfaceLineGeometry_SurfaceLineIntersectingSoilModel_ReturnTrue() { // Setup - var soilModel = new MacroStabilityInwardsStochasticSoilModel("A"); - soilModel.Geometry.AddRange(new[] + var soilModel = new MacroStabilityInwardsStochasticSoilModel("A", new[] { new Point2D(1.0, 0.0), new Point2D(5.0, 0.0) @@ -101,8 +99,7 @@ public void IntersectsWithSurfaceLineGeometry_SurfaceLineNotIntersectingSoilModel_ReturnFalse() { // Setup - var soilModel = new MacroStabilityInwardsStochasticSoilModel("A"); - soilModel.Geometry.AddRange(new[] + var soilModel = new MacroStabilityInwardsStochasticSoilModel("A", new[] { new Point2D(1.0, 0.0), new Point2D(5.0, 0.0) Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilModelTest.cs =================================================================== diff -u -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilModelTest.cs (.../MacroStabilityInwardsStochasticSoilModelTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilModelTest.cs (.../MacroStabilityInwardsStochasticSoilModelTest.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -25,6 +25,7 @@ using System.Linq; using Core.Common.Base; using Core.Common.Base.Geometry; +using Core.Common.TestUtil; using NUnit.Framework; using Ringtoets.MacroStabilityInwards.Data.SoilProfile; using Ringtoets.MacroStabilityInwards.Data.TestUtil.SoilProfile; @@ -37,34 +38,72 @@ [Test] public void Constructor_WithoutName_ExpectedValues() { + // Setup + var random = new Random(21); + // Call - TestDelegate test = () => new MacroStabilityInwardsStochasticSoilModel(null); + TestDelegate test = () => new MacroStabilityInwardsStochasticSoilModel(null, new[] + { + new Point2D(random.NextDouble(), random.NextDouble()) + }); // Assert var exception = Assert.Throws(test); Assert.AreEqual("name", exception.ParamName); } + [Test] + public void Constructor_GeometryNull_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => new MacroStabilityInwardsStochasticSoilModel(string.Empty, null); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("geometry", exception.ParamName); + } + [Test] + public void Constructor_GeometryEmpty_ThrowsArgumentException() + { + // Setup + const string name = "modelName"; + + // Call + TestDelegate call = () => new MacroStabilityInwardsStochasticSoilModel(name, null); + + // Assert + string expectedMessage = $"Het stochastische ondergrond model '{name}'moet een geometrie bevatten."; + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, expectedMessage); + } + + [Test] [TestCase("")] [TestCase("segmentSoilModelName")] public void Constructor_WithName_ExpectedValues(string segmentSoilModelName) { + // Setup + var random = new Random(21); + var geometry = new[] + { + new Point2D(random.NextDouble(), random.NextDouble()) + }; + // Call - var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel(segmentSoilModelName); + var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel(segmentSoilModelName, geometry); // Assert Assert.IsInstanceOf(stochasticSoilModel); Assert.AreEqual(segmentSoilModelName, stochasticSoilModel.Name); - CollectionAssert.IsEmpty(stochasticSoilModel.Geometry); + Assert.AreSame(geometry, stochasticSoilModel.Geometry); CollectionAssert.IsEmpty(stochasticSoilModel.StochasticSoilProfiles); } [Test] public void Update_WithNullModel_ThrowsArgumentNullException() { // Setup - var model = new MacroStabilityInwardsStochasticSoilModel("name"); + MacroStabilityInwardsStochasticSoilModel model = CreateEmptyModel(); // Call TestDelegate test = () => model.Update(null); @@ -78,22 +117,18 @@ public void Update_ModelWithUpdatedProperties_PropertiesUpdated() { // Setup - var model = new MacroStabilityInwardsStochasticSoilModel("name"); - model.Geometry.AddRange(new[] + var model = new MacroStabilityInwardsStochasticSoilModel("name", new[] { new Point2D(1, 2), new Point2D(4, 5) }); const string expectedName = "otherName"; - var expectedGeometry = new[] + var otherModel = new MacroStabilityInwardsStochasticSoilModel(expectedName, new[] { new Point2D(4, 2) - }; + }); - var otherModel = new MacroStabilityInwardsStochasticSoilModel(expectedName); - otherModel.Geometry.AddRange(expectedGeometry); - // Call MacroStabilityInwardsStochasticSoilModelProfileDifference difference = model.Update(otherModel); @@ -250,13 +285,13 @@ model.StochasticSoilProfiles.Add(stochasticProfileB); const string otherName = "other name"; - var otherModel = new MacroStabilityInwardsStochasticSoilModel(otherName); + var otherGeometry = new[] + { + new Point2D(2, 0), + new Point2D(3, 0) + }; + var otherModel = new MacroStabilityInwardsStochasticSoilModel(otherName, otherGeometry); - var otherPointA = new Point2D(2, 0); - var otherPointB = new Point2D(3, 0); - otherModel.Geometry.Add(otherPointA); - otherModel.Geometry.Add(otherPointB); - var otherStochasticProfileA = new MacroStabilityInwardsStochasticSoilProfile( 0.7, new MacroStabilityInwardsSoilProfile1D(equalProfileName, -1, new[] @@ -272,8 +307,7 @@ // Assert AssertStochasticSoilModelAreEqual(otherModel, model); - Assert.AreSame(otherPointA, model.Geometry[0]); - Assert.AreSame(otherPointB, model.Geometry[1]); + Assert.AreSame(otherGeometry, model.Geometry); Assert.AreEqual(2, model.StochasticSoilProfiles.Count); Assert.AreSame(stochasticProfileA, model.StochasticSoilProfiles[0]); Assert.AreSame(otherStochasticProfileA.SoilProfile, model.StochasticSoilProfiles[0].SoilProfile); @@ -307,7 +341,7 @@ otherModel.StochasticSoilProfiles.Add(addedStochasticSoilProfile); MacroStabilityInwardsSoilProfile1D soilProfile = MacroStabilityInwardsSoilProfile1DTestFactory.CreateMacroStabilityInwardsSoilProfile1D(profileName); - var existingStochasticSoilProfileOne = new MacroStabilityInwardsStochasticSoilProfile(0.2,soilProfile); + var existingStochasticSoilProfileOne = new MacroStabilityInwardsStochasticSoilProfile(0.2, soilProfile); var existingStochasticSoilProfileTwo = new MacroStabilityInwardsStochasticSoilProfile(0.3, soilProfile); MacroStabilityInwardsStochasticSoilModel model = CreateEmptyModel(); @@ -337,7 +371,12 @@ public void ToString_WithName_ReturnsName(string name) { // Setup - var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel(name); + var random = new Random(21); + var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel(name, + new[] + { + new Point2D(random.NextDouble(), random.NextDouble()) + }); // Call & Assert Assert.AreEqual(name, stochasticSoilModel.ToString()); @@ -385,7 +424,12 @@ private static MacroStabilityInwardsStochasticSoilModel CreateEmptyModel() { - return new MacroStabilityInwardsStochasticSoilModel("name"); + var random = new Random(21); + return new MacroStabilityInwardsStochasticSoilModel("name", + new[] + { + new Point2D(random.NextDouble(), random.NextDouble()) + }); } private static void AssertStochasticSoilModelAreEqual(MacroStabilityInwardsStochasticSoilModel expected, Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test.csproj =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test.csproj (.../Ringtoets.MacroStabilityInwards.Data.TestUtil.Test.csproj) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test.csproj (.../Ringtoets.MacroStabilityInwards.Data.TestUtil.Test.csproj) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -60,7 +60,7 @@ - + Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/TestMacroStabilityInwardsStochasticSoilModelTest.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/TestMacroStabilityInwardsStochasticSoilModelTest.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/TestMacroStabilityInwardsStochasticSoilModelTest.cs (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -0,0 +1,107 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System.Linq; +using Core.Common.Base.Geometry; +using NUnit.Framework; +using Ringtoets.MacroStabilityInwards.Data.SoilProfile; + +namespace Ringtoets.MacroStabilityInwards.Data.TestUtil.Test +{ + [TestFixture] + public class TestMacroStabilityInwardsStochasticSoilModelTest + { + [Test] + public void DefaultConstructor_ExpectedPropertiesSet() + { + // Call + var model = new TestMacroStabilityInwardsStochasticSoilModel(); + + // Assert + Assert.IsInstanceOf(model); + Assert.IsEmpty(model.Name); + Assert.AreEqual(2, model.StochasticSoilProfiles.Count); + CollectionAssert.AreEquivalent(new[] + { + 0.5, + 0.5 + }, model.StochasticSoilProfiles.Select(p => p.Probability)); + CollectionAssert.AllItemsAreNotNull(model.StochasticSoilProfiles.Select(p => p.SoilProfile)); + CollectionAssert.AreEqual(new[] + { + new Point2D(1, 1), + new Point2D(2, 2) + }, model.Geometry); + } + + [Test] + public void Constructor_WitValidName_ExpectedPropertiesSet() + { + // Setup + const string name = "some name"; + + // Call + var model = new TestMacroStabilityInwardsStochasticSoilModel(name); + + // Assert + Assert.IsInstanceOf(model); + Assert.AreEqual(name, model.Name); + Assert.AreEqual(2, model.StochasticSoilProfiles.Count); + CollectionAssert.AreEquivalent(new[] + { + 0.5, + 0.5 + }, model.StochasticSoilProfiles.Select(p => p.Probability)); + CollectionAssert.AllItemsAreNotNull(model.StochasticSoilProfiles.Select(p => p.SoilProfile)); + CollectionAssert.AreEqual(new[] + { + new Point2D(1, 1), + new Point2D(2, 2) + }, model.Geometry); + } + + [Test] + public void Constructor_WithValidNameAndGeometry_ExpectedPropertiesSet() + { + // Setup + const string name = "some name"; + var geometry = new[] + { + new Point2D(10, 10) + }; + + // Call + var model = new TestMacroStabilityInwardsStochasticSoilModel(name, geometry); + + // Assert + Assert.IsInstanceOf(model); + Assert.AreEqual(name, model.Name); + Assert.AreEqual(2, model.StochasticSoilProfiles.Count); + CollectionAssert.AreEquivalent(new[] + { + 0.5, + 0.5 + }, model.StochasticSoilProfiles.Select(p => p.Probability)); + CollectionAssert.AllItemsAreNotNull(model.StochasticSoilProfiles.Select(p => p.SoilProfile)); + Assert.AreSame(geometry, model.Geometry); + } + } +} \ No newline at end of file Fisheye: Tag da4a311b2ac60defe1a27a61c8d151f47268a941 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/TestStochasticSoilModelTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsTestDataGenerator.cs =================================================================== diff -u -r0b5e18b2ddd0f4af4e6483464a48c92d70531aa9 -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsTestDataGenerator.cs (.../MacroStabilityInwardsTestDataGenerator.cs) (revision 0b5e18b2ddd0f4af4e6483464a48c92d70531aa9) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsTestDataGenerator.cs (.../MacroStabilityInwardsTestDataGenerator.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -227,13 +227,12 @@ surfaceLine1, surfaceLine2 }, "some/path/to/surfacelines"); - var stochasticSoilModel1 = new MacroStabilityInwardsStochasticSoilModel("A") + var stochasticSoilModel1 = new MacroStabilityInwardsStochasticSoilModel("A", new[] { - Geometry = - { - new Point2D(-5, 5), - new Point2D(5, 5) - }, + new Point2D(-5, 5), + new Point2D(5, 5) + }) + { StochasticSoilProfiles = { new MacroStabilityInwardsStochasticSoilProfile(1.0, new MacroStabilityInwardsSoilProfile1D("test", 3, new[] @@ -242,13 +241,12 @@ })) } }; - var stochasticSoilModel2 = new MacroStabilityInwardsStochasticSoilModel("C") + var stochasticSoilModel2 = new MacroStabilityInwardsStochasticSoilModel("C", new[] { - Geometry = - { - new Point2D(5, 5), - new Point2D(15, 5) - }, + new Point2D(5, 5), + new Point2D(15, 5) + }) + { StochasticSoilProfiles = { new MacroStabilityInwardsStochasticSoilProfile(1.0, new MacroStabilityInwardsSoilProfile2D("test", new[] Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/Ringtoets.MacroStabilityInwards.Data.TestUtil.csproj =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/Ringtoets.MacroStabilityInwards.Data.TestUtil.csproj (.../Ringtoets.MacroStabilityInwards.Data.TestUtil.csproj) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/Ringtoets.MacroStabilityInwards.Data.TestUtil.csproj (.../Ringtoets.MacroStabilityInwards.Data.TestUtil.csproj) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -64,7 +64,7 @@ - + Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/TestMacroStabilityInwardsFailureMechanism.cs =================================================================== diff -u -r99f686f22091051a65ff1ee20abd68ffad713647 -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/TestMacroStabilityInwardsFailureMechanism.cs (.../TestMacroStabilityInwardsFailureMechanism.cs) (revision 99f686f22091051a65ff1ee20abd68ffad713647) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/TestMacroStabilityInwardsFailureMechanism.cs (.../TestMacroStabilityInwardsFailureMechanism.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -64,7 +64,7 @@ }, "path/to/surfaceLines"); failureMechanism.StochasticSoilModels.AddRange(new[] { - new TestStochasticSoilModel() + new TestMacroStabilityInwardsStochasticSoilModel() }, "path/to/stochasticSoilModels"); failureMechanism.AddSection(new FailureMechanismSection("Section", new List Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/TestMacroStabilityInwardsStochasticSoilModel.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/TestMacroStabilityInwardsStochasticSoilModel.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/TestMacroStabilityInwardsStochasticSoilModel.cs (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -0,0 +1,71 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.Collections.Generic; +using Core.Common.Base.Geometry; +using Ringtoets.MacroStabilityInwards.Data.SoilProfile; +using Ringtoets.MacroStabilityInwards.Data.TestUtil.SoilProfile; + +namespace Ringtoets.MacroStabilityInwards.Data.TestUtil +{ + /// + /// for testing purposes. + /// + public class TestMacroStabilityInwardsStochasticSoilModel : MacroStabilityInwardsStochasticSoilModel + { + /// + /// Creates a new instance of . + /// + /// The name of the stochastic soil model. + /// Thrown when is null. + public TestMacroStabilityInwardsStochasticSoilModel(string name) : this(name, new[] + { + new Point2D(1, 1), + new Point2D(2, 2) + }) {} + + /// + /// Creates a new instance of . + /// + public TestMacroStabilityInwardsStochasticSoilModel() : this(string.Empty) {} + + /// + /// Creates a new instance of . + /// + /// The name of the stochastic soil model. + /// The geometry of the stochastic soil model. + /// Thrown when any parameter is null. + public TestMacroStabilityInwardsStochasticSoilModel(string name, IEnumerable geometry) : base(name, geometry) + { + MacroStabilityInwardsSoilProfile1D soilProfileA = + MacroStabilityInwardsSoilProfile1DTestFactory.CreateMacroStabilityInwardsSoilProfile1D("A"); + MacroStabilityInwardsSoilProfile1D soilProfileB = + MacroStabilityInwardsSoilProfile1DTestFactory.CreateMacroStabilityInwardsSoilProfile1D("B"); + + StochasticSoilProfiles.AddRange(new[] + { + new MacroStabilityInwardsStochasticSoilProfile(0.5, soilProfileA), + new MacroStabilityInwardsStochasticSoilProfile(0.5, soilProfileB) + }); + } + } +} \ No newline at end of file Fisheye: Tag da4a311b2ac60defe1a27a61c8d151f47268a941 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/TestStochasticSoilModel.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Factories/MacroStabilityInwardsMapDataFeaturesFactoryTest.cs =================================================================== diff -u -r78382ec129ddc7537096860680cef36f3796700d -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Factories/MacroStabilityInwardsMapDataFeaturesFactoryTest.cs (.../MacroStabilityInwardsMapDataFeaturesFactoryTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Factories/MacroStabilityInwardsMapDataFeaturesFactoryTest.cs (.../MacroStabilityInwardsMapDataFeaturesFactoryTest.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -130,11 +130,9 @@ }; var stochasticSoilModels = new[] { - new MacroStabilityInwardsStochasticSoilModel("StochasticSoilModelName1"), - new MacroStabilityInwardsStochasticSoilModel("StochasticSoilModelName2") + new MacroStabilityInwardsStochasticSoilModel("StochasticSoilModelName1", pointsOne), + new MacroStabilityInwardsStochasticSoilModel("StochasticSoilModelName2", pointsTwo) }; - stochasticSoilModels[0].Geometry.AddRange(pointsOne); - stochasticSoilModels[1].Geometry.AddRange(pointsTwo); // Call MapFeature[] features = MacroStabilityInwardsMapDataFeaturesFactory.CreateStochasticSoilModelFeatures(stochasticSoilModels); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/MacroStabilityInwardsCalculationConfigurationHelperTest.cs =================================================================== diff -u -rd619624819b7200ac55b357b0a0c54d198fc20e4 -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/MacroStabilityInwardsCalculationConfigurationHelperTest.cs (.../MacroStabilityInwardsCalculationConfigurationHelperTest.cs) (revision d619624819b7200ac55b357b0a0c54d198fc20e4) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/MacroStabilityInwardsCalculationConfigurationHelperTest.cs (.../MacroStabilityInwardsCalculationConfigurationHelperTest.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -55,12 +55,12 @@ new MacroStabilityInwardsSoilLayer1D(4.0) })); - var soilModel = new MacroStabilityInwardsStochasticSoilModel("A"); - soilModel.Geometry.AddRange(new[] + var soilModel = new MacroStabilityInwardsStochasticSoilModel("A", new[] { new Point2D(1.0, 0.0), new Point2D(5.0, 0.0) }); + soilModel.StochasticSoilProfiles.AddRange(new[] { soilProfile1, @@ -109,15 +109,14 @@ new MacroStabilityInwardsSoilLayer1D(4.0) }); - var soilModel = new MacroStabilityInwardsStochasticSoilModel("A"); - soilModel.Geometry.AddRange(new[] + var soilModel = new MacroStabilityInwardsStochasticSoilModel("A", new[] { new Point2D(1.0, 0.0), new Point2D(5.0, 0.0) }); soilModel.StochasticSoilProfiles.AddRange(new[] { - new MacroStabilityInwardsStochasticSoilProfile(0.3, soilProfile1), + new MacroStabilityInwardsStochasticSoilProfile(0.3, soilProfile1), new MacroStabilityInwardsStochasticSoilProfile(0.7, soilProfile2) }); MacroStabilityInwardsStochasticSoilModel[] availableSoilModels = @@ -159,8 +158,7 @@ public void GetStochasticSoilModelsForSurfaceLine_NoSoilProfiles_ReturnEmpty() { // Setup - var soilModel = new MacroStabilityInwardsStochasticSoilModel("A"); - soilModel.Geometry.AddRange(new[] + var soilModel = new MacroStabilityInwardsStochasticSoilModel("A", new[] { new Point2D(1.0, 0.0), new Point2D(5.0, 0.0) @@ -205,8 +203,7 @@ new MacroStabilityInwardsSoilLayer1D(4.0) }); - var soilModel = new MacroStabilityInwardsStochasticSoilModel("A"); - soilModel.Geometry.AddRange(new[] + var soilModel = new MacroStabilityInwardsStochasticSoilModel("A", new[] { new Point2D(1.0, 0.0), new Point2D(5.0, 0.0) @@ -254,23 +251,23 @@ })); const double y = 1.1; - var soilModel1 = new MacroStabilityInwardsStochasticSoilModel("A"); - soilModel1.Geometry.AddRange(new[] + var soilModel1 = new MacroStabilityInwardsStochasticSoilModel("A", new[] { new Point2D(1.0, y), new Point2D(2.0, y) }); + soilModel1.StochasticSoilProfiles.AddRange(new[] { soilProfile1 }); - var soilModel2 = new MacroStabilityInwardsStochasticSoilModel("A"); - soilModel2.Geometry.AddRange(new[] + var soilModel2 = new MacroStabilityInwardsStochasticSoilModel("A", new[] { new Point2D(3.0, y), new Point2D(4.0, y) }); + soilModel2.StochasticSoilProfiles.AddRange(new[] { soilProfile2 @@ -389,12 +386,12 @@ new MacroStabilityInwardsSoilLayer1D(4.0) })); - var soilModel = new MacroStabilityInwardsStochasticSoilModel("A"); - soilModel.Geometry.AddRange(new[] + var soilModel = new MacroStabilityInwardsStochasticSoilModel("A", new[] { new Point2D(1.0, 0.0), new Point2D(5.0, 0.0) }); + soilModel.StochasticSoilProfiles.AddRange(new[] { soilProfile1, @@ -450,8 +447,7 @@ public void GenerateCalculationItemsStructure_NoSoilProfiles_LogWarning() { // Setup - var soilModel = new MacroStabilityInwardsStochasticSoilModel("A"); - soilModel.Geometry.AddRange(new[] + var soilModel = new MacroStabilityInwardsStochasticSoilModel("A", new[] { new Point2D(1.0, 0.0), new Point2D(5.0, 0.0) @@ -510,12 +506,12 @@ new MacroStabilityInwardsSoilLayer1D(4.0) }); - var soilModel = new MacroStabilityInwardsStochasticSoilModel("A"); - soilModel.Geometry.AddRange(new[] + var soilModel = new MacroStabilityInwardsStochasticSoilModel("A", new[] { new Point2D(1.0, 0.0), new Point2D(5.0, 0.0) }); + soilModel.StochasticSoilProfiles.AddRange(new[] { new MacroStabilityInwardsStochasticSoilProfile(0.3, soilProfile1), @@ -576,23 +572,23 @@ })); const double y = 1.1; - var soilModel1 = new MacroStabilityInwardsStochasticSoilModel("A"); - soilModel1.Geometry.AddRange(new[] + var soilModel1 = new MacroStabilityInwardsStochasticSoilModel("A", new[] { new Point2D(1.0, y), new Point2D(2.0, y) }); + soilModel1.StochasticSoilProfiles.AddRange(new[] { soilProfile1 }); - var soilModel2 = new MacroStabilityInwardsStochasticSoilModel("A"); - soilModel2.Geometry.AddRange(new[] + var soilModel2 = new MacroStabilityInwardsStochasticSoilModel("A", new[] { new Point2D(3.0, y), new Point2D(4.0, y) }); + soilModel2.StochasticSoilProfiles.AddRange(new[] { soilProfile2 @@ -662,24 +658,24 @@ })); const double y = 1.1; - var soilModel1 = new MacroStabilityInwardsStochasticSoilModel("A"); - soilModel1.Geometry.AddRange(new[] + var soilModel1 = new MacroStabilityInwardsStochasticSoilModel("A", new[] { new Point2D(1.0, y), new Point2D(2.0, y) }); + soilModel1.StochasticSoilProfiles.AddRange(new[] { soilProfile1, soilProfile2 }); - var soilModel2 = new MacroStabilityInwardsStochasticSoilModel("A"); - soilModel2.Geometry.AddRange(new[] + var soilModel2 = new MacroStabilityInwardsStochasticSoilModel("A", new[] { new Point2D(3.0, y), new Point2D(4.0, y) }); + soilModel2.StochasticSoilProfiles.AddRange(new[] { soilProfile2 @@ -770,24 +766,24 @@ })); const double y = 1.1; - var soilModel1 = new MacroStabilityInwardsStochasticSoilModel("A"); - soilModel1.Geometry.AddRange(new[] + var soilModel1 = new MacroStabilityInwardsStochasticSoilModel("A", new[] { new Point2D(1.0, y), new Point2D(2.0, y) }); + soilModel1.StochasticSoilProfiles.AddRange(new[] { soilProfile1, soilProfile2 }); - var soilModel2 = new MacroStabilityInwardsStochasticSoilModel("A"); - soilModel2.Geometry.AddRange(new[] + var soilModel2 = new MacroStabilityInwardsStochasticSoilModel("A", new[] { new Point2D(3.0, y), new Point2D(4.0, y) }); + soilModel2.StochasticSoilProfiles.AddRange(new[] { soilProfile2 @@ -871,12 +867,12 @@ new MacroStabilityInwardsSoilLayer1D(4.0) }); - var soilModel = new MacroStabilityInwardsStochasticSoilModel("A"); - soilModel.Geometry.AddRange(new[] + var soilModel = new MacroStabilityInwardsStochasticSoilModel("A", new[] { new Point2D(1.0, 0.0), new Point2D(5.0, 0.0) }); + soilModel.StochasticSoilProfiles.AddRange(new[] { new MacroStabilityInwardsStochasticSoilProfile(0.3, soilProfile1), @@ -938,18 +934,17 @@ new MacroStabilityInwardsSoilLayer1D(4.0) }); - var soilModel = new MacroStabilityInwardsStochasticSoilModel("A"); - soilModel.Geometry.AddRange(new[] + var soilModel = new MacroStabilityInwardsStochasticSoilModel("A", new[] { new Point2D(1.0, 0.0), new Point2D(5.0, 0.0) }); + soilModel.StochasticSoilProfiles.AddRange(new[] { new MacroStabilityInwardsStochasticSoilProfile(0.3, soilProfile1), new MacroStabilityInwardsStochasticSoilProfile(0.2, soilProfile2), new MacroStabilityInwardsStochasticSoilProfile(0.5, soilProfile3) - }); var availableSoilModels = new[] { Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PresentationObjects/MacroStabilityInwardsCalculationGroupContextTest.cs =================================================================== diff -u -r78382ec129ddc7537096860680cef36f3796700d -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PresentationObjects/MacroStabilityInwardsCalculationGroupContextTest.cs (.../MacroStabilityInwardsCalculationGroupContextTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PresentationObjects/MacroStabilityInwardsCalculationGroupContextTest.cs (.../MacroStabilityInwardsCalculationGroupContextTest.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -52,7 +52,7 @@ }; var soilModels = new MacroStabilityInwardsStochasticSoilModel[] { - new TestStochasticSoilModel() + new TestMacroStabilityInwardsStochasticSoilModel() }; CalculationGroup parent = withParent ? new CalculationGroup() : null; Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PresentationObjects/MacroStabilityInwardsCalculationScenarioContextTest.cs =================================================================== diff -u -rd619624819b7200ac55b357b0a0c54d198fc20e4 -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PresentationObjects/MacroStabilityInwardsCalculationScenarioContextTest.cs (.../MacroStabilityInwardsCalculationScenarioContextTest.cs) (revision d619624819b7200ac55b357b0a0c54d198fc20e4) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PresentationObjects/MacroStabilityInwardsCalculationScenarioContextTest.cs (.../MacroStabilityInwardsCalculationScenarioContextTest.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -49,7 +49,7 @@ }; var soilModels = new[] { - new TestStochasticSoilModel() + new TestMacroStabilityInwardsStochasticSoilModel() }; var calculation = new MacroStabilityInwardsCalculationScenario(); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); @@ -89,7 +89,7 @@ }; var soilModels = new[] { - new TestStochasticSoilModel() + new TestMacroStabilityInwardsStochasticSoilModel() }; var calculation = new MacroStabilityInwardsCalculationScenario(); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PresentationObjects/MacroStabilityInwardsContextTest.cs =================================================================== diff -u -r78382ec129ddc7537096860680cef36f3796700d -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PresentationObjects/MacroStabilityInwardsContextTest.cs (.../MacroStabilityInwardsContextTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PresentationObjects/MacroStabilityInwardsContextTest.cs (.../MacroStabilityInwardsContextTest.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -54,7 +54,7 @@ var soilModels = new[] { - new TestStochasticSoilModel() + new TestMacroStabilityInwardsStochasticSoilModel() }; var target = new ObservableObject(); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PresentationObjects/MacroStabilityInwardsInputContextTest.cs =================================================================== diff -u -rd619624819b7200ac55b357b0a0c54d198fc20e4 -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PresentationObjects/MacroStabilityInwardsInputContextTest.cs (.../MacroStabilityInwardsInputContextTest.cs) (revision d619624819b7200ac55b357b0a0c54d198fc20e4) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PresentationObjects/MacroStabilityInwardsInputContextTest.cs (.../MacroStabilityInwardsInputContextTest.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -48,7 +48,7 @@ }; var stochasticSoilModels = new[] { - new TestStochasticSoilModel() + new TestMacroStabilityInwardsStochasticSoilModel() }; var failureMechanism = new MacroStabilityInwardsFailureMechanism(); @@ -82,7 +82,7 @@ }; var stochasticSoilModels = new[] { - new TestStochasticSoilModel() + new TestMacroStabilityInwardsStochasticSoilModel() }; var failureMechanism = new MacroStabilityInwardsFailureMechanism(); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsInputContextPropertiesTest.cs =================================================================== diff -u -r69d647795daacbf48e17d0cf3a02a21865ab4ae6 -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsInputContextPropertiesTest.cs (.../MacroStabilityInwardsInputContextPropertiesTest.cs) (revision 69d647795daacbf48e17d0cf3a02a21865ab4ae6) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsInputContextPropertiesTest.cs (.../MacroStabilityInwardsInputContextPropertiesTest.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -1065,39 +1065,36 @@ var failureMechanism = new MacroStabilityInwardsFailureMechanism(); var soilModels = new[] { - new MacroStabilityInwardsStochasticSoilModel("A") + new MacroStabilityInwardsStochasticSoilModel("A", new[] { - Geometry = - { - new Point2D(2, -1), - new Point2D(2, 1) - }, + new Point2D(2, -1), + new Point2D(2, 1) + }) + { StochasticSoilProfiles = { new MacroStabilityInwardsStochasticSoilProfile( 0.2, MacroStabilityInwardsSoilProfile1DTestFactory.CreateMacroStabilityInwardsSoilProfile1D()) } }, - new MacroStabilityInwardsStochasticSoilModel("C") + new MacroStabilityInwardsStochasticSoilModel("C", new[] { - Geometry = - { - new Point2D(-2, -1), - new Point2D(-2, 1) - }, + new Point2D(2, -1), + new Point2D(2, 1) + }) + { StochasticSoilProfiles = { new MacroStabilityInwardsStochasticSoilProfile( 0.3, MacroStabilityInwardsSoilProfile1DTestFactory.CreateMacroStabilityInwardsSoilProfile1D()) } }, - new MacroStabilityInwardsStochasticSoilModel("E") + new MacroStabilityInwardsStochasticSoilModel("E", new[] { - Geometry = - { - new Point2D(6, -1), - new Point2D(6, 1) - }, + new Point2D(6, -1), + new Point2D(6, 1) + }) + { StochasticSoilProfiles = { new MacroStabilityInwardsStochasticSoilProfile( @@ -1607,11 +1604,13 @@ private static MacroStabilityInwardsStochasticSoilModel ValidStochasticSoilModel(double xMin, double xMax) { - var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("StochasticSoilModelName"); + var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("StochasticSoilModelName", new[] + { + new Point2D(xMin, 1.0), + new Point2D(xMax, 0.0) + }); MacroStabilityInwardsSoilProfile1D soilProfile = MacroStabilityInwardsSoilProfile1DTestFactory.CreateMacroStabilityInwardsSoilProfile1D(); stochasticSoilModel.StochasticSoilProfiles.Add(new MacroStabilityInwardsStochasticSoilProfile(0.0, soilProfile)); - stochasticSoilModel.Geometry.Add(new Point2D(xMin, 1.0)); - stochasticSoilModel.Geometry.Add(new Point2D(xMax, 0.0)); return stochasticSoilModel; } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsStochasticSoilModelPropertiesTest.cs =================================================================== diff -u -r7b513e5e4b0d15ba13e161b4c5a2e1097f58b8fd -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsStochasticSoilModelPropertiesTest.cs (.../MacroStabilityInwardsStochasticSoilModelPropertiesTest.cs) (revision 7b513e5e4b0d15ba13e161b4c5a2e1097f58b8fd) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsStochasticSoilModelPropertiesTest.cs (.../MacroStabilityInwardsStochasticSoilModelPropertiesTest.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -73,8 +73,10 @@ public void GetProperties_WithData_ReturnExpectedValues() { // Setup - var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("Name"); - stochasticSoilModel.Geometry.Add(new Point2D(1.0, 2.0)); + var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("Name", new [] + { + new Point2D(1.0, 2.0) + }); var soilProfile = new MacroStabilityInwardsSoilProfile1D("MacroStabilityInwardsSoilProfile", 0, new List { new MacroStabilityInwardsSoilLayer1D(10) Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/UITypeEditors/MacroStabilityInwardsInputContextStochasticSoilModelSelectionEditorTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/UITypeEditors/MacroStabilityInwardsInputContextStochasticSoilModelSelectionEditorTest.cs (.../MacroStabilityInwardsInputContextStochasticSoilModelSelectionEditorTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/UITypeEditors/MacroStabilityInwardsInputContextStochasticSoilModelSelectionEditorTest.cs (.../MacroStabilityInwardsInputContextStochasticSoilModelSelectionEditorTest.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -66,7 +66,7 @@ Enumerable.Empty(), new[] { - new TestStochasticSoilModel() + new TestMacroStabilityInwardsStochasticSoilModel() }, failureMechanism, assessmentSection); @@ -105,13 +105,12 @@ MacroStabilityInwardsSoilProfile1D soilProfile = MacroStabilityInwardsSoilProfile1DTestFactory.CreateMacroStabilityInwardsSoilProfile1D(); var stochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(1.0, soilProfile); - var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("Model") + var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("Model", new[] { - Geometry = - { - new Point2D(0, 2), - new Point2D(4, 2) - }, + new Point2D(0, 2), + new Point2D(4, 2) + }) + { StochasticSoilProfiles = { stochasticSoilProfile Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/UITypeEditors/MacroStabilityInwardsInputContextStochasticSoilProfileSelectionEditorTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/UITypeEditors/MacroStabilityInwardsInputContextStochasticSoilProfileSelectionEditorTest.cs (.../MacroStabilityInwardsInputContextStochasticSoilProfileSelectionEditorTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/UITypeEditors/MacroStabilityInwardsInputContextStochasticSoilProfileSelectionEditorTest.cs (.../MacroStabilityInwardsInputContextStochasticSoilProfileSelectionEditorTest.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -67,7 +67,7 @@ Enumerable.Empty(), new[] { - new TestStochasticSoilModel() + new TestMacroStabilityInwardsStochasticSoilModel() }, failureMechanism, assessmentSection); @@ -106,13 +106,12 @@ MacroStabilityInwardsSoilProfile1D soilProfile = MacroStabilityInwardsSoilProfile1DTestFactory.CreateMacroStabilityInwardsSoilProfile1D(); var stochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(1.0, soilProfile); - var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("Model") + var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("Model", new[] { - Geometry = - { - new Point2D(0, 2), - new Point2D(4, 2) - }, + new Point2D(0, 2), + new Point2D(4, 2) + }) + { StochasticSoilProfiles = { stochasticSoilProfile Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsCalculationsViewTest.cs =================================================================== diff -u -rf2ba7f68f5de2fc3c8dec8baf7326808120cee52 -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsCalculationsViewTest.cs (.../MacroStabilityInwardsCalculationsViewTest.cs) (revision f2ba7f68f5de2fc3c8dec8baf7326808120cee52) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsCalculationsViewTest.cs (.../MacroStabilityInwardsCalculationsViewTest.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -398,7 +398,7 @@ var failureMechanism = new MacroStabilityInwardsFailureMechanism(); failureMechanism.StochasticSoilModels.AddRange(new[] { - new TestStochasticSoilModel() + new TestMacroStabilityInwardsStochasticSoilModel() }, "path"); using (MacroStabilityInwardsCalculationsView macroStabilityInwardsCalculationsView = ShowMacroStabilityInwardsCalculationsView()) @@ -449,7 +449,7 @@ }, arbitrarySourcePath); failureMechanism.StochasticSoilModels.AddRange(new[] { - new TestStochasticSoilModel() + new TestMacroStabilityInwardsStochasticSoilModel() }, arbitrarySourcePath); using (MacroStabilityInwardsCalculationsView macroStabilityInwardsCalculationsView = ShowMacroStabilityInwardsCalculationsView()) @@ -524,7 +524,7 @@ }, arbitraryFilePath); failureMechanism.StochasticSoilModels.AddRange(new[] { - new TestStochasticSoilModel() + new TestMacroStabilityInwardsStochasticSoilModel() }, arbitraryFilePath); using (MacroStabilityInwardsCalculationsView macroStabilityInwardsCalculationsView = ShowMacroStabilityInwardsCalculationsView()) @@ -570,7 +570,7 @@ }, arbitraryFilePath); failureMechanism.StochasticSoilModels.AddRange(new[] { - new TestStochasticSoilModel() + new TestMacroStabilityInwardsStochasticSoilModel() }, arbitraryFilePath); failureMechanism.CalculationsGroup.Attach(observer); @@ -608,7 +608,7 @@ }, arbitryFilePath); failureMechanism.StochasticSoilModels.AddRange(new[] { - new TestStochasticSoilModel() + new TestMacroStabilityInwardsStochasticSoilModel() }, arbitryFilePath); failureMechanism.CalculationsGroup.Attach(observer); @@ -719,7 +719,7 @@ // When failureMechanism.StochasticSoilModels.AddRange(new[] { - new TestStochasticSoilModel() + new TestMacroStabilityInwardsStochasticSoilModel() }, "path"); failureMechanism.NotifyObservers(); @@ -768,7 +768,7 @@ }, arbitraryFilePath); failureMechanism.StochasticSoilModels.AddRange(new[] { - new TestStochasticSoilModel() + new TestMacroStabilityInwardsStochasticSoilModel() }, arbitraryFilePath); // Then @@ -794,7 +794,7 @@ }, arbitraryFilePath); failureMechanism.StochasticSoilModels.AddRange(new[] { - new TestStochasticSoilModel() + new TestMacroStabilityInwardsStochasticSoilModel() }, arbitraryFilePath); macroStabilityInwardsCalculationsView.MacroStabilityInwardsFailureMechanism.NotifyObservers(); @@ -818,7 +818,7 @@ }, arbitraryFilePath); failureMechanism.StochasticSoilModels.AddRange(new[] { - new TestStochasticSoilModel() + new TestMacroStabilityInwardsStochasticSoilModel() }, arbitraryFilePath); macroStabilityInwardsCalculationsView.MacroStabilityInwardsFailureMechanism = failureMechanism; @@ -1299,14 +1299,11 @@ }, arbirtraryFilePath); failureMechanism.StochasticSoilModels.AddRange(new[] { - new TestStochasticSoilModel + new TestMacroStabilityInwardsStochasticSoilModel("name", new[] { - Geometry = - { - new Point2D(0.0, 0.0), - new Point2D(5.0, 0.0) - } - } + new Point2D(0.0, 0.0), + new Point2D(5.0, 0.0) + }) }, arbirtraryFilePath); failureMechanism.AddSection(new FailureMechanismSection("Section 1", new List @@ -1409,13 +1406,12 @@ new MacroStabilityInwardsSoilLayer1D(1.0) })); - var stochasticSoilModelA = new MacroStabilityInwardsStochasticSoilModel("Model A") + var stochasticSoilModelA = new MacroStabilityInwardsStochasticSoilModel("Model A", new[] { - Geometry = - { - new Point2D(0.0, 0.0), - new Point2D(5.0, 0.0) - }, + new Point2D(0.0, 0.0), + new Point2D(5.0, 0.0) + }) + { StochasticSoilProfiles = { stochasticSoilProfile1, @@ -1435,13 +1431,12 @@ new MacroStabilityInwardsSoilLayer1D(1.0) })); - var stochasticSoilModelE = new MacroStabilityInwardsStochasticSoilModel("Model E") + var stochasticSoilModelE = new MacroStabilityInwardsStochasticSoilModel("Model E", new[] { - Geometry = - { - new Point2D(1.0, 0.0), - new Point2D(6.0, 0.0) - }, + new Point2D(1.0, 0.0), + new Point2D(6.0, 0.0) + }) + { StochasticSoilProfiles = { stochasticSoilProfile5 @@ -1451,13 +1446,12 @@ failureMechanism.StochasticSoilModels.AddRange(new[] { stochasticSoilModelA, - new MacroStabilityInwardsStochasticSoilModel("Model C") + new MacroStabilityInwardsStochasticSoilModel("Model C", new[] { - Geometry = - { - new Point2D(1.0, 0.0), - new Point2D(4.0, 0.0) - }, + new Point2D(1.0, 0.0), + new Point2D(4.0, 0.0) + }) + { StochasticSoilProfiles = { new MacroStabilityInwardsStochasticSoilProfile(0.3, new MacroStabilityInwardsSoilProfile1D("Profile 3", -10.0, new[] Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsFailureMechanismViewTest.cs =================================================================== diff -u -r78382ec129ddc7537096860680cef36f3796700d -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsFailureMechanismViewTest.cs (.../MacroStabilityInwardsFailureMechanismViewTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsFailureMechanismViewTest.cs (.../MacroStabilityInwardsFailureMechanismViewTest.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -255,14 +255,13 @@ ReferenceLine = referenceLine }; - var stochasticSoilModel1 = new MacroStabilityInwardsStochasticSoilModel("name1"); - stochasticSoilModel1.Geometry.AddRange(new[] + var stochasticSoilModel1 = new MacroStabilityInwardsStochasticSoilModel("name1", new[] { new Point2D(1.0, 2.0), new Point2D(1.1, 2.2) }); - var stochasticSoilModel2 = new MacroStabilityInwardsStochasticSoilModel("name2"); - stochasticSoilModel2.Geometry.AddRange(new[] + + var stochasticSoilModel2 = new MacroStabilityInwardsStochasticSoilModel("name2", new[] { new Point2D(3.0, 4.0), new Point2D(3.3, 4.4) @@ -679,9 +678,7 @@ var failureMechanism = new MacroStabilityInwardsFailureMechanism(); var failureMechanismContext = new MacroStabilityInwardsFailureMechanismContext(failureMechanism, new ObservableTestAssessmentSectionStub()); - var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel(""); - - stochasticSoilModel.Geometry.AddRange(new[] + var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("", new[] { new Point2D(1, 2), new Point2D(1, 2) Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Configurations/MacroStabilityInwardsCalculationConfigurationImporterTest.cs =================================================================== diff -u -rd619624819b7200ac55b357b0a0c54d198fc20e4 -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Configurations/MacroStabilityInwardsCalculationConfigurationImporterTest.cs (.../MacroStabilityInwardsCalculationConfigurationImporterTest.cs) (revision d619624819b7200ac55b357b0a0c54d198fc20e4) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Configurations/MacroStabilityInwardsCalculationConfigurationImporterTest.cs (.../MacroStabilityInwardsCalculationConfigurationImporterTest.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -171,8 +171,7 @@ new Point3D(2.5, 1.0, 1.0), new Point3D(5.0, 1.0, 0.0) }); - var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("Ondergrondmodel"); - stochasticSoilModel.Geometry.AddRange(new[] + var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("Ondergrondmodel", new[] { new Point2D(1.0, 0.0), new Point2D(5.0, 0.0) @@ -218,8 +217,7 @@ new Point3D(3.0, 0.0, 1.0), new Point3D(3.0, -5.0, 0.0) }); - var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("Ondergrondmodel"); - stochasticSoilModel.Geometry.AddRange(new[] + var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("Ondergrondmodel", new[] { new Point2D(1.0, 0.0), new Point2D(5.0, 0.0) @@ -385,13 +383,12 @@ new MacroStabilityInwardsSoilLayer1D(0) })); - var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("Ondergrondmodel"); - stochasticSoilModel.StochasticSoilProfiles.Add(stochasticSoilProfile); - stochasticSoilModel.Geometry.AddRange(new[] + var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("Ondergrondmodel", new[] { new Point2D(1.0, 0.0), new Point2D(5.0, 0.0) }); + stochasticSoilModel.StochasticSoilProfiles.Add(stochasticSoilProfile); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); failureMechanism.SurfaceLines.AddRange(new[] Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/MacroStabilityInwardsStochasticSoilModelReplaceDataStrategyTest.cs =================================================================== diff -u -rb8493c6fb982b455e36129083cc009c5c07a7d05 -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/MacroStabilityInwardsStochasticSoilModelReplaceDataStrategyTest.cs (.../MacroStabilityInwardsStochasticSoilModelReplaceDataStrategyTest.cs) (revision b8493c6fb982b455e36129083cc009c5c07a7d05) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/MacroStabilityInwardsStochasticSoilModelReplaceDataStrategyTest.cs (.../MacroStabilityInwardsStochasticSoilModelReplaceDataStrategyTest.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -95,8 +95,8 @@ // Setup var importedStochasticSoilModels = new[] { - new TestStochasticSoilModel("A"), - new TestStochasticSoilModel("B") + new TestMacroStabilityInwardsStochasticSoilModel("A"), + new TestMacroStabilityInwardsStochasticSoilModel("B") }; var failureMechanism = new MacroStabilityInwardsFailureMechanism(); failureMechanism.StochasticSoilModels.AddRange(importedStochasticSoilModels, sourceFilePath); @@ -121,8 +121,8 @@ var failureMechanism = new MacroStabilityInwardsFailureMechanism(); failureMechanism.StochasticSoilModels.AddRange(new[] { - new TestStochasticSoilModel("A"), - new TestStochasticSoilModel("B") + new TestMacroStabilityInwardsStochasticSoilModel("A"), + new TestMacroStabilityInwardsStochasticSoilModel("B") }, sourceFilePath); var strategy = new MacroStabilityInwardsStochasticSoilModelReplaceDataStrategy(failureMechanism); @@ -142,15 +142,15 @@ public void UpdateModelWithImportedData_WithCurrentModelAndImportedModel_ModelReplaced() { // Setup - var existingModel = new TestStochasticSoilModel("existing"); + var existingModel = new TestMacroStabilityInwardsStochasticSoilModel("existing"); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); failureMechanism.StochasticSoilModels.AddRange(new[] { existingModel }, sourceFilePath); var strategy = new MacroStabilityInwardsStochasticSoilModelReplaceDataStrategy(failureMechanism); - var readModel = new TestStochasticSoilModel("read"); + var readModel = new TestMacroStabilityInwardsStochasticSoilModel("read"); // Call IEnumerable affectedObjects = strategy.UpdateModelWithImportedData(new[] @@ -170,7 +170,7 @@ public void UpdateModelWithImportedData_CalculationWithOutputAssignedRemovedSoilModelAndProfile_CalculationUpdatedAndCalculationAndInputReturned() { // Setup - var existingModel = new TestStochasticSoilModel(); + var existingModel = new TestMacroStabilityInwardsStochasticSoilModel(); var calculation = new MacroStabilityInwardsCalculationScenario(); calculation.InputParameters.StochasticSoilModel = existingModel; calculation.InputParameters.StochasticSoilProfile = existingModel.StochasticSoilProfiles[0]; @@ -208,8 +208,8 @@ // Setup var importedStochasticSoilModels = new[] { - new TestStochasticSoilModel("B"), - new TestStochasticSoilModel("B") + new TestMacroStabilityInwardsStochasticSoilModel("B"), + new TestMacroStabilityInwardsStochasticSoilModel("B") }; var strategy = new MacroStabilityInwardsStochasticSoilModelReplaceDataStrategy(new MacroStabilityInwardsFailureMechanism()); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/MacroStabilityInwardsStochasticSoilModelUpdateDataStrategyTest.cs =================================================================== diff -u -r31f59cfc48a6839453e372572d03ecc6ae6f0d00 -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/MacroStabilityInwardsStochasticSoilModelUpdateDataStrategyTest.cs (.../MacroStabilityInwardsStochasticSoilModelUpdateDataStrategyTest.cs) (revision 31f59cfc48a6839453e372572d03ecc6ae6f0d00) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/MacroStabilityInwardsStochasticSoilModelUpdateDataStrategyTest.cs (.../MacroStabilityInwardsStochasticSoilModelUpdateDataStrategyTest.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -100,14 +100,14 @@ var targetCollection = new MacroStabilityInwardsStochasticSoilModelCollection(); targetCollection.AddRange(new[] { - new TestStochasticSoilModel(nonUniqueName) + new TestMacroStabilityInwardsStochasticSoilModel(nonUniqueName) }, sourceFilePath); var strategy = new MacroStabilityInwardsStochasticSoilModelUpdateDataStrategy(new MacroStabilityInwardsFailureMechanism()); var importedStochasticSoilModels = new[] { - new TestStochasticSoilModel(nonUniqueName), - new TestStochasticSoilModel(nonUniqueName) + new TestMacroStabilityInwardsStochasticSoilModel(nonUniqueName), + new TestMacroStabilityInwardsStochasticSoilModel(nonUniqueName) }; // Call @@ -130,8 +130,8 @@ var strategy = new MacroStabilityInwardsStochasticSoilModelUpdateDataStrategy(new MacroStabilityInwardsFailureMechanism()); var importedStochasticSoilModels = new[] { - new TestStochasticSoilModel(nonUniqueName), - new TestStochasticSoilModel(nonUniqueName) + new TestMacroStabilityInwardsStochasticSoilModel(nonUniqueName), + new TestMacroStabilityInwardsStochasticSoilModel(nonUniqueName) }; // Call @@ -149,7 +149,7 @@ public void UpdateModelWithImportedData_WithoutCurrentModelAndNoImportedModels_NoChangeNoNotification() { // Setup - IEnumerable importedStochasticSoilModels = Enumerable.Empty(); + IEnumerable importedStochasticSoilModels = Enumerable.Empty(); var strategy = new MacroStabilityInwardsStochasticSoilModelUpdateDataStrategy(new MacroStabilityInwardsFailureMechanism()); var targetCollection = new MacroStabilityInwardsStochasticSoilModelCollection(); @@ -165,15 +165,15 @@ public void UpdateModelWithImportedData_WithCurrentModelAndImportedModelWithOtherName_ModelReplaced() { // Setup - var existingModel = new TestStochasticSoilModel("existing"); + var existingModel = new TestMacroStabilityInwardsStochasticSoilModel("existing"); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); failureMechanism.StochasticSoilModels.AddRange(new[] { existingModel }, sourceFilePath); var strategy = new MacroStabilityInwardsStochasticSoilModelUpdateDataStrategy(failureMechanism); - var readModel = new TestStochasticSoilModel("read"); + var readModel = new TestMacroStabilityInwardsStochasticSoilModel("read"); // Call IEnumerable affectedObjects = strategy.UpdateModelWithImportedData(new[] @@ -194,7 +194,7 @@ { // Setup const string modelsName = "same model"; - var existingModel = new TestStochasticSoilModel(modelsName); + var existingModel = new TestMacroStabilityInwardsStochasticSoilModel(modelsName); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); MacroStabilityInwardsStochasticSoilModelCollection targetCollection = failureMechanism.StochasticSoilModels; @@ -204,7 +204,7 @@ }, sourceFilePath); var strategy = new MacroStabilityInwardsStochasticSoilModelUpdateDataStrategy(failureMechanism); - var readModel = new TestStochasticSoilModel(modelsName); + var readModel = new TestMacroStabilityInwardsStochasticSoilModel(modelsName); // Call IEnumerable affectedObjects = strategy.UpdateModelWithImportedData(new[] @@ -227,7 +227,7 @@ { // Setup const string modelsName = "same model"; - var existingModel = new TestStochasticSoilModel(modelsName); + var existingModel = new TestMacroStabilityInwardsStochasticSoilModel(modelsName); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); MacroStabilityInwardsStochasticSoilModelCollection targetCollection = failureMechanism.StochasticSoilModels; @@ -261,7 +261,7 @@ { // Setup const string modelsName = "same model"; - var existingModel = new TestStochasticSoilModel(modelsName); + var existingModel = new TestMacroStabilityInwardsStochasticSoilModel(modelsName); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); MacroStabilityInwardsStochasticSoilModelCollection targetCollection = failureMechanism.StochasticSoilModels; @@ -438,7 +438,7 @@ public void UpdateModelWithImportedData_CalculationWithOutputAssignedRemovedSoilModelAndProfile_CalculationUpdatedAndCalculationAndInputReturned() { // Setup - var existingModel = new TestStochasticSoilModel(); + var existingModel = new TestMacroStabilityInwardsStochasticSoilModel(); var calculation = new MacroStabilityInwardsCalculationScenario(); calculation.InputParameters.StochasticSoilModel = existingModel; calculation.InputParameters.StochasticSoilProfile = existingModel.StochasticSoilProfiles[0]; @@ -474,7 +474,7 @@ { // Setup const string modelsName = "same model"; - var existingModel = new TestStochasticSoilModel(modelsName); + var existingModel = new TestMacroStabilityInwardsStochasticSoilModel(modelsName); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); MacroStabilityInwardsStochasticSoilModelCollection targetCollection = failureMechanism.StochasticSoilModels; @@ -485,7 +485,7 @@ MacroStabilityInwardsStochasticSoilProfile removedProfile = existingModel.StochasticSoilProfiles[0]; MacroStabilityInwardsStochasticSoilProfile unaffectedProfile = existingModel.StochasticSoilProfiles[1]; - MacroStabilityInwardsStochasticSoilModel readModel = new TestStochasticSoilModel(modelsName); + MacroStabilityInwardsStochasticSoilModel readModel = new TestMacroStabilityInwardsStochasticSoilModel(modelsName); readModel.StochasticSoilProfiles.RemoveAt(0); var calculationWithRemovedProfile = new MacroStabilityInwardsCalculationScenario(); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/MacroStabilityInwardsSurfaceLineUpdateDataStrategyTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/MacroStabilityInwardsSurfaceLineUpdateDataStrategyTest.cs (.../MacroStabilityInwardsSurfaceLineUpdateDataStrategyTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/MacroStabilityInwardsSurfaceLineUpdateDataStrategyTest.cs (.../MacroStabilityInwardsSurfaceLineUpdateDataStrategyTest.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -563,25 +563,23 @@ var soilModels = new[] { - new MacroStabilityInwardsStochasticSoilModel("A") + new MacroStabilityInwardsStochasticSoilModel("A", new[] { - Geometry = - { - new Point2D(2, -1), - new Point2D(2, 1) - }, + new Point2D(2, -1), + new Point2D(2, 1) + }) + { StochasticSoilProfiles = { new MacroStabilityInwardsStochasticSoilProfile(0.2, MacroStabilityInwardsSoilProfile1DTestFactory.CreateMacroStabilityInwardsSoilProfile1D()) } }, - new MacroStabilityInwardsStochasticSoilModel("C") + new MacroStabilityInwardsStochasticSoilModel("C", new[] { - Geometry = - { - new Point2D(-2, -1), - new Point2D(-2, 1) - }, + new Point2D(2, -1), + new Point2D(2, 1) + }) + { StochasticSoilProfiles = { new MacroStabilityInwardsStochasticSoilProfile(0.3, MacroStabilityInwardsSoilProfile1DTestFactory.CreateMacroStabilityInwardsSoilProfile1D()) @@ -631,37 +629,34 @@ // Setup var soilModels = new[] { - new MacroStabilityInwardsStochasticSoilModel("A") + new MacroStabilityInwardsStochasticSoilModel("A", new[] { - Geometry = - { - new Point2D(2, -1), - new Point2D(2, 1) - }, + new Point2D(2, -1), + new Point2D(2, 1) + }) + { StochasticSoilProfiles = { new MacroStabilityInwardsStochasticSoilProfile(0.2, MacroStabilityInwardsSoilProfile1DTestFactory.CreateMacroStabilityInwardsSoilProfile1D()) } }, - new MacroStabilityInwardsStochasticSoilModel("C") + new MacroStabilityInwardsStochasticSoilModel("C", new[] { - Geometry = - { - new Point2D(-2, -1), - new Point2D(-2, 1) - }, + new Point2D(2, -1), + new Point2D(2, 1) + }) + { StochasticSoilProfiles = { new MacroStabilityInwardsStochasticSoilProfile(0.3, MacroStabilityInwardsSoilProfile1DTestFactory.CreateMacroStabilityInwardsSoilProfile1D()) } }, - new MacroStabilityInwardsStochasticSoilModel("E") + new MacroStabilityInwardsStochasticSoilModel("E", new[] { - Geometry = - { - new Point2D(6, -1), - new Point2D(6, 1) - }, + new Point2D(6, -1), + new Point2D(6, 1) + }) + { StochasticSoilProfiles = { new MacroStabilityInwardsStochasticSoilProfile(0.3, MacroStabilityInwardsSoilProfile1DTestFactory.CreateMacroStabilityInwardsSoilProfile1D()) @@ -719,13 +714,12 @@ public void UpdateSurfaceLinesWithImportedData_WithCalculationAssignedToRemovedLine_UpdatesCalculationAndDoesNotRemoveStochasticSoilInputs() { // Setup - var soilModel = new MacroStabilityInwardsStochasticSoilModel("A") + var soilModel = new MacroStabilityInwardsStochasticSoilModel("A", new[] { - Geometry = - { - new Point2D(2, -1), - new Point2D(2, 1) - }, + new Point2D(2, -1), + new Point2D(2, 1) + }) + { StochasticSoilProfiles = { new MacroStabilityInwardsStochasticSoilProfile(0.2, MacroStabilityInwardsSoilProfile1DTestFactory.CreateMacroStabilityInwardsSoilProfile1D()) @@ -776,14 +770,11 @@ public void UpdateSurfaceLinesWithImportedData_WithCalculationAssignedToRemovedLine_UpdatesCalculationAndDoesNotRemoveStochasticSoilModelInput() { // Setup - var soilModel = new MacroStabilityInwardsStochasticSoilModel("A") + var soilModel = new MacroStabilityInwardsStochasticSoilModel("A", new[] { - Geometry = - { - new Point2D(2, -1), - new Point2D(2, 1) - } - }; + new Point2D(2, -1), + new Point2D(2, 1) + }); MacroStabilityInwardsSurfaceLine surfaceLine = CreateValidSurfaceLineForCalculations(); var calculation = new MacroStabilityInwardsCalculation @@ -861,25 +852,23 @@ var soilModels = new[] { - new MacroStabilityInwardsStochasticSoilModel("A") + new MacroStabilityInwardsStochasticSoilModel("A", new[] { - Geometry = - { - new Point2D(2, -1), - new Point2D(2, 1) - }, + new Point2D(2, -1), + new Point2D(2, 1) + }) + { StochasticSoilProfiles = { new MacroStabilityInwardsStochasticSoilProfile(0.2, MacroStabilityInwardsSoilProfile1DTestFactory.CreateMacroStabilityInwardsSoilProfile1D()) } }, - new MacroStabilityInwardsStochasticSoilModel("C") + new MacroStabilityInwardsStochasticSoilModel("C", new[] { - Geometry = - { - new Point2D(-2, -1), - new Point2D(-2, 1) - }, + new Point2D(2, -1), + new Point2D(2, 1) + }) + { StochasticSoilProfiles = { new MacroStabilityInwardsStochasticSoilProfile(0.3, MacroStabilityInwardsSoilProfile1DTestFactory.CreateMacroStabilityInwardsSoilProfile1D()) Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -rf2ba7f68f5de2fc3c8dec8baf7326808120cee52 -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsCalculationGroupContextTreeNodeInfoTest.cs (.../MacroStabilityInwardsCalculationGroupContextTreeNodeInfoTest.cs) (revision f2ba7f68f5de2fc3c8dec8baf7326808120cee52) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsCalculationGroupContextTreeNodeInfoTest.cs (.../MacroStabilityInwardsCalculationGroupContextTreeNodeInfoTest.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -437,7 +437,7 @@ Enumerable.Empty(), new[] { - new TestStochasticSoilModel() + new TestMacroStabilityInwardsStochasticSoilModel() }, failureMechanism, assessmentSection); @@ -524,7 +524,7 @@ }, new[] { - new TestStochasticSoilModel() + new TestMacroStabilityInwardsStochasticSoilModel() }, failureMechanism, assessmentSection); @@ -1014,7 +1014,7 @@ surfaceLines, new[] { - new TestStochasticSoilModel() + new TestMacroStabilityInwardsStochasticSoilModel() }, failureMechanism, assessmentSection); @@ -1108,14 +1108,11 @@ surfaceLines, new[] { - new TestStochasticSoilModel + new TestMacroStabilityInwardsStochasticSoilModel("name", new[] { - Geometry = - { - new Point2D(0.0, 0.0), - new Point2D(5.0, 0.0) - } - } + new Point2D(0.0, 0.0), + new Point2D(5.0, 0.0) + }) }, failureMechanism, assessmentSection); @@ -1220,14 +1217,11 @@ surfaceLines, new[] { - new TestStochasticSoilModel + new TestMacroStabilityInwardsStochasticSoilModel("name", new[] { - Geometry = - { - new Point2D(0.0, 0.0), - new Point2D(5.0, 0.0) - } - } + new Point2D(0.0, 0.0), + new Point2D(5.0, 0.0) + }) }, failureMechanism, assessmentSection); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsCalculationScenarioContextTreeNodeInfoTest.cs =================================================================== diff -u -r8cf507b4db04c91cd5bc5ed243616f093a3016da -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsCalculationScenarioContextTreeNodeInfoTest.cs (.../MacroStabilityInwardsCalculationScenarioContextTreeNodeInfoTest.cs) (revision 8cf507b4db04c91cd5bc5ed243616f093a3016da) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsCalculationScenarioContextTreeNodeInfoTest.cs (.../MacroStabilityInwardsCalculationScenarioContextTreeNodeInfoTest.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -125,7 +125,7 @@ }, new[] { - new TestStochasticSoilModel() + new TestMacroStabilityInwardsStochasticSoilModel() }, failureMechanism, assessmentSection); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/UpdateInfos/MacroStabilityInwardsStochasticSoilModelCollectionContextUpdateInfoTest.cs =================================================================== diff -u -rf2ba7f68f5de2fc3c8dec8baf7326808120cee52 -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/UpdateInfos/MacroStabilityInwardsStochasticSoilModelCollectionContextUpdateInfoTest.cs (.../MacroStabilityInwardsStochasticSoilModelCollectionContextUpdateInfoTest.cs) (revision f2ba7f68f5de2fc3c8dec8baf7326808120cee52) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/UpdateInfos/MacroStabilityInwardsStochasticSoilModelCollectionContextUpdateInfoTest.cs (.../MacroStabilityInwardsStochasticSoilModelCollectionContextUpdateInfoTest.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -224,7 +224,7 @@ var stochasticSoilModelCollection = new MacroStabilityInwardsStochasticSoilModelCollection(); stochasticSoilModelCollection.AddRange(new[] { - new TestStochasticSoilModel() + new TestMacroStabilityInwardsStochasticSoilModel() }, expectedFilePath); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfiles/PipingStochasticSoilModelTransformer.cs =================================================================== diff -u -rec201316303aa676976655dcdfd9285dcc3ec4f1 -rda4a311b2ac60defe1a27a61c8d151f47268a941 --- Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfiles/PipingStochasticSoilModelTransformer.cs (.../PipingStochasticSoilModelTransformer.cs) (revision ec201316303aa676976655dcdfd9285dcc3ec4f1) +++ Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfiles/PipingStochasticSoilModelTransformer.cs (.../PipingStochasticSoilModelTransformer.cs) (revision da4a311b2ac60defe1a27a61c8d151f47268a941) @@ -73,7 +73,7 @@ { IEnumerable profilesToTransform = StochasticSoilProfileHelper.GetValidatedStochasticSoilProfilesToTransform(stochasticSoilProfiles, - soilModelName); + soilModelName); return profilesToTransform.Select(ssp => PipingStochasticSoilProfileTransformer.Transform( ssp,