Index: Ringtoets/Integration/test/Ringtoets.Integration.Service.Test/RingtoetsDataSynchronizationServiceTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/Integration/test/Ringtoets.Integration.Service.Test/RingtoetsDataSynchronizationServiceTest.cs (.../RingtoetsDataSynchronizationServiceTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Service.Test/RingtoetsDataSynchronizationServiceTest.cs (.../RingtoetsDataSynchronizationServiceTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -43,14 +43,14 @@
using Ringtoets.Integration.Data.StandAlone;
using Ringtoets.Integration.TestUtils;
using Ringtoets.MacroStabilityInwards.Data;
+using Ringtoets.MacroStabilityInwards.Data.SoilProfile;
using Ringtoets.MacroStabilityInwards.Primitives;
using Ringtoets.Piping.Data;
using Ringtoets.Piping.Data.SoilProfile;
using Ringtoets.Piping.Primitives;
using Ringtoets.StabilityPointStructures.Data;
using Ringtoets.StabilityStoneCover.Data;
using Ringtoets.WaveImpactAsphaltCover.Data;
-using MacroStabilityInwardsStochasticSoilModel = Ringtoets.MacroStabilityInwards.Data.SoilProfile.StochasticSoilModel;
namespace Ringtoets.Integration.Service.Test
{
Index: Ringtoets/Integration/test/Ringtoets.Integration.TestUtils/DataImportHelper.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/Integration/test/Ringtoets.Integration.TestUtils/DataImportHelper.cs (.../DataImportHelper.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/Integration/test/Ringtoets.Integration.TestUtils/DataImportHelper.cs (.../DataImportHelper.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -262,7 +262,7 @@
}
///
- /// Imports the data for the
+ /// Imports the data for the
/// of the given .
///
/// The to import on.
Index: Ringtoets/Integration/test/Ringtoets.Integration.TestUtils/DataUpdateHelper.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/Integration/test/Ringtoets.Integration.TestUtils/DataUpdateHelper.cs (.../DataUpdateHelper.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/Integration/test/Ringtoets.Integration.TestUtils/DataUpdateHelper.cs (.../DataUpdateHelper.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -69,7 +69,7 @@
}
///
- /// Imports the data for the
+ /// Imports the data for the
/// of the given and updates existing data based upon the imported
/// data.
///
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsFailureMechanism.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsFailureMechanism.cs (.../MacroStabilityInwardsFailureMechanism.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsFailureMechanism.cs (.../MacroStabilityInwardsFailureMechanism.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -44,7 +44,7 @@
MacroStabilityInwardsProbabilityAssessmentInput = new MacroStabilityInwardsProbabilityAssessmentInput();
GeneralInput = new GeneralMacroStabilityInwardsInput();
SurfaceLines = new MacroStabilityInwardsSurfaceLineCollection();
- StochasticSoilModels = new StochasticSoilModelCollection();
+ StochasticSoilModels = new MacroStabilityInwardsStochasticSoilModelCollection();
CalculationsGroup = new CalculationGroup(RingtoetsCommonDataResources.FailureMechanism_Calculations_DisplayName, false);
sectionResults = new List();
@@ -66,7 +66,7 @@
///
/// Gets the available stochastic soil models within the scope of the macro stability inwards failure mechanism.
///
- public StochasticSoilModelCollection StochasticSoilModels { get; }
+ public MacroStabilityInwardsStochasticSoilModelCollection StochasticSoilModels { get; }
///
/// Gets the general calculation input parameters that apply to each macro stability inwards calculation.
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsInput.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsInput.cs (.../MacroStabilityInwardsInput.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsInput.cs (.../MacroStabilityInwardsInput.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -131,12 +131,12 @@
///
/// Gets or sets the stochastic soil model which is linked to the .
///
- public StochasticSoilModel StochasticSoilModel { get; set; }
+ public MacroStabilityInwardsStochasticSoilModel StochasticSoilModel { get; set; }
///
/// Gets or sets the profile which contains a 1 dimensional definition of soil layers with properties.
///
- public StochasticSoilProfile StochasticSoilProfile { get; set; }
+ public MacroStabilityInwardsStochasticSoilProfile StochasticSoilProfile { get; set; }
///
/// Gets or sets the hydraulic boundary location from which to use the assessment level.
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/Ringtoets.MacroStabilityInwards.Data.csproj
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/Ringtoets.MacroStabilityInwards.Data.csproj (.../Ringtoets.MacroStabilityInwards.Data.csproj) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/Ringtoets.MacroStabilityInwards.Data.csproj (.../Ringtoets.MacroStabilityInwards.Data.csproj) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -61,14 +61,14 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilLayerUnderSurfaceLine.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilLayerUnderSurfaceLine.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilLayerUnderSurfaceLine.cs (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -0,0 +1,85 @@
+// 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 System.Linq;
+using Core.Common.Base.Geometry;
+using Ringtoets.MacroStabilityInwards.Primitives;
+
+namespace Ringtoets.MacroStabilityInwards.Data.SoilProfile
+{
+ ///
+ /// A 2D soil layer that has been adapted by using a surface line.
+ ///
+ public class MacroStabilityInwardsSoilLayerUnderSurfaceLine
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The outer ring of the geometry of the soil layer.
+ /// The properties of the soil layer.
+ /// Thrown when any parameter is null.
+ public MacroStabilityInwardsSoilLayerUnderSurfaceLine(Point2D[] outerRing, SoilLayerProperties properties)
+ : this(outerRing, Enumerable.Empty(), properties) {}
+
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The outer ring of the geometry of the soil layer.
+ /// The holes of the geometry of the soil layer.
+ /// The properties of the soil layer.
+ /// Thrown when any parameter is null.
+ public MacroStabilityInwardsSoilLayerUnderSurfaceLine(Point2D[] outerRing, IEnumerable holes, SoilLayerProperties properties)
+ {
+ if (outerRing == null)
+ {
+ throw new ArgumentNullException(nameof(outerRing));
+ }
+ if (holes == null)
+ {
+ throw new ArgumentNullException(nameof(holes));
+ }
+ if (properties == null)
+ {
+ throw new ArgumentNullException(nameof(properties));
+ }
+ OuterRing = outerRing;
+ Holes = holes;
+ Properties = properties;
+ }
+
+ ///
+ /// Gets the outer ring of the geometry.
+ ///
+ public Point2D[] OuterRing { get; }
+
+ ///
+ /// Gets the holes of the geometry.
+ ///
+ public IEnumerable Holes { get; }
+
+ ///
+ /// Gets the properties of the soil layer.
+ ///
+ public SoilLayerProperties Properties { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLine.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLine.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLine.cs (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -0,0 +1,52 @@
+// 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;
+
+namespace Ringtoets.MacroStabilityInwards.Data.SoilProfile
+{
+ ///
+ /// A soil profile for which its soil layers have been adapted using a surface line.
+ ///
+ public class MacroStabilityInwardsSoilProfileUnderSurfaceLine
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The layers in the profile.
+ /// Thrown when
+ /// is null.
+ public MacroStabilityInwardsSoilProfileUnderSurfaceLine(IEnumerable layersUnderSurfaceLine)
+ {
+ if (layersUnderSurfaceLine == null)
+ {
+ throw new ArgumentNullException(nameof(layersUnderSurfaceLine));
+ }
+ LayersUnderSurfaceLine = layersUnderSurfaceLine;
+ }
+
+ ///
+ /// Gets the layers in the profile.
+ ///
+ public IEnumerable LayersUnderSurfaceLine { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.cs (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -0,0 +1,148 @@
+// 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 System.Collections.ObjectModel;
+using System.Linq;
+using Core.Common.Base.Geometry;
+using Core.Common.Geometry;
+using Ringtoets.MacroStabilityInwards.Primitives;
+
+namespace Ringtoets.MacroStabilityInwards.Data.SoilProfile
+{
+ ///
+ /// Class for constructing soil profiles for which the geometry of the layers lay under a surface line.
+ ///
+ public static class MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory
+ {
+ ///
+ /// Creates a new .
+ ///
+ /// The soil profile containing layers under the .
+ /// The surface line for which determines the top of the .
+ /// A new containing geometries from the
+ /// under the .
+ /// Thrown when any parameter is null.
+ public static MacroStabilityInwardsSoilProfileUnderSurfaceLine Create(MacroStabilityInwardsSoilProfile1D soilProfile,
+ MacroStabilityInwardsSurfaceLine surfaceLine)
+ {
+ if (soilProfile == null)
+ {
+ throw new ArgumentNullException(nameof(soilProfile));
+ }
+ if (surfaceLine == null)
+ {
+ throw new ArgumentNullException(nameof(surfaceLine));
+ }
+ Point2D[] localizedSurfaceLine = surfaceLine.LocalGeometry.ToArray();
+
+ double geometryBottom = Math.Min(soilProfile.Bottom, localizedSurfaceLine.Min(p => p.Y)) - 1;
+ IEnumerable surfaceLineGeometry = AdvancedMath2D.CompleteLineToPolygon(localizedSurfaceLine, geometryBottom);
+ IEnumerable layerGeometries = soilProfile.Layers.Select(
+ layer => As2DGeometry(
+ layer,
+ soilProfile,
+ localizedSurfaceLine.First().X,
+ localizedSurfaceLine.Last().X));
+
+ return GeometriesToIntersections(layerGeometries, surfaceLineGeometry);
+ }
+
+ ///
+ /// Creates a new .
+ ///
+ /// The soil profile containing layers.
+ /// A new containing geometries from the
+ /// .
+ /// Thrown when is null.
+ public static MacroStabilityInwardsSoilProfileUnderSurfaceLine Create(MacroStabilityInwardsSoilProfile2D soilProfile)
+ {
+ if (soilProfile == null)
+ {
+ throw new ArgumentNullException(nameof(soilProfile));
+ }
+
+ IEnumerable layersUnderSurfaceLine = soilProfile.Layers.Select(
+ layer => new MacroStabilityInwardsSoilLayerUnderSurfaceLine(
+ RingToPoints(layer.OuterRing),
+ layer.Holes.Select(RingToPoints),
+ layer.Properties));
+
+ return new MacroStabilityInwardsSoilProfileUnderSurfaceLine(layersUnderSurfaceLine);
+ }
+
+ private static Point2D[] RingToPoints(Ring ring)
+ {
+ return ring.Points.ToArray();
+ }
+
+ private static MacroStabilityInwardsSoilProfileUnderSurfaceLine GeometriesToIntersections(IEnumerable layerGeometries, IEnumerable surfaceLineGeometry)
+ {
+ var collection = new Collection();
+
+ IEnumerable surfaceLineGeometryArray = surfaceLineGeometry.ToArray();
+
+ foreach (TempSoilLayerGeometry layer in layerGeometries)
+ {
+ foreach (Point2D[] soilLayerArea in GetSoilLayerWithSurfaceLineIntersection(surfaceLineGeometryArray, layer.OuterLoop))
+ {
+ collection.Add(new MacroStabilityInwardsSoilLayerUnderSurfaceLine(soilLayerArea, layer.Properties));
+ }
+ }
+
+ return new MacroStabilityInwardsSoilProfileUnderSurfaceLine(collection);
+ }
+
+ private static TempSoilLayerGeometry As2DGeometry(MacroStabilityInwardsSoilLayer1D layer, MacroStabilityInwardsSoilProfile1D soilProfile, double minX, double maxX)
+ {
+ double top = layer.Top;
+ double bottom = top - soilProfile.GetLayerThickness(layer);
+
+ return new TempSoilLayerGeometry(new[]
+ {
+ new Point2D(minX, top),
+ new Point2D(maxX, top),
+ new Point2D(maxX, bottom),
+ new Point2D(minX, bottom)
+ }, layer.Properties);
+ }
+
+ private static IEnumerable GetSoilLayerWithSurfaceLineIntersection(IEnumerable surfaceLineGeometry, IEnumerable soilLayerGeometry)
+ {
+ return AdvancedMath2D.PolygonIntersectionWithPolygon(surfaceLineGeometry, soilLayerGeometry).Where(arr => arr.Length > 2);
+ }
+
+ private class TempSoilLayerGeometry
+ {
+ public TempSoilLayerGeometry(Point2D[] outerLoop, SoilLayerProperties properties)
+ {
+ OuterLoop = outerLoop;
+ Properties = properties;
+ InnerLoops = Enumerable.Empty();
+ }
+
+ public Point2D[] OuterLoop { get; }
+ public SoilLayerProperties Properties { get; }
+ public IEnumerable InnerLoops { get; }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsStochasticSoilModel.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsStochasticSoilModel.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsStochasticSoilModel.cs (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -0,0 +1,148 @@
+// 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 System.Linq;
+using Core.Common.Base;
+using Core.Common.Base.Geometry;
+using Ringtoets.Common.Data;
+using Ringtoets.MacroStabilityInwards.Primitives;
+
+namespace Ringtoets.MacroStabilityInwards.Data.SoilProfile
+{
+ ///
+ /// This class represents a stochastic soil model which consists out of a collection of .
+ /// A stochastic soil model contains a segment for which the model applies.
+ ///
+ public class MacroStabilityInwardsStochasticSoilModel : Observable, IMechanismStochasticSoilModel
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// Name of the segment soil model.
+ /// Thrown when is
+ /// null.
+ public MacroStabilityInwardsStochasticSoilModel(string name)
+ {
+ if (name == null)
+ {
+ throw new ArgumentNullException(nameof(name));
+ }
+ Name = name;
+ Geometry = new List();
+ 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; }
+
+ ///
+ /// Gets the list of .
+ ///
+ public List StochasticSoilProfiles { get; }
+
+ ///
+ /// Updates the with the properties
+ /// from .
+ ///
+ /// The to
+ /// obtain the property values from.
+ /// Thrown when
+ /// is null.
+ /// Thrown when
+ /// contains multiple profiles with the same name, and also contains a
+ /// profile with the same name.
+ ///
+ public MacroStabilityInwardsStochasticSoilModelProfileDifference Update(MacroStabilityInwardsStochasticSoilModel fromModel)
+ {
+ if (fromModel == null)
+ {
+ throw new ArgumentNullException(nameof(fromModel));
+ }
+
+ Name = fromModel.Name;
+ Geometry.Clear();
+ foreach (Point2D point in fromModel.Geometry)
+ {
+ Geometry.Add(point);
+ }
+
+ var newSoilProfiles = new List();
+ var updatedProfiles = new List();
+ var addedProfiles = new List();
+ var removedProfiles = new List();
+
+ foreach (MacroStabilityInwardsStochasticSoilProfile fromProfile in fromModel.StochasticSoilProfiles)
+ {
+ MacroStabilityInwardsStochasticSoilProfile sameProfile = StochasticSoilProfiles.SingleOrDefault(
+ sp => IsSame(sp, fromProfile)
+ );
+ if (sameProfile != null)
+ {
+ if (sameProfile.Update(fromProfile))
+ {
+ updatedProfiles.Add(sameProfile);
+ }
+ }
+ else
+ {
+ StochasticSoilProfiles.Add(fromProfile);
+ addedProfiles.Add(fromProfile);
+ }
+ newSoilProfiles.Add(fromProfile.SoilProfile);
+ }
+
+ foreach (MacroStabilityInwardsStochasticSoilProfile profileToRemove in StochasticSoilProfiles.Where(
+ sp => !newSoilProfiles.Any(newSp => IsSame(newSp, sp.SoilProfile))).ToArray())
+ {
+ StochasticSoilProfiles.Remove(profileToRemove);
+ removedProfiles.Add(profileToRemove);
+ }
+
+ return new MacroStabilityInwardsStochasticSoilModelProfileDifference(addedProfiles, updatedProfiles, removedProfiles);
+ }
+
+ public override string ToString()
+ {
+ return Name;
+ }
+
+ private static bool IsSame(ISoilProfile soilProfile, ISoilProfile otherSoilProfile)
+ {
+ bool equalNames = soilProfile.Name.Equals(otherSoilProfile.Name);
+ bool equalTypes = soilProfile.GetType() == otherSoilProfile.GetType();
+ return equalNames && equalTypes;
+ }
+
+ private static bool IsSame(MacroStabilityInwardsStochasticSoilProfile stochasticSoilProfile, MacroStabilityInwardsStochasticSoilProfile otherStochasticSoilProfile)
+ {
+ return IsSame(stochasticSoilProfile.SoilProfile, otherStochasticSoilProfile.SoilProfile);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsStochasticSoilModelCollection.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsStochasticSoilModelCollection.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsStochasticSoilModelCollection.cs (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -0,0 +1,39 @@
+// 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 Core.Common.Base;
+using Ringtoets.MacroStabilityInwards.Data.Properties;
+using RingtoetsCommonDataResources = Ringtoets.Common.Data.Properties.Resources;
+
+namespace Ringtoets.MacroStabilityInwards.Data.SoilProfile
+{
+ ///
+ /// A collection of .
+ /// The names of the
+ /// elements are unique within the collection.
+ ///
+ public class MacroStabilityInwardsStochasticSoilModelCollection : ObservableUniqueItemCollectionWithSourcePath
+ {
+ public MacroStabilityInwardsStochasticSoilModelCollection() : base(model => model.Name,
+ RingtoetsCommonDataResources.StochasticSoilModelCollection_TypeDescriptor,
+ Resources.UniqueFeature_Name_FeatureDescription) {}
+ }
+}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsStochasticSoilModelExtensions.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsStochasticSoilModelExtensions.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsStochasticSoilModelExtensions.cs (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -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 System.Linq;
+using Core.Common.Base.Geometry;
+using Ringtoets.MacroStabilityInwards.Primitives;
+
+namespace Ringtoets.MacroStabilityInwards.Data.SoilProfile
+{
+ ///
+ /// Extension methods dealing with instances.
+ ///
+ public static class MacroStabilityInwardsStochasticSoilModelExtensions
+ {
+ ///
+ /// Indicates whether a stochastic soil model intersects with a surface line.
+ ///
+ /// The stochastic soil model used to match a surface line.
+ /// The surface line used to match a stochastic soil model.
+ /// true when the intersects with the ;
+ /// false otherwise.
+ /// Thrown when any input parameter is null.
+ public static bool IntersectsWithSurfaceLineGeometry(this MacroStabilityInwardsStochasticSoilModel stochasticSoilModel,
+ MacroStabilityInwardsSurfaceLine surfaceLine)
+ {
+ if (stochasticSoilModel == null)
+ {
+ throw new ArgumentNullException(nameof(stochasticSoilModel));
+ }
+ if (surfaceLine == null)
+ {
+ throw new ArgumentNullException(nameof(surfaceLine));
+ }
+
+ Segment2D[] surfaceLineSegments = Math2D.ConvertLinePointsToLineSegments(surfaceLine.Points.Select(p => new Point2D(p.X, p.Y))).ToArray();
+ return DoesSoilModelGeometryIntersectWithSurfaceLineGeometry(stochasticSoilModel, surfaceLineSegments);
+ }
+
+ private static bool DoesSoilModelGeometryIntersectWithSurfaceLineGeometry(MacroStabilityInwardsStochasticSoilModel stochasticSoilModel, Segment2D[] surfaceLineSegments)
+ {
+ IEnumerable soilProfileGeometrySegments = Math2D.ConvertLinePointsToLineSegments(stochasticSoilModel.Geometry);
+ return soilProfileGeometrySegments.Any(s => DoesSegmentIntersectWithSegmentArray(s, surfaceLineSegments));
+ }
+
+ private static bool DoesSegmentIntersectWithSegmentArray(Segment2D segment, Segment2D[] segmentArray)
+ {
+ // Consider intersections and overlaps similarly
+ return segmentArray.Any(sls => Math2D.GetIntersectionBetweenSegments(segment, sls).IntersectionType != Intersection2DType.DoesNotIntersect);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsStochasticSoilModelProfileDifference.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsStochasticSoilModelProfileDifference.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsStochasticSoilModelProfileDifference.cs (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -0,0 +1,63 @@
+// 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.Collections.Generic;
+
+namespace Ringtoets.MacroStabilityInwards.Data.SoilProfile
+{
+ ///
+ /// Container for the differences of the collection of contained
+ /// by a .
+ ///
+ public class MacroStabilityInwardsStochasticSoilModelProfileDifference
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// Profiles that were added to the model.
+ /// Profiles that were updated.
+ /// Profiles that were removed from the model.
+ public MacroStabilityInwardsStochasticSoilModelProfileDifference(
+ IEnumerable addedProfiles,
+ IEnumerable updatedProfiles,
+ IEnumerable removedProfiles)
+ {
+ AddedProfiles = addedProfiles;
+ UpdatedProfiles = updatedProfiles;
+ RemovedProfiles = removedProfiles;
+ }
+
+ ///
+ /// Gets the profiles that were updated.
+ ///
+ public IEnumerable UpdatedProfiles { get; }
+
+ ///
+ /// Gets the profiles that were removed from the model.
+ ///
+ public IEnumerable RemovedProfiles { get; }
+
+ ///
+ /// Gets the profiles that were added to the model.
+ ///
+ public IEnumerable AddedProfiles { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsStochasticSoilProfile.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsStochasticSoilProfile.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsStochasticSoilProfile.cs (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -0,0 +1,159 @@
+// 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.Globalization;
+using Core.Common.Base;
+using Core.Common.Base.Data;
+using Ringtoets.MacroStabilityInwards.Data.Properties;
+using Ringtoets.MacroStabilityInwards.Primitives;
+
+namespace Ringtoets.MacroStabilityInwards.Data.SoilProfile
+{
+ ///
+ /// This class couples a SoilProfile to a probability of occurrence.
+ ///
+ public class MacroStabilityInwardsStochasticSoilProfile : Observable
+ {
+ private static readonly Range probabilityValidityRange = new Range(0, 1);
+ private double probability;
+
+ ///
+ /// Creates a new instance of .
+ ///
+ /// Probability of the stochastic soil profile.
+ /// Type of the stochastic soil profile.
+ /// Database identifier of the stochastic soil profile.
+ public MacroStabilityInwardsStochasticSoilProfile(double probability, SoilProfileType soilProfileType, long soilProfileId)
+ {
+ Probability = probability;
+ SoilProfileType = soilProfileType;
+ SoilProfileId = soilProfileId;
+ }
+
+ ///
+ /// Gets the type of the stochastic soil profile.
+ ///
+ public SoilProfileType SoilProfileType { get; private set; }
+
+ ///
+ /// Gets the database identifier of the stochastic soil profile.
+ ///
+ public long SoilProfileId { get; }
+
+ ///
+ /// Gets the .
+ ///
+ public ISoilProfile SoilProfile { get; set; }
+
+ ///
+ /// Gets the probability of the stochastic soil profile.
+ ///
+ /// Thrown when the is outside the range
+ /// [0, 1].
+ public double Probability
+ {
+ get
+ {
+ return probability;
+ }
+ private set
+ {
+ if (!probabilityValidityRange.InRange(value))
+ {
+ throw new ArgumentOutOfRangeException(
+ nameof(value),
+ string.Format(
+ Resources.StochasticSoilProfile_Probability_Should_be_in_range_0_,
+ probabilityValidityRange.ToString(FormattableConstants.ShowAtLeastOneDecimal, CultureInfo.CurrentCulture)));
+ }
+ probability = value;
+ }
+ }
+
+ ///
+ /// Updates the probability of the
+ /// by adding .
+ ///
+ /// The amount to increase the
+ /// with.
+ public void AddProbability(double probabilityToAdd)
+ {
+ Probability += probabilityToAdd;
+ }
+
+ ///
+ /// Updates the with the properties
+ /// from .
+ ///
+ /// The to
+ /// obtain the property values from.
+ /// Thrown when
+ /// is null.
+ /// true if the profile has been updated; false otherwise.
+ public bool Update(MacroStabilityInwardsStochasticSoilProfile fromProfile)
+ {
+ if (fromProfile == null)
+ {
+ throw new ArgumentNullException(nameof(fromProfile));
+ }
+ if (!Equals(fromProfile))
+ {
+ SoilProfile = fromProfile.SoilProfile;
+ SoilProfileType = fromProfile.SoilProfileType;
+ Probability = fromProfile.Probability;
+ return true;
+ }
+ return false;
+ }
+
+ public override string ToString()
+ {
+ return SoilProfile?.ToString() ?? string.Empty;
+ }
+
+ public override bool Equals(object obj)
+ {
+ if (ReferenceEquals(null, obj)) return false;
+ if (ReferenceEquals(this, obj)) return true;
+ if (obj.GetType() != GetType()) return false;
+ return Equals((MacroStabilityInwardsStochasticSoilProfile) obj);
+ }
+
+ public override int GetHashCode()
+ {
+ unchecked
+ {
+ int hashCode = Probability.GetHashCode();
+ hashCode = (hashCode * 397) ^ (int) SoilProfileType;
+ hashCode = (hashCode * 397) ^ (SoilProfile?.GetHashCode() ?? 0);
+ return hashCode;
+ }
+ }
+
+ private bool Equals(MacroStabilityInwardsStochasticSoilProfile other)
+ {
+ return Probability.Equals(other.Probability)
+ && SoilProfileType == other.SoilProfileType
+ && Equals(SoilProfile, other.SoilProfile);
+ }
+ }
+}
\ No newline at end of file
Fisheye: Tag 78382ec129ddc7537096860680cef36f3796700d refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/SoilLayerUnderSurfaceLine.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 78382ec129ddc7537096860680cef36f3796700d refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/SoilProfileUnderSurfaceLine.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 78382ec129ddc7537096860680cef36f3796700d refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/SoilProfileUnderSurfaceLineFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 78382ec129ddc7537096860680cef36f3796700d refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/StochasticSoilModel.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 78382ec129ddc7537096860680cef36f3796700d refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/StochasticSoilModelCollection.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 78382ec129ddc7537096860680cef36f3796700d refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/StochasticSoilModelExtensions.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 78382ec129ddc7537096860680cef36f3796700d refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/StochasticSoilModelProfileDifference.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 78382ec129ddc7537096860680cef36f3796700d refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/StochasticSoilProfile.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Factories/MacroStabilityInwardsMapDataFactory.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Factories/MacroStabilityInwardsMapDataFactory.cs (.../MacroStabilityInwardsMapDataFactory.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Factories/MacroStabilityInwardsMapDataFactory.cs (.../MacroStabilityInwardsMapDataFactory.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -53,7 +53,7 @@
}
///
- /// Create with default styling for collections of .
+ /// Create with default styling for collections of .
///
/// The created .
public static MapLineData CreateStochasticSoilModelsMapData()
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Factories/MacroStabilityInwardsMapDataFeaturesFactory.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Factories/MacroStabilityInwardsMapDataFeaturesFactory.cs (.../MacroStabilityInwardsMapDataFeaturesFactory.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Factories/MacroStabilityInwardsMapDataFeaturesFactory.cs (.../MacroStabilityInwardsMapDataFeaturesFactory.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -69,17 +69,17 @@
///
/// Create stochastic soil model features based on the provided .
///
- /// The collection of to create the stochastic soil model features for.
+ /// The collection of to create the stochastic soil model features for.
/// An array of features or an empty array when is null or empty.
- public static MapFeature[] CreateStochasticSoilModelFeatures(StochasticSoilModel[] stochasticSoilModels)
+ public static MapFeature[] CreateStochasticSoilModelFeatures(MacroStabilityInwardsStochasticSoilModel[] stochasticSoilModels)
{
if (stochasticSoilModels != null && stochasticSoilModels.Any())
{
var features = new MapFeature[stochasticSoilModels.Length];
for (var i = 0; i < stochasticSoilModels.Length; i++)
{
- StochasticSoilModel stochasticSoilModel = stochasticSoilModels[i];
+ MacroStabilityInwardsStochasticSoilModel stochasticSoilModel = stochasticSoilModels[i];
MapFeature feature = RingtoetsMapDataFeaturesFactory.CreateSingleLineMapFeature(GetWorldPoints(stochasticSoilModel));
feature.MetaData[RingtoetsCommonFormsResources.MetaData_Name] = stochasticSoilModel.Name;
@@ -127,7 +127,7 @@
return surfaceLine.Points.Select(p => new Point2D(p.X, p.Y));
}
- private static IEnumerable GetWorldPoints(StochasticSoilModel stochasticSoilModel)
+ private static IEnumerable GetWorldPoints(MacroStabilityInwardsStochasticSoilModel stochasticSoilModel)
{
return stochasticSoilModel.Geometry.Select(p => new Point2D(p));
}
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/MacroStabilityInwardsCalculationConfigurationHelper.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/MacroStabilityInwardsCalculationConfigurationHelper.cs (.../MacroStabilityInwardsCalculationConfigurationHelper.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/MacroStabilityInwardsCalculationConfigurationHelper.cs (.../MacroStabilityInwardsCalculationConfigurationHelper.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -56,7 +56,7 @@
/// - is null
/// - is null
///
- public static IEnumerable GenerateCalculationItemsStructure(IEnumerable surfaceLines, IEnumerable soilModels, GeneralMacroStabilityInwardsInput generalInput)
+ public static IEnumerable GenerateCalculationItemsStructure(IEnumerable surfaceLines, IEnumerable soilModels, GeneralMacroStabilityInwardsInput generalInput)
{
if (surfaceLines == null)
{
@@ -92,30 +92,30 @@
///
/// Gets the stochastic soil models matching the input of a calculation.
///
- /// The surface line used to match a .
+ /// The surface line used to match a .
/// The available stochastic soil models.
/// The (sub)set of stochastic soil models from
- /// or empty if no matching instances can be found
+ /// or empty if no matching instances can be found
/// or when there is not enough information to associate soil profiles to the calculation.
- public static IEnumerable GetStochasticSoilModelsForSurfaceLine(MacroStabilityInwardsSurfaceLine surfaceLine, IEnumerable availableSoilModels)
+ public static IEnumerable GetStochasticSoilModelsForSurfaceLine(MacroStabilityInwardsSurfaceLine surfaceLine, IEnumerable availableSoilModels)
{
if (surfaceLine == null)
{
- return Enumerable.Empty();
+ return Enumerable.Empty();
}
return availableSoilModels.Where(stochasticSoilModel => stochasticSoilModel.StochasticSoilProfiles.Any() &&
stochasticSoilModel.IntersectsWithSurfaceLineGeometry(surfaceLine))
.ToList();
}
- private static CalculationGroup CreateCalculationGroup(MacroStabilityInwardsSurfaceLine surfaceLine, IEnumerable soilModels, GeneralMacroStabilityInwardsInput generalInput)
+ private static CalculationGroup CreateCalculationGroup(MacroStabilityInwardsSurfaceLine surfaceLine, IEnumerable soilModels, GeneralMacroStabilityInwardsInput generalInput)
{
var calculationGroup = new CalculationGroup(surfaceLine.Name, true);
- IEnumerable stochasticSoilModels = GetStochasticSoilModelsForSurfaceLine(surfaceLine, soilModels);
- foreach (StochasticSoilModel stochasticSoilModel in stochasticSoilModels)
+ IEnumerable stochasticSoilModels = GetStochasticSoilModelsForSurfaceLine(surfaceLine, soilModels);
+ foreach (MacroStabilityInwardsStochasticSoilModel stochasticSoilModel in stochasticSoilModels)
{
- foreach (StochasticSoilProfile soilProfile in stochasticSoilModel.StochasticSoilProfiles)
+ foreach (MacroStabilityInwardsStochasticSoilProfile soilProfile in stochasticSoilModel.StochasticSoilProfiles)
{
calculationGroup.Children.Add(CreateMacroStabilityInwardsCalculation(surfaceLine, stochasticSoilModel, soilProfile, calculationGroup.Children, generalInput));
}
@@ -124,7 +124,7 @@
return calculationGroup;
}
- private static ICalculationBase CreateMacroStabilityInwardsCalculation(MacroStabilityInwardsSurfaceLine surfaceLine, StochasticSoilModel stochasticSoilModel, StochasticSoilProfile stochasticSoilProfile, IEnumerable calculations, GeneralMacroStabilityInwardsInput generalInput)
+ private static ICalculationBase CreateMacroStabilityInwardsCalculation(MacroStabilityInwardsSurfaceLine surfaceLine, MacroStabilityInwardsStochasticSoilModel stochasticSoilModel, MacroStabilityInwardsStochasticSoilProfile stochasticSoilProfile, IEnumerable calculations, GeneralMacroStabilityInwardsInput generalInput)
{
string nameBase = $"{surfaceLine.Name} {stochasticSoilProfile}";
string name = NamingHelper.GetUniqueName(calculations, nameBase, c => c.Name);
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PresentationObjects/MacroStabilityInwardsCalculationGroupContext.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PresentationObjects/MacroStabilityInwardsCalculationGroupContext.cs (.../MacroStabilityInwardsCalculationGroupContext.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PresentationObjects/MacroStabilityInwardsCalculationGroupContext.cs (.../MacroStabilityInwardsCalculationGroupContext.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -50,7 +50,7 @@
public MacroStabilityInwardsCalculationGroupContext(CalculationGroup calculationGroup,
CalculationGroup parent,
IEnumerable surfaceLines,
- IEnumerable stochasticSoilModels,
+ IEnumerable stochasticSoilModels,
MacroStabilityInwardsFailureMechanism macroStabilityInwardsFailureMechanism,
IAssessmentSection assessmentSection)
: base(calculationGroup, surfaceLines, stochasticSoilModels, macroStabilityInwardsFailureMechanism, assessmentSection)
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PresentationObjects/MacroStabilityInwardsCalculationScenarioContext.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PresentationObjects/MacroStabilityInwardsCalculationScenarioContext.cs (.../MacroStabilityInwardsCalculationScenarioContext.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PresentationObjects/MacroStabilityInwardsCalculationScenarioContext.cs (.../MacroStabilityInwardsCalculationScenarioContext.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -50,7 +50,7 @@
public MacroStabilityInwardsCalculationScenarioContext(MacroStabilityInwardsCalculationScenario calculation,
CalculationGroup parent,
IEnumerable surfaceLines,
- IEnumerable stochasticSoilModels,
+ IEnumerable stochasticSoilModels,
MacroStabilityInwardsFailureMechanism macroStabilityInwardsFailureMechanism,
IAssessmentSection assessmentSection)
: base(calculation, surfaceLines, stochasticSoilModels, macroStabilityInwardsFailureMechanism, assessmentSection)
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PresentationObjects/MacroStabilityInwardsContext.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PresentationObjects/MacroStabilityInwardsContext.cs (.../MacroStabilityInwardsContext.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PresentationObjects/MacroStabilityInwardsContext.cs (.../MacroStabilityInwardsContext.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -50,7 +50,7 @@
protected MacroStabilityInwardsContext(
T wrappedData,
IEnumerable surfaceLines,
- IEnumerable stochasticSoilModels,
+ IEnumerable stochasticSoilModels,
MacroStabilityInwardsFailureMechanism macroStabilityInwardsFailureMechanism,
IAssessmentSection assessmentSection) : base(wrappedData)
{
@@ -69,10 +69,10 @@
public IEnumerable AvailableMacroStabilityInwardsSurfaceLines { get; private set; }
///
- /// Gets the available stochastic soil models in order for the user to select a and
+ /// Gets the available stochastic soil models in order for the user to select a and
/// to set and .
///
- public IEnumerable AvailableStochasticSoilModels { get; private set; }
+ public IEnumerable AvailableStochasticSoilModels { get; private set; }
///
/// Gets the available hydraulic boundary locations in order for the user to select one to
@@ -109,7 +109,7 @@
/// The assessment section.
/// Thrown when any input parameter is null.
private static void AssertInputsAreNotNull(IEnumerable surfaceLines,
- IEnumerable stochasticSoilModels,
+ IEnumerable stochasticSoilModels,
MacroStabilityInwardsFailureMechanism macroStabilityInwardsFailureMechanism,
IAssessmentSection assessmentSection)
{
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PresentationObjects/MacroStabilityInwardsInputContext.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PresentationObjects/MacroStabilityInwardsInputContext.cs (.../MacroStabilityInwardsInputContext.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PresentationObjects/MacroStabilityInwardsInputContext.cs (.../MacroStabilityInwardsInputContext.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -48,7 +48,7 @@
public MacroStabilityInwardsInputContext(MacroStabilityInwardsInput macroStabilityInwardsInput,
MacroStabilityInwardsCalculationScenario calculation,
IEnumerable surfaceLines,
- IEnumerable stochasticSoilModels,
+ IEnumerable stochasticSoilModels,
MacroStabilityInwardsFailureMechanism macroStabilityInwardsFailureMechanism,
IAssessmentSection assessmentSection)
: base(macroStabilityInwardsInput, surfaceLines, stochasticSoilModels, macroStabilityInwardsFailureMechanism, assessmentSection)
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PresentationObjects/StochasticSoilModelCollectionContext.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PresentationObjects/StochasticSoilModelCollectionContext.cs (.../StochasticSoilModelCollectionContext.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PresentationObjects/StochasticSoilModelCollectionContext.cs (.../StochasticSoilModelCollectionContext.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -30,7 +30,7 @@
///
/// The presentation object for .
///
- public class StochasticSoilModelCollectionContext : ObservableWrappedObjectContextBase
+ public class StochasticSoilModelCollectionContext : ObservableWrappedObjectContextBase
{
///
/// Creates a new instance of .
@@ -39,7 +39,7 @@
/// The failure mechanism.
/// The assessment section.
/// Thrown when any input argument is null.
- public StochasticSoilModelCollectionContext(StochasticSoilModelCollection wrappedStochasticSoilModels,
+ public StochasticSoilModelCollectionContext(MacroStabilityInwardsStochasticSoilModelCollection wrappedStochasticSoilModels,
MacroStabilityInwardsFailureMechanism failureMechanism,
IAssessmentSection assessmentSection)
: base(wrappedStochasticSoilModels)
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsInputContextProperties.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsInputContextProperties.cs (.../MacroStabilityInwardsInputContextProperties.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsInputContextProperties.cs (.../MacroStabilityInwardsInputContextProperties.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -104,7 +104,7 @@
///
/// Gets the available stochastic soil models on .
///
- public IEnumerable GetAvailableStochasticSoilModels()
+ public IEnumerable GetAvailableStochasticSoilModels()
{
if (data.WrappedData.SurfaceLine == null)
{
@@ -116,9 +116,9 @@
///
/// Gets the available stochastic soil profiles on .
///
- public IEnumerable GetAvailableStochasticSoilProfiles()
+ public IEnumerable GetAvailableStochasticSoilProfiles()
{
- return data.WrappedData.StochasticSoilModel != null ? data.WrappedData.StochasticSoilModel.StochasticSoilProfiles : new List();
+ return data.WrappedData.StochasticSoilModel != null ? data.WrappedData.StochasticSoilModel.StochasticSoilProfiles : new List();
}
[DynamicReadOnlyValidationMethod]
@@ -274,7 +274,7 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization), schematizationCategoryIndex, totalCategoryCount)]
[ResourcesDisplayName(typeof(Resources), nameof(Resources.MacroStabilityInwardsInput_StochasticSoilModel_DisplayName))]
[ResourcesDescription(typeof(Resources), nameof(Resources.MacroStabilityInwardsInput_StochasticSoilModel_Description))]
- public StochasticSoilModel StochasticSoilModel
+ public MacroStabilityInwardsStochasticSoilModel StochasticSoilModel
{
get
{
@@ -298,7 +298,7 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization), schematizationCategoryIndex, totalCategoryCount)]
[ResourcesDisplayName(typeof(Resources), nameof(Resources.MacroStabilityInwardsInput_StochasticSoilProfile_DisplayName))]
[ResourcesDescription(typeof(Resources), nameof(Resources.MacroStabilityInwardsInput_StochasticSoilProfile_Description))]
- public StochasticSoilProfile StochasticSoilProfile
+ public MacroStabilityInwardsStochasticSoilProfile StochasticSoilProfile
{
get
{
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/StochasticSoilModelCollectionProperties.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/StochasticSoilModelCollectionProperties.cs (.../StochasticSoilModelCollectionProperties.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/StochasticSoilModelCollectionProperties.cs (.../StochasticSoilModelCollectionProperties.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -29,17 +29,17 @@
namespace Ringtoets.MacroStabilityInwards.Forms.PropertyClasses
{
///
- /// ViewModel of for properties panel.
+ /// ViewModel of for properties panel.
///
- public class StochasticSoilModelCollectionProperties : ObjectProperties
+ public class StochasticSoilModelCollectionProperties : ObjectProperties
{
///
/// Creates a new instance of .
///
/// The collection for which the properties are shown.
/// Thrown when
/// is null.
- public StochasticSoilModelCollectionProperties(StochasticSoilModelCollection collection)
+ public StochasticSoilModelCollectionProperties(MacroStabilityInwardsStochasticSoilModelCollection collection)
{
if (collection == null)
{
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/StochasticSoilModelProperties.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/StochasticSoilModelProperties.cs (.../StochasticSoilModelProperties.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/StochasticSoilModelProperties.cs (.../StochasticSoilModelProperties.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -33,9 +33,9 @@
namespace Ringtoets.MacroStabilityInwards.Forms.PropertyClasses
{
///
- /// ViewModel of for properties panel.
+ /// ViewModel of for properties panel.
///
- public class StochasticSoilModelProperties : ObjectProperties
+ public class StochasticSoilModelProperties : ObjectProperties
{
[PropertyOrder(1)]
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))]
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/StochasticSoilProfileProperties.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/StochasticSoilProfileProperties.cs (.../StochasticSoilProfileProperties.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/StochasticSoilProfileProperties.cs (.../StochasticSoilProfileProperties.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -35,11 +35,11 @@
namespace Ringtoets.MacroStabilityInwards.Forms.PropertyClasses
{
///
- /// ViewModel of for properties panel.
+ /// ViewModel of for properties panel.
///
[ResourcesDisplayName(typeof(Resources), nameof(RingtoetsCommonFormsResources.StochasticSoilProfileProperties_DisplayName))]
[TypeConverter(typeof(ExpandableObjectConverter))]
- public class StochasticSoilProfileProperties : ObjectProperties
+ public class StochasticSoilProfileProperties : ObjectProperties
{
[PropertyOrder(1)]
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))]
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/UITypeEditors/MacroStabilityInwardsInputContextStochasticSoilModelSelectionEditor.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/UITypeEditors/MacroStabilityInwardsInputContextStochasticSoilModelSelectionEditor.cs (.../MacroStabilityInwardsInputContextStochasticSoilModelSelectionEditor.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/UITypeEditors/MacroStabilityInwardsInputContextStochasticSoilModelSelectionEditor.cs (.../MacroStabilityInwardsInputContextStochasticSoilModelSelectionEditor.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -29,24 +29,24 @@
{
///
/// This class defines a drop down list edit-control from which the user can select a
- /// from a collection.
+ /// from a collection.
///
- public class MacroStabilityInwardsInputContextStochasticSoilModelSelectionEditor : SelectionEditor
+ public class MacroStabilityInwardsInputContextStochasticSoilModelSelectionEditor : SelectionEditor
{
///
/// Creates a new instance of .
///
public MacroStabilityInwardsInputContextStochasticSoilModelSelectionEditor()
{
- DisplayMember = nameof(StochasticSoilModel.Name);
+ DisplayMember = nameof(MacroStabilityInwardsStochasticSoilModel.Name);
}
- protected override IEnumerable GetAvailableOptions(ITypeDescriptorContext context)
+ protected override IEnumerable GetAvailableOptions(ITypeDescriptorContext context)
{
return GetPropertiesObject(context).GetAvailableStochasticSoilModels();
}
- protected override StochasticSoilModel GetCurrentOption(ITypeDescriptorContext context)
+ protected override MacroStabilityInwardsStochasticSoilModel GetCurrentOption(ITypeDescriptorContext context)
{
return GetPropertiesObject(context).StochasticSoilModel;
}
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/UITypeEditors/MacroStabilityInwardsInputContextStochasticSoilProfileSelectionEditor.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/UITypeEditors/MacroStabilityInwardsInputContextStochasticSoilProfileSelectionEditor.cs (.../MacroStabilityInwardsInputContextStochasticSoilProfileSelectionEditor.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/UITypeEditors/MacroStabilityInwardsInputContextStochasticSoilProfileSelectionEditor.cs (.../MacroStabilityInwardsInputContextStochasticSoilProfileSelectionEditor.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -30,9 +30,9 @@
{
///
/// This class defines a drop down list edit-control from which the user can select a
- /// from a collection.
+ /// from a collection.
///
- public class MacroStabilityInwardsInputContextStochasticSoilProfileSelectionEditor : SelectionEditor
+ public class MacroStabilityInwardsInputContextStochasticSoilProfileSelectionEditor : SelectionEditor
{
///
/// Creates a new instance of .
@@ -42,12 +42,12 @@
DisplayMember = nameof(MacroStabilityInwardsSoilProfile1D.Name);
}
- protected override IEnumerable GetAvailableOptions(ITypeDescriptorContext context)
+ protected override IEnumerable GetAvailableOptions(ITypeDescriptorContext context)
{
return GetPropertiesObject(context).GetAvailableStochasticSoilProfiles();
}
- protected override StochasticSoilProfile GetCurrentOption(ITypeDescriptorContext context)
+ protected override MacroStabilityInwardsStochasticSoilProfile GetCurrentOption(ITypeDescriptorContext context)
{
return GetPropertiesObject(context).StochasticSoilProfile;
}
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsCalculationRow.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsCalculationRow.cs (.../MacroStabilityInwardsCalculationRow.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsCalculationRow.cs (.../MacroStabilityInwardsCalculationRow.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -86,15 +86,15 @@
///
/// Gets or sets the stochastic soil model of the .
///
- public DataGridViewComboBoxItemWrapper StochasticSoilModel
+ public DataGridViewComboBoxItemWrapper StochasticSoilModel
{
get
{
- return new DataGridViewComboBoxItemWrapper(MacroStabilityInwardsCalculation.InputParameters.StochasticSoilModel);
+ return new DataGridViewComboBoxItemWrapper(MacroStabilityInwardsCalculation.InputParameters.StochasticSoilModel);
}
set
{
- StochasticSoilModel valueToSet = value?.WrappedObject;
+ MacroStabilityInwardsStochasticSoilModel valueToSet = value?.WrappedObject;
if (!ReferenceEquals(MacroStabilityInwardsCalculation.InputParameters.StochasticSoilModel, valueToSet))
{
PropertyChangeHelper.ChangePropertyAndNotify(() => MacroStabilityInwardsCalculation.InputParameters.StochasticSoilModel = valueToSet, propertyChangeHandler);
@@ -105,15 +105,15 @@
///
/// Gets or sets the stochastic soil profile of the .
///
- public DataGridViewComboBoxItemWrapper StochasticSoilProfile
+ public DataGridViewComboBoxItemWrapper StochasticSoilProfile
{
get
{
- return new DataGridViewComboBoxItemWrapper(MacroStabilityInwardsCalculation.InputParameters.StochasticSoilProfile);
+ return new DataGridViewComboBoxItemWrapper(MacroStabilityInwardsCalculation.InputParameters.StochasticSoilProfile);
}
set
{
- StochasticSoilProfile valueToSet = value?.WrappedObject;
+ MacroStabilityInwardsStochasticSoilProfile valueToSet = value?.WrappedObject;
if (!ReferenceEquals(MacroStabilityInwardsCalculation.InputParameters.StochasticSoilProfile, valueToSet))
{
PropertyChangeHelper.ChangePropertyAndNotify(() => MacroStabilityInwardsCalculation.InputParameters.StochasticSoilProfile = valueToSet, propertyChangeHandler);
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsCalculationsView.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsCalculationsView.cs (.../MacroStabilityInwardsCalculationsView.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsCalculationsView.cs (.../MacroStabilityInwardsCalculationsView.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -59,7 +59,7 @@
private readonly Observer failureMechanismObserver;
private readonly RecursiveObserver surfaceLineObserver;
private readonly Observer stochasticSoilModelsObserver;
- private readonly RecursiveObserver stochasticSoilProfileObserver;
+ private readonly RecursiveObserver stochasticSoilProfileObserver;
private IAssessmentSection assessmentSection;
private CalculationGroup calculationGroup;
private MacroStabilityInwardsFailureMechanism macroStabilityInwardsFailureMechanism;
@@ -85,7 +85,7 @@
surfaceLineObserver = new RecursiveObserver(UpdateDataGridViewDataSource, rpslc => rpslc);
stochasticSoilModelsObserver = new Observer(OnStochasticSoilModelsUpdate);
- stochasticSoilProfileObserver = new RecursiveObserver(dataGridViewControl.RefreshDataGridView, ssmc => ssmc.SelectMany(ssm => ssm.StochasticSoilProfiles));
+ stochasticSoilProfileObserver = new RecursiveObserver(dataGridViewControl.RefreshDataGridView, ssmc => ssmc.SelectMany(ssm => ssm.StochasticSoilProfiles));
}
///
@@ -205,19 +205,19 @@
nameof(MacroStabilityInwardsCalculationRow.Name),
Resources.MacroStabilityInwardsCalculation_Name_DisplayName);
- dataGridViewControl.AddComboBoxColumn>(
+ dataGridViewControl.AddComboBoxColumn>(
nameof(MacroStabilityInwardsCalculationRow.StochasticSoilModel),
Resources.MacroStabilityInwardsInput_StochasticSoilModel_DisplayName,
null,
- nameof(DataGridViewComboBoxItemWrapper.This),
- nameof(DataGridViewComboBoxItemWrapper.DisplayName));
+ nameof(DataGridViewComboBoxItemWrapper.This),
+ nameof(DataGridViewComboBoxItemWrapper.DisplayName));
- dataGridViewControl.AddComboBoxColumn>(
+ dataGridViewControl.AddComboBoxColumn>(
nameof(MacroStabilityInwardsCalculationRow.StochasticSoilProfile),
Resources.MacroStabilityInwardsInput_StochasticSoilProfile_DisplayName,
null,
- nameof(DataGridViewComboBoxItemWrapper.This),
- nameof(DataGridViewComboBoxItemWrapper.DisplayName));
+ nameof(DataGridViewComboBoxItemWrapper.This),
+ nameof(DataGridViewComboBoxItemWrapper.DisplayName));
dataGridViewControl.AddTextBoxColumn(
nameof(MacroStabilityInwardsCalculationRow.StochasticSoilProfileProbability),
@@ -320,49 +320,49 @@
UpdateSelectableHydraulicBoundaryLocationsColumn();
}
- private static IEnumerable> GetPrefillStochasticSoilModelsDataSource(IEnumerable stochasticSoilModels)
+ private static IEnumerable> GetPrefillStochasticSoilModelsDataSource(IEnumerable stochasticSoilModels)
{
- yield return new DataGridViewComboBoxItemWrapper(null);
+ yield return new DataGridViewComboBoxItemWrapper(null);
- foreach (StochasticSoilModel stochasticSoilModel in stochasticSoilModels)
+ foreach (MacroStabilityInwardsStochasticSoilModel stochasticSoilModel in stochasticSoilModels)
{
- yield return new DataGridViewComboBoxItemWrapper(stochasticSoilModel);
+ yield return new DataGridViewComboBoxItemWrapper(stochasticSoilModel);
}
}
- private static IEnumerable> GetStochasticSoilModelsDataSource(IEnumerable stochasticSoilModels)
+ private static IEnumerable> GetStochasticSoilModelsDataSource(IEnumerable stochasticSoilModels)
{
- StochasticSoilModel[] stochasticSoilModelsArray = stochasticSoilModels.ToArray();
+ MacroStabilityInwardsStochasticSoilModel[] stochasticSoilModelsArray = stochasticSoilModels.ToArray();
if (stochasticSoilModelsArray.Length != 1)
{
- yield return new DataGridViewComboBoxItemWrapper(null);
+ yield return new DataGridViewComboBoxItemWrapper(null);
}
- foreach (StochasticSoilModel stochasticSoilModel in stochasticSoilModelsArray)
+ foreach (MacroStabilityInwardsStochasticSoilModel stochasticSoilModel in stochasticSoilModelsArray)
{
- yield return new DataGridViewComboBoxItemWrapper(stochasticSoilModel);
+ yield return new DataGridViewComboBoxItemWrapper(stochasticSoilModel);
}
}
- private static IEnumerable> GetPrefillSoilProfilesDataSource(IEnumerable stochasticSoilProfiles)
+ private static IEnumerable> GetPrefillSoilProfilesDataSource(IEnumerable stochasticSoilProfiles)
{
- yield return new DataGridViewComboBoxItemWrapper(null);
+ yield return new DataGridViewComboBoxItemWrapper(null);
- foreach (StochasticSoilProfile stochasticSoilProfile in stochasticSoilProfiles)
+ foreach (MacroStabilityInwardsStochasticSoilProfile stochasticSoilProfile in stochasticSoilProfiles)
{
- yield return new DataGridViewComboBoxItemWrapper(stochasticSoilProfile);
+ yield return new DataGridViewComboBoxItemWrapper(stochasticSoilProfile);
}
}
- private static IEnumerable> GetSoilProfilesDataSource(IEnumerable stochasticSoilProfiles)
+ private static IEnumerable> GetSoilProfilesDataSource(IEnumerable stochasticSoilProfiles)
{
- StochasticSoilProfile[] stochasticSoilProfilesArray = stochasticSoilProfiles.ToArray();
+ MacroStabilityInwardsStochasticSoilProfile[] stochasticSoilProfilesArray = stochasticSoilProfiles.ToArray();
if (stochasticSoilProfilesArray.Length != 1)
{
- yield return new DataGridViewComboBoxItemWrapper(null);
+ yield return new DataGridViewComboBoxItemWrapper(null);
}
- foreach (StochasticSoilProfile stochasticSoilProfile in stochasticSoilProfilesArray)
+ foreach (MacroStabilityInwardsStochasticSoilProfile stochasticSoilProfile in stochasticSoilProfilesArray)
{
- yield return new DataGridViewComboBoxItemWrapper(stochasticSoilProfile);
+ yield return new DataGridViewComboBoxItemWrapper(stochasticSoilProfile);
}
}
@@ -439,17 +439,17 @@
private void FillAvailableSoilModelsList(DataGridViewRow dataGridViewRow)
{
var rowData = (MacroStabilityInwardsCalculationRow) dataGridViewRow.DataBoundItem;
- IEnumerable stochasticSoilModels = GetSoilModelsForCalculation(rowData.MacroStabilityInwardsCalculation);
+ IEnumerable stochasticSoilModels = GetSoilModelsForCalculation(rowData.MacroStabilityInwardsCalculation);
var cell = (DataGridViewComboBoxCell) dataGridViewRow.Cells[stochasticSoilModelColumnIndex];
SetItemsOnObjectCollection(cell.Items, GetStochasticSoilModelsDataSource(stochasticSoilModels).ToArray());
}
- private IEnumerable GetSoilModelsForCalculation(MacroStabilityInwardsCalculation macroStabilityInwardsCalculation)
+ private IEnumerable GetSoilModelsForCalculation(MacroStabilityInwardsCalculation macroStabilityInwardsCalculation)
{
if (macroStabilityInwardsFailureMechanism == null)
{
- return Enumerable.Empty();
+ return Enumerable.Empty();
}
return MacroStabilityInwardsCalculationConfigurationHelper.GetStochasticSoilModelsForSurfaceLine(
macroStabilityInwardsCalculation.InputParameters.SurfaceLine,
@@ -476,17 +476,17 @@
var rowData = (MacroStabilityInwardsCalculationRow) dataGridViewRow.DataBoundItem;
MacroStabilityInwardsInputService.SyncStochasticSoilProfileWithStochasticSoilModel(rowData.MacroStabilityInwardsCalculation.InputParameters);
- IEnumerable stochasticSoilProfiles = GetSoilProfilesForCalculation(rowData.MacroStabilityInwardsCalculation);
+ IEnumerable stochasticSoilProfiles = GetSoilProfilesForCalculation(rowData.MacroStabilityInwardsCalculation);
var cell = (DataGridViewComboBoxCell) dataGridViewRow.Cells[stochasticSoilProfileColumnIndex];
SetItemsOnObjectCollection(cell.Items, GetSoilProfilesDataSource(stochasticSoilProfiles).ToArray());
}
- private IEnumerable GetSoilProfilesForCalculation(MacroStabilityInwardsCalculation macroStabilityInwardsCalculation)
+ private IEnumerable GetSoilProfilesForCalculation(MacroStabilityInwardsCalculation macroStabilityInwardsCalculation)
{
if (macroStabilityInwardsCalculation.InputParameters.StochasticSoilModel == null)
{
- return Enumerable.Empty();
+ return Enumerable.Empty();
}
return macroStabilityInwardsCalculation.InputParameters.StochasticSoilModel.StochasticSoilProfiles;
}
@@ -508,12 +508,12 @@
// items.
using (new SuspendDataGridViewColumnResizes(stochasticSoilModelColumn))
{
- StochasticSoilModelCollection stochasticSoilModels = macroStabilityInwardsFailureMechanism.StochasticSoilModels;
+ MacroStabilityInwardsStochasticSoilModelCollection stochasticSoilModels = macroStabilityInwardsFailureMechanism.StochasticSoilModels;
SetItemsOnObjectCollection(stochasticSoilModelColumn.Items, GetPrefillStochasticSoilModelsDataSource(stochasticSoilModels).ToArray());
}
using (new SuspendDataGridViewColumnResizes(stochasticSoilProfileColumn))
{
- StochasticSoilProfile[] soilProfiles = GetStochasticSoilProfilesFromStochasticSoilModels();
+ MacroStabilityInwardsStochasticSoilProfile[] soilProfiles = GetStochasticSoilProfilesFromStochasticSoilModels();
SetItemsOnObjectCollection(stochasticSoilProfileColumn.Items, GetPrefillSoilProfilesDataSource(soilProfiles).ToArray());
}
using (new SuspendDataGridViewColumnResizes(selectableHydraulicBoundaryLocationColumn))
@@ -545,7 +545,7 @@
return selectableHydraulicBoundaryLocations;
}
- private StochasticSoilProfile[] GetStochasticSoilProfilesFromStochasticSoilModels()
+ private MacroStabilityInwardsStochasticSoilProfile[] GetStochasticSoilProfilesFromStochasticSoilModels()
{
return macroStabilityInwardsFailureMechanism?.StochasticSoilModels
.SelectMany(ssm => ssm.StochasticSoilProfiles)
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsFailureMechanismView.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsFailureMechanismView.cs (.../MacroStabilityInwardsFailureMechanismView.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsFailureMechanismView.cs (.../MacroStabilityInwardsFailureMechanismView.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -302,7 +302,7 @@
private void SetStochasticSoilModelsMapData()
{
- StochasticSoilModelCollection stochasticSoilModels = data.WrappedData.StochasticSoilModels;
+ MacroStabilityInwardsStochasticSoilModelCollection stochasticSoilModels = data.WrappedData.StochasticSoilModels;
stochasticSoilModelsMapData.Features = MacroStabilityInwardsMapDataFeaturesFactory.CreateStochasticSoilModelFeatures(stochasticSoilModels.ToArray());
}
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Builders/SoilDatabaseQueryBuilder.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Builders/SoilDatabaseQueryBuilder.cs (.../SoilDatabaseQueryBuilder.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Builders/SoilDatabaseQueryBuilder.cs (.../SoilDatabaseQueryBuilder.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -61,10 +61,10 @@
}
///
- /// Returns the query to get the amount of
+ /// Returns the query to get the amount of
/// that can be read from the database.
///
- /// The query to get the amount of
+ /// The query to get the amount of
/// from the database.
public static string GetStochasticSoilModelOfMechanismCountQuery()
{
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Configurations/MacroStabilityInwardsCalculationConfigurationImporter.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Configurations/MacroStabilityInwardsCalculationConfigurationImporter.cs (.../MacroStabilityInwardsCalculationConfigurationImporter.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Configurations/MacroStabilityInwardsCalculationConfigurationImporter.cs (.../MacroStabilityInwardsCalculationConfigurationImporter.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -169,9 +169,9 @@
/// The calculation to configure.
/// false when
///
- /// - the has a set
+ ///
- the has a set
/// which is not available in the failure mechanism.
- /// - The does not intersect with the
+ ///
- The does not intersect with the
/// when this is set.
///
/// true otherwise.
@@ -180,7 +180,7 @@
{
if (calculationConfiguration.StochasticSoilModelName != null)
{
- StochasticSoilModel soilModel = failureMechanism.StochasticSoilModels
+ MacroStabilityInwardsStochasticSoilModel soilModel = failureMechanism.StochasticSoilModels
.FirstOrDefault(ssm => ssm.Name == calculationConfiguration.StochasticSoilModelName);
if (soilModel == null)
@@ -215,8 +215,8 @@
/// The calculation to configure.
/// false when the has:
///
- /// - a set but no is specified;
- /// - a set which is not available in the .
+ /// - a set but no is specified;
+ /// - a set which is not available in the .
///
/// true otherwise.
private bool TrySetStochasticSoilProfile(MacroStabilityInwardsCalculationConfiguration calculationConfiguration,
@@ -233,7 +233,7 @@
return false;
}
- StochasticSoilProfile soilProfile = macroStabilityInwardsCalculation.InputParameters
+ MacroStabilityInwardsStochasticSoilProfile soilProfile = macroStabilityInwardsCalculation.InputParameters
.StochasticSoilModel
.StochasticSoilProfiles
.FirstOrDefault(ssp => ssp.SoilProfile.Name == calculationConfiguration.StochasticSoilProfileName);
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Exceptions/StochasticSoilProfileReadException.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Exceptions/StochasticSoilProfileReadException.cs (.../StochasticSoilProfileReadException.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Exceptions/StochasticSoilProfileReadException.cs (.../StochasticSoilProfileReadException.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -26,7 +26,7 @@
namespace Ringtoets.MacroStabilityInwards.IO.Exceptions
{
///
- /// The exception that is thrown when failed to read a from the DSoil-database.
+ /// The exception that is thrown when failed to read a from the DSoil-database.
///
[Serializable]
public class StochasticSoilProfileReadException : Exception
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Importers/IStochasticSoilModelUpdateModelStrategy.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Importers/IStochasticSoilModelUpdateModelStrategy.cs (.../IStochasticSoilModelUpdateModelStrategy.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Importers/IStochasticSoilModelUpdateModelStrategy.cs (.../IStochasticSoilModelUpdateModelStrategy.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -43,6 +43,6 @@
/// is set with the more detailed
/// exception.
/// A of updated instances.
- IEnumerable UpdateModelWithImportedData(IEnumerable stochasticSoilModels, string sourceFilePath);
+ IEnumerable UpdateModelWithImportedData(IEnumerable stochasticSoilModels, string sourceFilePath);
}
}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Importers/StochasticSoilModelImporter.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Importers/StochasticSoilModelImporter.cs (.../StochasticSoilModelImporter.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Importers/StochasticSoilModelImporter.cs (.../StochasticSoilModelImporter.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -41,7 +41,7 @@
///
/// Imports .soil files (SqlLite database files) created with the D-Soil Model application.
///
- public class StochasticSoilModelImporter : FileImporterBase
+ public class StochasticSoilModelImporter : FileImporterBase
{
private readonly IImporterMessageProvider messageProvider;
private readonly IStochasticSoilModelUpdateModelStrategy modelUpdateStrategy;
@@ -56,7 +56,7 @@
/// The to use
/// when updating the .
/// Thrown when any of the input parameters is null.
- public StochasticSoilModelImporter(StochasticSoilModelCollection importTarget, string filePath,
+ public StochasticSoilModelImporter(MacroStabilityInwardsStochasticSoilModelCollection importTarget, string filePath,
IImporterMessageProvider messageProvider, IStochasticSoilModelUpdateModelStrategy modelUpdateStrategy)
: base(filePath, importTarget)
{
@@ -89,7 +89,7 @@
return false;
}
- ReadResult importStochasticSoilModelResult = ReadStochasticSoilModels();
+ ReadResult importStochasticSoilModelResult = ReadStochasticSoilModels();
if (importStochasticSoilModelResult.CriticalErrorOccurred || Canceled)
{
return false;
@@ -103,7 +103,7 @@
return false;
}
- StochasticSoilModel[] validStochasticSoilModels = GetValidStochasticSoilModels(importStochasticSoilModelResult).ToArray();
+ MacroStabilityInwardsStochasticSoilModel[] validStochasticSoilModels = GetValidStochasticSoilModels(importStochasticSoilModelResult).ToArray();
if (Canceled)
{
return false;
@@ -133,13 +133,13 @@
}
///
- /// Validate the definition of a .
+ /// Validate the definition of a .
///
- /// The to validate.
+ /// The to validate.
/// false when the stochastic soil model does not contain any stochastic soil profiles
/// or when a stochastic soil profile does not have a definition for a soil profile; true
/// otherwise.
- private bool ValidateStochasticSoilModel(StochasticSoilModel stochasticSoilModel)
+ private bool ValidateStochasticSoilModel(MacroStabilityInwardsStochasticSoilModel stochasticSoilModel)
{
if (!stochasticSoilModel.StochasticSoilProfiles.Any())
{
@@ -161,11 +161,11 @@
return true;
}
- private IEnumerable GetValidStochasticSoilModels(ReadResult importStochasticSoilModelResult)
+ private IEnumerable GetValidStochasticSoilModels(ReadResult importStochasticSoilModelResult)
{
var currentStep = 1;
- StochasticSoilModel[] importedModels = importStochasticSoilModelResult.Items.ToArray();
- foreach (StochasticSoilModel importedModel in importedModels)
+ MacroStabilityInwardsStochasticSoilModel[] importedModels = importStochasticSoilModelResult.Items.ToArray();
+ foreach (MacroStabilityInwardsStochasticSoilModel importedModel in importedModels)
{
NotifyProgress(RingtoetsCommonIOResources.Importer_ProgressText_Validating_imported_data, currentStep, importedModels.Length);
if (Canceled)
@@ -181,19 +181,19 @@
}
}
- private static bool IsSumOfAllProbabilitiesEqualToOne(StochasticSoilModel stochasticSoilModel)
+ private static bool IsSumOfAllProbabilitiesEqualToOne(MacroStabilityInwardsStochasticSoilModel stochasticSoilModel)
{
double sumOfAllScenarioProbabilities = stochasticSoilModel.StochasticSoilProfiles
.Where(s => s.SoilProfile != null)
.Sum(s => s.Probability);
return Math.Abs(sumOfAllScenarioProbabilities - 1.0) < 1e-6;
}
- private void AddSoilProfilesToStochasticSoilModels(ICollection soilProfiles, ICollection stochasticSoilModels)
+ private void AddSoilProfilesToStochasticSoilModels(ICollection soilProfiles, ICollection stochasticSoilModels)
{
- foreach (StochasticSoilModel stochasticSoilModel in stochasticSoilModels)
+ foreach (MacroStabilityInwardsStochasticSoilModel stochasticSoilModel in stochasticSoilModels)
{
- foreach (StochasticSoilProfile stochasticSoilProfile in stochasticSoilModel.StochasticSoilProfiles)
+ foreach (MacroStabilityInwardsStochasticSoilProfile stochasticSoilProfile in stochasticSoilModel.StochasticSoilProfiles)
{
MacroStabilityInwardsSoilProfile1D soilProfile = soilProfiles.FirstOrDefault(s => s.SoilProfileType == stochasticSoilProfile.SoilProfileType && s.MacroStabilityInwardsSoilProfileId == stochasticSoilProfile.SoilProfileId);
if (soilProfile != null)
@@ -204,15 +204,15 @@
}
}
- private void MergeStochasticSoilProfiles(ICollection stochasticSoilModels)
+ private void MergeStochasticSoilProfiles(ICollection stochasticSoilModels)
{
- foreach (StochasticSoilModel stochasticSoilModel in stochasticSoilModels)
+ foreach (MacroStabilityInwardsStochasticSoilModel stochasticSoilModel in stochasticSoilModels)
{
- StochasticSoilProfile[] profiles = stochasticSoilModel.StochasticSoilProfiles.OrderBy(sp => sp.SoilProfileId).ToArray();
+ MacroStabilityInwardsStochasticSoilProfile[] profiles = stochasticSoilModel.StochasticSoilProfiles.OrderBy(sp => sp.SoilProfileId).ToArray();
for (var i = 1; i < profiles.Length; i++)
{
- StochasticSoilProfile previousProfile = profiles[i - 1];
- StochasticSoilProfile currentProfile = profiles[i];
+ MacroStabilityInwardsStochasticSoilProfile previousProfile = profiles[i - 1];
+ MacroStabilityInwardsStochasticSoilProfile currentProfile = profiles[i];
if (currentProfile.SoilProfileId == previousProfile.SoilProfileId &&
currentProfile.SoilProfileType == previousProfile.SoilProfileType)
{
@@ -227,7 +227,7 @@
}
}
- private void CheckIfAllProfilesAreUsed(ICollection soilProfiles, ICollection stochasticSoilModels)
+ private void CheckIfAllProfilesAreUsed(ICollection soilProfiles, ICollection stochasticSoilModels)
{
NotifyProgress(Resources.StochasticSoilModelImporter_CheckIfAllProfilesAreUsed_Start_checking_soil_profiles, 1, 1);
foreach (MacroStabilityInwardsSoilProfile1D soilProfile in soilProfiles.Where(soilProfile => !SoilProfileIsUsed(soilProfile, stochasticSoilModels)))
@@ -236,7 +236,7 @@
}
}
- private static bool SoilProfileIsUsed(MacroStabilityInwardsSoilProfile1D soilProfile, ICollection stochasticSoilModels)
+ private static bool SoilProfileIsUsed(MacroStabilityInwardsSoilProfile1D soilProfile, ICollection stochasticSoilModels)
{
return stochasticSoilModels.Any(
stochasticSoilModel => stochasticSoilModel
@@ -253,7 +253,7 @@
#region read stochastic soil models
- private ReadResult ReadStochasticSoilModels()
+ private ReadResult ReadStochasticSoilModels()
{
NotifyProgress(Resources.StochasticSoilModelImporter_Reading_database, 1, 1);
try
@@ -267,20 +267,20 @@
{
HandleException(e);
}
- return new ReadResult(true);
+ return new ReadResult(true);
}
- private ReadResult GetStochasticSoilModelReadResult(StochasticSoilModelReader stochasticSoilModelReader)
+ private ReadResult GetStochasticSoilModelReadResult(StochasticSoilModelReader stochasticSoilModelReader)
{
int totalNumberOfSteps = stochasticSoilModelReader.MacroStabilityInwardsStochasticSoilModelCount;
var currentStep = 1;
- var soilModels = new Collection();
+ var soilModels = new Collection();
while (stochasticSoilModelReader.HasNext)
{
if (Canceled)
{
- return new ReadResult(false);
+ return new ReadResult(false);
}
try
{
@@ -293,7 +293,7 @@
Log.Error(message);
}
}
- return new ReadResult(false)
+ return new ReadResult(false)
{
Items = soilModels
};
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Ringtoets.MacroStabilityInwards.IO.csproj
===================================================================
diff -u -r00bca55b16694cd9d828d5a0052016b442b78b6b -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Ringtoets.MacroStabilityInwards.IO.csproj (.../Ringtoets.MacroStabilityInwards.IO.csproj) (revision 00bca55b16694cd9d828d5a0052016b442b78b6b)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Ringtoets.MacroStabilityInwards.IO.csproj (.../Ringtoets.MacroStabilityInwards.IO.csproj) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -159,7 +159,9 @@
Designer
-
+
+
+
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfile/StochasticSoilModelReader.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfile/StochasticSoilModelReader.cs (.../StochasticSoilModelReader.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfile/StochasticSoilModelReader.cs (.../StochasticSoilModelReader.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -35,7 +35,7 @@
namespace Ringtoets.MacroStabilityInwards.IO.SoilProfile
{
///
- /// This class reads a DSoil database file and reads from this database.
+ /// This class reads a DSoil database file and reads from this database.
///
public class StochasticSoilModelReader : SqLiteDatabaseReaderBase
{
@@ -69,18 +69,18 @@
public bool HasNext { get; private set; }
///
- /// Gets the amount of that can be read from the database.
+ /// Gets the amount of that can be read from the database.
///
public int MacroStabilityInwardsStochasticSoilModelCount { get; private set; }
///
/// Reads the information for the next stochastic soil model from the database and creates a
- /// instance of the information.
+ /// instance of the information.
///
- /// The next from the database, or null if no more soil models can be read.
+ /// The next from the database, or null if no more soil models can be read.
/// Thrown when the database returned incorrect values for required properties.
/// Thrown when the database returned incorrect values for required properties.
- public StochasticSoilModel ReadStochasticSoilModel()
+ public MacroStabilityInwardsStochasticSoilModel ReadStochasticSoilModel()
{
try
{
@@ -108,13 +108,13 @@
return !dataReader.Read() ? 0 : Convert.ToInt32(dataReader[StochasticSoilModelTableColumns.Count]);
}
- private StochasticSoilModel ReadMacroStabilityInwardsStochasticSoilModel()
+ private MacroStabilityInwardsStochasticSoilModel ReadMacroStabilityInwardsStochasticSoilModel()
{
if (!HasNext)
{
return null;
}
- StochasticSoilModel stochasticSoilModelSegment = ReadStochasticSoilModelSegment();
+ MacroStabilityInwardsStochasticSoilModel stochasticSoilModelSegment = ReadStochasticSoilModelSegment();
long currentSegmentSoilModelId = ReadStochasticSoildModelSegmentId();
do
{
@@ -132,7 +132,7 @@
return stochasticSoilModelSegment;
}
- private void AddStochasticSoilProfiles(StochasticSoilModel stochasticSoilModelSegment,
+ private void AddStochasticSoilProfiles(MacroStabilityInwardsStochasticSoilModel stochasticSoilModelSegment,
long stochasticSoilModelSegmentId)
{
using (var stochasticSoilProfileReader = new StochasticSoilProfileReader(filePath))
@@ -146,11 +146,11 @@
}
}
- private static void AddStochasticSoilProfile(StochasticSoilModel stochasticSoilModelSegment,
+ private static void AddStochasticSoilProfile(MacroStabilityInwardsStochasticSoilModel stochasticSoilModelSegment,
StochasticSoilProfileReader stochasticSoilProfileReader,
long stochasticSoilModelSegmentId)
{
- StochasticSoilProfile stochasticSoilProfile = stochasticSoilProfileReader.ReadStochasticSoilProfile(stochasticSoilModelSegmentId);
+ MacroStabilityInwardsStochasticSoilProfile stochasticSoilProfile = stochasticSoilProfileReader.ReadStochasticSoilProfile(stochasticSoilModelSegmentId);
if (stochasticSoilProfile != null)
{
stochasticSoilModelSegment.StochasticSoilProfiles.Add(stochasticSoilProfile);
@@ -232,10 +232,10 @@
}
}
- private StochasticSoilModel ReadStochasticSoilModelSegment()
+ private MacroStabilityInwardsStochasticSoilModel ReadStochasticSoilModelSegment()
{
string stochasticSoilModelName = Convert.ToString(dataReader[StochasticSoilModelTableColumns.StochasticSoilModelName]);
- return new StochasticSoilModel(stochasticSoilModelName);
+ return new MacroStabilityInwardsStochasticSoilModel(stochasticSoilModelName);
}
private long ReadStochasticSoildModelSegmentId()
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfile/StochasticSoilProfileReader.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfile/StochasticSoilProfileReader.cs (.../StochasticSoilProfileReader.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfile/StochasticSoilProfileReader.cs (.../StochasticSoilProfileReader.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -35,7 +35,7 @@
namespace Ringtoets.MacroStabilityInwards.IO.SoilProfile
{
///
- /// This class reads a DSoil database file and reads
+ /// This class reads a DSoil database file and reads
/// from this database.
///
public class StochasticSoilProfileReader : SqLiteDatabaseReaderBase
@@ -67,18 +67,18 @@
///
/// Reads the information for the next stochastic soil profile from the database
- /// and creates a instance of the information.
+ /// and creates a instance of the information.
///
- /// Identifier of the next
+ /// Identifier of the next
/// to look for.
- /// The next from the database, or null
+ /// The next from the database, or null
/// if no more stochastic soil profiles can be read.
/// Thrown when the database returned
/// incorrect values for required properties.
/// Rows are being read in ascending order based on the database ID of the
/// stochastic soil model. Therefore once a stochastic soil model has been read already,
/// it will not be found with this method.
- public StochasticSoilProfile ReadStochasticSoilProfile(long stochasticSoilModelId)
+ public MacroStabilityInwardsStochasticSoilProfile ReadStochasticSoilProfile(long stochasticSoilModelId)
{
if (!HasNext)
{
@@ -91,7 +91,7 @@
}
try
{
- StochasticSoilProfile stochasticSoilProfile = ReadStochasticSoilProfileProbability();
+ MacroStabilityInwardsStochasticSoilProfile stochasticSoilProfile = ReadStochasticSoilProfileProbability();
MoveToNextStochasticSoilModelId(stochasticSoilModelId);
return stochasticSoilProfile;
}
@@ -193,18 +193,18 @@
return Convert.ToInt64(dataReader[StochasticSoilProfileTableColumns.StochasticSoilModelId]);
}
- private StochasticSoilProfile ReadStochasticSoilProfileProbability()
+ private MacroStabilityInwardsStochasticSoilProfile ReadStochasticSoilProfileProbability()
{
object valueProbability = dataReader[StochasticSoilProfileTableColumns.Probability];
double probability = valueProbability.Equals(DBNull.Value) ? 0 : Convert.ToDouble(valueProbability);
- StochasticSoilProfile soilProfile1DId = ReadSoilProfile1DId(probability);
+ MacroStabilityInwardsStochasticSoilProfile soilProfile1DId = ReadSoilProfile1DId(probability);
if (soilProfile1DId != null)
{
return soilProfile1DId;
}
- StochasticSoilProfile soilProfile2DId = ReadSoilProfile2DId(probability);
+ MacroStabilityInwardsStochasticSoilProfile soilProfile2DId = ReadSoilProfile2DId(probability);
if (soilProfile2DId != null)
{
return soilProfile2DId;
@@ -215,24 +215,24 @@
throw new StochasticSoilProfileReadException(message);
}
- private StochasticSoilProfile ReadSoilProfile2DId(double probability)
+ private MacroStabilityInwardsStochasticSoilProfile ReadSoilProfile2DId(double probability)
{
object valueSoilProfile2DId = dataReader[StochasticSoilProfileTableColumns.SoilProfile2DId];
if (!valueSoilProfile2DId.Equals(DBNull.Value))
{
long soilProfileId = Convert.ToInt64(valueSoilProfile2DId);
- return new StochasticSoilProfile(probability, SoilProfileType.SoilProfile2D, soilProfileId);
+ return new MacroStabilityInwardsStochasticSoilProfile(probability, SoilProfileType.SoilProfile2D, soilProfileId);
}
return null;
}
- private StochasticSoilProfile ReadSoilProfile1DId(double probability)
+ private MacroStabilityInwardsStochasticSoilProfile ReadSoilProfile1DId(double probability)
{
object valueSoilProfile1DId = dataReader[StochasticSoilProfileTableColumns.SoilProfile1DId];
if (!valueSoilProfile1DId.Equals(DBNull.Value))
{
long soilProfileId = Convert.ToInt64(valueSoilProfile1DId);
- return new StochasticSoilProfile(probability, SoilProfileType.SoilProfile1D, soilProfileId);
+ return new MacroStabilityInwardsStochasticSoilProfile(probability, SoilProfileType.SoilProfile1D, soilProfileId);
}
return null;
}
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Plugin/FileImporter/MacroStabilityInwardsSurfaceLineUpdateDataStrategy.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Plugin/FileImporter/MacroStabilityInwardsSurfaceLineUpdateDataStrategy.cs (.../MacroStabilityInwardsSurfaceLineUpdateDataStrategy.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Plugin/FileImporter/MacroStabilityInwardsSurfaceLineUpdateDataStrategy.cs (.../MacroStabilityInwardsSurfaceLineUpdateDataStrategy.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -108,7 +108,7 @@
var affectedObjects = new List();
foreach (MacroStabilityInwardsCalculation calculation in calculationsToUpdate)
{
- IEnumerable matchingSoilModels = GetAvailableStochasticSoilModels(updatedSurfaceLine);
+ IEnumerable matchingSoilModels = GetAvailableStochasticSoilModels(updatedSurfaceLine);
MacroStabilityInwardsInput calculationInput = calculation.InputParameters;
MacroStabilityInwardsInputService.SetMatchingStochasticSoilModel(calculationInput, matchingSoilModels);
@@ -127,7 +127,7 @@
return affectedCalculations;
}
- private IEnumerable GetAvailableStochasticSoilModels(MacroStabilityInwardsSurfaceLine surfaceLine)
+ private IEnumerable GetAvailableStochasticSoilModels(MacroStabilityInwardsSurfaceLine surfaceLine)
{
return MacroStabilityInwardsCalculationConfigurationHelper.GetStochasticSoilModelsForSurfaceLine(surfaceLine,
FailureMechanism.StochasticSoilModels);
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Plugin/FileImporter/StochasticSoilModelReplaceDataStrategy.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Plugin/FileImporter/StochasticSoilModelReplaceDataStrategy.cs (.../StochasticSoilModelReplaceDataStrategy.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Plugin/FileImporter/StochasticSoilModelReplaceDataStrategy.cs (.../StochasticSoilModelReplaceDataStrategy.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -34,10 +34,10 @@
/// A to replace the stochastic
/// soil models with the imported stochastic soil models.
///
- public class StochasticSoilModelReplaceDataStrategy : ReplaceDataStrategyBase,
+ public class StochasticSoilModelReplaceDataStrategy : ReplaceDataStrategyBase,
IStochasticSoilModelUpdateModelStrategy
{
- private ObservableUniqueItemCollectionWithSourcePath targetDataCollection;
+ private ObservableUniqueItemCollectionWithSourcePath targetDataCollection;
///
/// Creates a new instance of .
@@ -50,7 +50,7 @@
targetDataCollection = failureMechanism.StochasticSoilModels;
}
- public IEnumerable UpdateModelWithImportedData(IEnumerable stochasticSoilModels, string sourceFilePath)
+ public IEnumerable UpdateModelWithImportedData(IEnumerable stochasticSoilModels, string sourceFilePath)
{
return ReplaceTargetCollectionWithImportedData(stochasticSoilModels, sourceFilePath);
}
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Plugin/FileImporter/StochasticSoilModelUpdateDataStrategy.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Plugin/FileImporter/StochasticSoilModelUpdateDataStrategy.cs (.../StochasticSoilModelUpdateDataStrategy.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Plugin/FileImporter/StochasticSoilModelUpdateDataStrategy.cs (.../StochasticSoilModelUpdateDataStrategy.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -36,7 +36,7 @@
///
/// An for updating stochastic soil models based on imported data.
///
- public class StochasticSoilModelUpdateDataStrategy : UpdateDataStrategyBase,
+ public class StochasticSoilModelUpdateDataStrategy : UpdateDataStrategyBase,
IStochasticSoilModelUpdateModelStrategy
{
///
@@ -47,58 +47,58 @@
public StochasticSoilModelUpdateDataStrategy(MacroStabilityInwardsFailureMechanism failureMechanism)
: base(failureMechanism, failureMechanism?.StochasticSoilModels, new SoilModelNameEqualityComparer()) {}
- public IEnumerable UpdateModelWithImportedData(IEnumerable stochasticSoilModels, string sourceFilePath)
+ public IEnumerable UpdateModelWithImportedData(IEnumerable stochasticSoilModels, string sourceFilePath)
{
return UpdateTargetCollectionData(stochasticSoilModels, sourceFilePath);
}
#region Remove Data Functions
- protected override IEnumerable RemoveObjectAndDependentData(StochasticSoilModel removedModel)
+ protected override IEnumerable RemoveObjectAndDependentData(MacroStabilityInwardsStochasticSoilModel removedModel)
{
return MacroStabilityInwardsDataSynchronizationService.RemoveStochasticSoilModel(FailureMechanism, removedModel);
}
#endregion
///
- /// Class for comparing by just the name.
+ /// Class for comparing by just the name.
///
- private class SoilModelNameEqualityComparer : IEqualityComparer
+ private class SoilModelNameEqualityComparer : IEqualityComparer
{
- public bool Equals(StochasticSoilModel x, StochasticSoilModel y)
+ public bool Equals(MacroStabilityInwardsStochasticSoilModel x, MacroStabilityInwardsStochasticSoilModel y)
{
return x.Name == y.Name;
}
- public int GetHashCode(StochasticSoilModel obj)
+ public int GetHashCode(MacroStabilityInwardsStochasticSoilModel obj)
{
return obj.Name.GetHashCode();
}
}
#region Update Data Functions
- protected override IEnumerable UpdateObjectAndDependentData(StochasticSoilModel soilModelToUpdate,
- StochasticSoilModel soilModelToUpdateFrom)
+ protected override IEnumerable UpdateObjectAndDependentData(MacroStabilityInwardsStochasticSoilModel soilModelToUpdate,
+ MacroStabilityInwardsStochasticSoilModel soilModelToUpdateFrom)
{
return UpdateStochasticSoilModel(soilModelToUpdate, soilModelToUpdateFrom);
}
- private IEnumerable UpdateStochasticSoilModel(StochasticSoilModel modelToUpdate, StochasticSoilModel modelToUpdateFrom)
+ private IEnumerable UpdateStochasticSoilModel(MacroStabilityInwardsStochasticSoilModel modelToUpdate, MacroStabilityInwardsStochasticSoilModel modelToUpdateFrom)
{
- Dictionary oldProfiles = modelToUpdate
+ Dictionary oldProfiles = modelToUpdate
.StochasticSoilProfiles
- .ToDictionary(ssp => ssp, ssp => ssp.SoilProfile, new ReferenceEqualityComparer());
+ .ToDictionary(ssp => ssp, ssp => ssp.SoilProfile, new ReferenceEqualityComparer());
- StochasticSoilModelProfileDifference difference = modelToUpdate.Update(modelToUpdateFrom);
+ MacroStabilityInwardsStochasticSoilModelProfileDifference difference = modelToUpdate.Update(modelToUpdateFrom);
var affectedObjects = new List();
- foreach (StochasticSoilProfile removedProfile in difference.RemovedProfiles)
+ foreach (MacroStabilityInwardsStochasticSoilProfile removedProfile in difference.RemovedProfiles)
{
affectedObjects.AddRange(MacroStabilityInwardsDataSynchronizationService.RemoveStochasticSoilProfileFromInput(FailureMechanism, removedProfile));
}
- foreach (StochasticSoilProfile updatedProfile in difference.UpdatedProfiles)
+ foreach (MacroStabilityInwardsStochasticSoilProfile updatedProfile in difference.UpdatedProfiles)
{
if (!oldProfiles[updatedProfile].Equals(updatedProfile.SoilProfile))
{
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Plugin/MacroStabilityInwardsPlugin.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Plugin/MacroStabilityInwardsPlugin.cs (.../MacroStabilityInwardsPlugin.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Plugin/MacroStabilityInwardsPlugin.cs (.../MacroStabilityInwardsPlugin.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -84,8 +84,8 @@
{
CreateInstance = context => new StochasticSoilModelCollectionProperties(context.WrappedData)
};
- yield return new PropertyInfo();
- yield return new PropertyInfo();
+ yield return new PropertyInfo();
+ yield return new PropertyInfo();
}
public override IEnumerable GetImportInfos()
@@ -295,7 +295,7 @@
ContextMenuStrip = StochasticSoilModelCollectionContextContextMenuStrip
};
- yield return new TreeNodeInfo
+ yield return new TreeNodeInfo
{
Text = stochasticSoilModel => stochasticSoilModel.Name,
Image = stochasticSoilModel => MacroStabilityInwardsFormsResources.StochasticSoilModelIcon,
@@ -308,7 +308,7 @@
.Build()
};
- yield return new TreeNodeInfo
+ yield return new TreeNodeInfo
{
Text = stochasticSoilProfile => stochasticSoilProfile.SoilProfile != null ? stochasticSoilProfile.SoilProfile.Name : "Profile",
Image = stochasticSoilProfile => MacroStabilityInwardsFormsResources.SoilProfileIcon,
@@ -942,7 +942,7 @@
nodeData.NotifyObservers();
}
- private static void GenerateCalculations(CalculationGroup target, IEnumerable surfaceLines, IEnumerable soilModels, GeneralMacroStabilityInwardsInput generalInput)
+ private static void GenerateCalculations(CalculationGroup target, IEnumerable surfaceLines, IEnumerable soilModels, GeneralMacroStabilityInwardsInput generalInput)
{
foreach (ICalculationBase group in MacroStabilityInwardsCalculationConfigurationHelper.GenerateCalculationItemsStructure(surfaceLines, soilModels, generalInput))
{
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsDataSynchronizationService.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsDataSynchronizationService.cs (.../MacroStabilityInwardsDataSynchronizationService.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsDataSynchronizationService.cs (.../MacroStabilityInwardsDataSynchronizationService.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -203,7 +203,7 @@
}
///
- /// Removes a given from the
+ /// Removes a given from the
/// and clears all data that depends on it, either directly or indirectly.
///
/// The failure mechanism containing .
@@ -212,7 +212,7 @@
/// All observable objects affected by this method.
/// Thrown when
/// or is null.
- public static IEnumerable RemoveStochasticSoilModel(MacroStabilityInwardsFailureMechanism failureMechanism, StochasticSoilModel soilModel)
+ public static IEnumerable RemoveStochasticSoilModel(MacroStabilityInwardsFailureMechanism failureMechanism, MacroStabilityInwardsStochasticSoilModel soilModel)
{
if (failureMechanism == null)
{
@@ -243,7 +243,7 @@
}
///
- /// Removes all from the
+ /// Removes all from the
/// and clears all data that depends on it, either directly or indirectly.
///
/// The failure mechanism.
@@ -275,7 +275,7 @@
}
///
- /// Removes a given from calculations in the
+ /// Removes a given from calculations in the
/// and clears all data that depends on it, either directly or indirectly.
///
/// The failure mechanism containing .
@@ -284,7 +284,7 @@
/// All observable objects affected by this method.
/// Thrown when
/// or is null.
- public static IEnumerable RemoveStochasticSoilProfileFromInput(MacroStabilityInwardsFailureMechanism failureMechanism, StochasticSoilProfile soilProfile)
+ public static IEnumerable RemoveStochasticSoilProfileFromInput(MacroStabilityInwardsFailureMechanism failureMechanism, MacroStabilityInwardsStochasticSoilProfile soilProfile)
{
if (failureMechanism == null)
{
@@ -307,7 +307,7 @@
}
///
- /// Clears data dependent on a given , either directly or indirectly,
+ /// Clears data dependent on a given , either directly or indirectly,
/// from calculations in the .
///
/// The failure mechanism containing .
@@ -316,7 +316,7 @@
/// All observable objects affected by this method.
/// Thrown when
/// or is null.
- public static IEnumerable ClearStochasticSoilProfileDependentData(MacroStabilityInwardsFailureMechanism failureMechanism, StochasticSoilProfile soilProfile)
+ public static IEnumerable ClearStochasticSoilProfileDependentData(MacroStabilityInwardsFailureMechanism failureMechanism, MacroStabilityInwardsStochasticSoilProfile soilProfile)
{
if (failureMechanism == null)
{
@@ -349,7 +349,7 @@
return changedObservables;
}
- private static IEnumerable GetCalculationsWithSoilProfileAssigned(MacroStabilityInwardsFailureMechanism failureMechanism, StochasticSoilProfile soilProfile)
+ private static IEnumerable GetCalculationsWithSoilProfileAssigned(MacroStabilityInwardsFailureMechanism failureMechanism, MacroStabilityInwardsStochasticSoilProfile soilProfile)
{
IEnumerable calculationScenarios =
failureMechanism.Calculations
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsInputService.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsInputService.cs (.../MacroStabilityInwardsInputService.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsInputService.cs (.../MacroStabilityInwardsInputService.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -33,13 +33,13 @@
{
///
/// Sets and that match the input of a calculation if there is one matching
- /// or respectively.
+ /// or respectively.
///
- /// The input parameters to set the .
+ /// The input parameters to set the .
/// The available stochastic soil models.
- public static void SetMatchingStochasticSoilModel(MacroStabilityInwardsInput macroStabilityInwardsInput, IEnumerable availableStochasticSoilModels)
+ public static void SetMatchingStochasticSoilModel(MacroStabilityInwardsInput macroStabilityInwardsInput, IEnumerable availableStochasticSoilModels)
{
- List available = availableStochasticSoilModels.ToList();
+ List available = availableStochasticSoilModels.ToList();
if (available.Count == 1)
{
macroStabilityInwardsInput.StochasticSoilModel = available.First();
@@ -52,13 +52,13 @@
}
///
- /// Sets the to the corresponding :
+ /// Sets the to the corresponding :
///
- /// - null if no is set.
- /// - The first element of when it is the only element.
+ /// - null if no is set.
+ /// - The first element of when it is the only element.
///
///
- /// The input parameters to set the .
+ /// The input parameters to set the .
public static void SyncStochasticSoilProfileWithStochasticSoilModel(MacroStabilityInwardsInput macroStabilityInwardsInput)
{
if (macroStabilityInwardsInput.StochasticSoilModel != null)
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/Ringtoets.MacroStabilityInwards.Service.csproj
===================================================================
diff -u -r74d2b52b152bcccfdcf9f1143f5109d6357084a6 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/Ringtoets.MacroStabilityInwards.Service.csproj (.../Ringtoets.MacroStabilityInwards.Service.csproj) (revision 74d2b52b152bcccfdcf9f1143f5109d6357084a6)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/Ringtoets.MacroStabilityInwards.Service.csproj (.../Ringtoets.MacroStabilityInwards.Service.csproj) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -72,6 +72,10 @@
Ringtoets.Common.Forms
False
+
+ {52BA7627-CBAB-4209-BE77-3B5F31378277}
+ Ringtoets.Common.IO
+
{D951D6DA-FE83-4920-9FDB-63BF96480B54}
Ringtoets.Common.Service
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/Ringtoets.MacroStabilityInwards.Data.Test.csproj
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/Ringtoets.MacroStabilityInwards.Data.Test.csproj (.../Ringtoets.MacroStabilityInwards.Data.Test.csproj) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/Ringtoets.MacroStabilityInwards.Data.Test.csproj (.../Ringtoets.MacroStabilityInwards.Data.Test.csproj) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -65,8 +65,8 @@
-
-
+
+
@@ -76,11 +76,11 @@
-
-
-
-
-
+
+
+
+
+
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilLayerUnderSurfaceLineTest.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilLayerUnderSurfaceLineTest.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilLayerUnderSurfaceLineTest.cs (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -0,0 +1,123 @@
+// 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 System.Linq;
+using Core.Common.Base.Geometry;
+using NUnit.Framework;
+using Ringtoets.MacroStabilityInwards.Data.SoilProfile;
+using Ringtoets.MacroStabilityInwards.Primitives;
+
+namespace Ringtoets.MacroStabilityInwards.Data.Test.SoilProfile
+{
+ [TestFixture]
+ public class MacroStabilityInwardsSoilLayerUnderSurfaceLineTest
+ {
+ [Test]
+ public void Constructor_WithoutOuterRingWithHolesAndProperties_ThrowsArgumentNullException()
+ {
+ // Call
+ TestDelegate test = () => new MacroStabilityInwardsSoilLayerUnderSurfaceLine(null, Enumerable.Empty(), new SoilLayerProperties());
+
+ // Assert
+ var exception = Assert.Throws(test);
+ Assert.AreEqual("outerRing", exception.ParamName);
+ }
+
+ [Test]
+ public void Constructor_WithoutHolesWithOuterRingAndProperties_ThrowsArgumentNullException()
+ {
+ // Call
+ TestDelegate test = () => new MacroStabilityInwardsSoilLayerUnderSurfaceLine(new Point2D[0], null, new SoilLayerProperties());
+
+ // Assert
+ var exception = Assert.Throws(test);
+ Assert.AreEqual("holes", exception.ParamName);
+ }
+
+ [Test]
+ public void Constructor_WithoutPropertiesWithOuterRingAndHoles_ThrowsArgumentNullException()
+ {
+ // Call
+ TestDelegate test = () => new MacroStabilityInwardsSoilLayerUnderSurfaceLine(new Point2D[0], Enumerable.Empty(), null);
+
+ // Assert
+ var exception = Assert.Throws(test);
+ Assert.AreEqual("properties", exception.ParamName);
+ }
+
+ [Test]
+ public void Constructor_WithoutOuterRingWithProperties_ThrowsArgumentNullException()
+ {
+ // Call
+ TestDelegate test = () => new MacroStabilityInwardsSoilLayerUnderSurfaceLine(null, new SoilLayerProperties());
+
+ // Assert
+ var exception = Assert.Throws(test);
+ Assert.AreEqual("outerRing", exception.ParamName);
+ }
+
+ [Test]
+ public void Constructor_WithoutPropertiesWithOuterRing_ThrowsArgumentNullException()
+ {
+ // Call
+ TestDelegate test = () => new MacroStabilityInwardsSoilLayerUnderSurfaceLine(new Point2D[0], null);
+
+ // Assert
+ var exception = Assert.Throws(test);
+ Assert.AreEqual("properties", exception.ParamName);
+ }
+
+ [Test]
+ public void Constructor_WithOuterRingAndHolesAndProperties_NewInstanceWithPropertiesSet()
+ {
+ // Call
+ var outerRing = new Point2D[0];
+ IEnumerable holes = Enumerable.Empty();
+ var properties = new SoilLayerProperties();
+
+ // Setup
+ var layer = new MacroStabilityInwardsSoilLayerUnderSurfaceLine(outerRing, holes, properties);
+
+ // Assert
+ Assert.AreSame(outerRing, layer.OuterRing);
+ Assert.AreSame(holes, layer.Holes);
+ Assert.AreSame(properties, layer.Properties);
+ }
+
+ [Test]
+ public void Constructor_WithOuterRingAndProperties_NewInstanceWithPropertiesSet()
+ {
+ // Call
+ var outerRing = new Point2D[0];
+ var properties = new SoilLayerProperties();
+
+ // Setup
+ var layer = new MacroStabilityInwardsSoilLayerUnderSurfaceLine(outerRing, properties);
+
+ // Assert
+ Assert.AreSame(outerRing, layer.OuterRing);
+ Assert.IsEmpty(layer.Holes);
+ Assert.AreSame(properties, layer.Properties);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineFactoryTest.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineFactoryTest.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineFactoryTest.cs (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -0,0 +1,377 @@
+// 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 System.Linq;
+using Core.Common.Base.Geometry;
+using NUnit.Framework;
+using Ringtoets.MacroStabilityInwards.Data.SoilProfile;
+using Ringtoets.MacroStabilityInwards.Primitives;
+
+namespace Ringtoets.MacroStabilityInwards.Data.Test.SoilProfile
+{
+ [TestFixture]
+ public class MacroStabilityInwardsSoilProfileUnderSurfaceLineFactoryTest
+ {
+ [Test]
+ public void Create_SoilProfile1DNull_ThrowArgumentNullException()
+ {
+ // Setup
+ var surfaceLine = new MacroStabilityInwardsSurfaceLine(string.Empty);
+
+ // Call
+ TestDelegate test = () => MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.Create(null, surfaceLine);
+
+ // Assert
+ var exception = Assert.Throws(test);
+ Assert.AreEqual("soilProfile", exception.ParamName);
+ }
+
+ [Test]
+ public void Create_SurfaceLineNull_ThrowArgumentNullException()
+ {
+ // Setup
+ var soilProfile = new MacroStabilityInwardsSoilProfile1D("name", 2.0, new[]
+ {
+ new MacroStabilityInwardsSoilLayer1D(2)
+ }, SoilProfileType.SoilProfile1D, 0);
+
+ // Call
+ TestDelegate test = () => MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.Create(soilProfile, null);
+
+ // Assert
+ var exception = Assert.Throws(test);
+ Assert.AreEqual("surfaceLine", exception.ParamName);
+ }
+
+ [Test]
+ public void Create_SoilProfile2DNull_ThrowArgumentNullException()
+ {
+ // Call
+ TestDelegate test = () => MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.Create(null);
+
+ // Assert
+ var exception = Assert.Throws(test);
+ Assert.AreEqual("soilProfile", exception.ParamName);
+ }
+
+ [Test]
+ public void Create_SurfaceLineOnTopOrAboveSoilLayer_ReturnsSoilLayerPointsAsRectangle()
+ {
+ // Setup
+ var surfaceLine = new MacroStabilityInwardsSurfaceLine(string.Empty);
+ surfaceLine.SetGeometry(new[]
+ {
+ new Point3D(0, 0, 4),
+ new Point3D(0, 0, 3.2),
+ new Point3D(2, 0, 4)
+ });
+ var soilLayer = new MacroStabilityInwardsSoilLayer1D(3.2);
+ var soilProfile = new MacroStabilityInwardsSoilProfile1D("name", 2.0, new[]
+ {
+ soilLayer
+ }, SoilProfileType.SoilProfile1D, 0);
+
+ // Call
+ MacroStabilityInwardsSoilProfileUnderSurfaceLine areas = MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.Create(soilProfile, surfaceLine);
+
+ // Assert
+ Assert.AreEqual(1, areas.LayersUnderSurfaceLine.Count());
+ CollectionAssert.AreEqual(new[]
+ {
+ new Point2D(2, 3.2),
+ new Point2D(2, 2),
+ new Point2D(0, 2),
+ new Point2D(0, 3.2)
+ }, areas.LayersUnderSurfaceLine.ElementAt(0).OuterRing);
+ }
+
+ [Test]
+ public void Create_SurfaceLineBelowSoilLayer_ReturnsEmptyAreasCollection()
+ {
+ // Setup
+ var surfaceLine = new MacroStabilityInwardsSurfaceLine(string.Empty);
+ surfaceLine.SetGeometry(new[]
+ {
+ new Point3D(0, 0, 2.0),
+ new Point3D(2, 0, 2.0)
+ });
+ var soilLayer = new MacroStabilityInwardsSoilLayer1D(3.2);
+ var soilProfile = new MacroStabilityInwardsSoilProfile1D("name", 2.0, new[]
+ {
+ soilLayer
+ }, SoilProfileType.SoilProfile1D, 0);
+
+ // Call
+ MacroStabilityInwardsSoilProfileUnderSurfaceLine areas = MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.Create(soilProfile, surfaceLine);
+
+ // Assert
+ CollectionAssert.IsEmpty(areas.LayersUnderSurfaceLine);
+ }
+
+ [Test]
+ public void Create_SurfaceLineThroughMiddleLayerButNotSplittingIt_ReturnsSoilLayerPointsAsRectangleFollowingSurfaceLine()
+ {
+ // Setup
+ var surfaceLine = new MacroStabilityInwardsSurfaceLine(string.Empty);
+ surfaceLine.SetGeometry(new[]
+ {
+ new Point3D(0, 0, 3.0),
+ new Point3D(1, 0, 2.0),
+ new Point3D(2, 0, 3.0)
+ });
+ const double bottom = 1.5;
+ const double top = 2.5;
+ var soilLayer = new MacroStabilityInwardsSoilLayer1D(top);
+ var soilProfile = new MacroStabilityInwardsSoilProfile1D("name", bottom, new[]
+ {
+ soilLayer
+ }, SoilProfileType.SoilProfile1D, 0);
+
+ // Call
+ MacroStabilityInwardsSoilProfileUnderSurfaceLine areas = MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.Create(soilProfile, surfaceLine);
+
+ // Assert
+ Assert.AreEqual(1, areas.LayersUnderSurfaceLine.Count());
+ CollectionAssert.AreEqual(new[]
+ {
+ new Point2D(0.5, top),
+ new Point2D(1, 2.0),
+ new Point2D(1.5, top),
+ new Point2D(2, top),
+ new Point2D(2, bottom),
+ new Point2D(0, bottom),
+ new Point2D(0, top)
+ }, areas.LayersUnderSurfaceLine.ElementAt(0).OuterRing);
+ }
+
+ [Test]
+ public void Create_SurfaceLineThroughMiddleLayerButNotSplittingItIntersectionOnTopLevel_ReturnsSoilLayerPointsAsRectangleFollowingSurfaceLine()
+ {
+ // Setup
+ var surfaceLine = new MacroStabilityInwardsSurfaceLine(string.Empty);
+ surfaceLine.SetGeometry(new[]
+ {
+ new Point3D(0, 0, 3.0),
+ new Point3D(0.5, 0, 2.5),
+ new Point3D(1, 0, 2.0),
+ new Point3D(1.5, 0, 2.5),
+ new Point3D(2, 0, 3.0)
+ });
+ const double bottom = 1.5;
+ const double top = 2.5;
+ var soilLayer = new MacroStabilityInwardsSoilLayer1D(top);
+ var soilProfile = new MacroStabilityInwardsSoilProfile1D("name", bottom, new[]
+ {
+ soilLayer
+ }, SoilProfileType.SoilProfile1D, 0);
+
+ // Call
+ MacroStabilityInwardsSoilProfileUnderSurfaceLine areas = MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.Create(soilProfile, surfaceLine);
+
+ // Assert
+ Assert.AreEqual(1, areas.LayersUnderSurfaceLine.Count());
+ CollectionAssert.AreEqual(new[]
+ {
+ new Point2D(0.5, top),
+ new Point2D(1, 2.0),
+ new Point2D(1.5, top),
+ new Point2D(2, top),
+ new Point2D(2, bottom),
+ new Point2D(0, bottom),
+ new Point2D(0, top)
+ }, areas.LayersUnderSurfaceLine.ElementAt(0).OuterRing);
+ }
+
+ [Test]
+ public void Create_SurfaceLineStartsBelowLayerTopButAboveBottom_ReturnsSoilLayerPointsAsRectangleFollowingSurfaceLine()
+ {
+ // Setup
+ var surfaceLine = new MacroStabilityInwardsSurfaceLine(string.Empty);
+ surfaceLine.SetGeometry(new[]
+ {
+ new Point3D(0, 0, 2.0),
+ new Point3D(1, 0, 2.0),
+ new Point3D(2, 0, 3.0)
+ });
+ const double bottom = 1.5;
+ const double top = 2.5;
+ var soilLayer = new MacroStabilityInwardsSoilLayer1D(top);
+ var soilProfile = new MacroStabilityInwardsSoilProfile1D("name", bottom, new[]
+ {
+ soilLayer
+ }, SoilProfileType.SoilProfile1D, 0);
+
+ // Call
+ MacroStabilityInwardsSoilProfileUnderSurfaceLine areas = MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.Create(soilProfile, surfaceLine);
+
+ // Assert
+ Assert.AreEqual(1, areas.LayersUnderSurfaceLine.Count());
+ CollectionAssert.AreEqual(new[]
+ {
+ new Point2D(0, 2.0),
+ new Point2D(1, 2.0),
+ new Point2D(1.5, top),
+ new Point2D(2, top),
+ new Point2D(2, bottom),
+ new Point2D(0, bottom)
+ }, areas.LayersUnderSurfaceLine.ElementAt(0).OuterRing);
+ }
+
+ [Test]
+ public void Create_SurfaceLineEndsBelowLayerTopButAboveBottom_ReturnsSoilLayerPointsAsRectangleFollowingSurfaceLine()
+ {
+ // Setup
+ var surfaceLine = new MacroStabilityInwardsSurfaceLine(string.Empty);
+ surfaceLine.SetGeometry(new[]
+ {
+ new Point3D(0, 0, 3.0),
+ new Point3D(1, 0, 2.0),
+ new Point3D(2, 0, 2.0)
+ });
+ const double bottom = 1.5;
+ const double top = 2.5;
+ var soilLayer = new MacroStabilityInwardsSoilLayer1D(top);
+ var soilProfile = new MacroStabilityInwardsSoilProfile1D("name", bottom, new[]
+ {
+ soilLayer
+ }, SoilProfileType.SoilProfile1D, 0);
+
+ // Call
+ MacroStabilityInwardsSoilProfileUnderSurfaceLine areas = MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.Create(soilProfile, surfaceLine);
+
+ // Assert
+ Assert.AreEqual(1, areas.LayersUnderSurfaceLine.Count());
+ CollectionAssert.AreEqual(new[]
+ {
+ new Point2D(0.5, top),
+ new Point2D(1, 2.0),
+ new Point2D(2, 2.0),
+ new Point2D(2, bottom),
+ new Point2D(0, bottom),
+ new Point2D(0, top)
+ }, areas.LayersUnderSurfaceLine.ElementAt(0).OuterRing);
+ }
+
+ [Test]
+ public void Create_SurfaceLineZigZagsThroughSoilLayer_ReturnsSoilLayerPointsSplitInMultipleAreas()
+ {
+ // Setup
+ var surfaceLine = new MacroStabilityInwardsSurfaceLine(string.Empty);
+ surfaceLine.SetGeometry(new[]
+ {
+ new Point3D(0, 0, 4.0),
+ new Point3D(4, 0, 0.0),
+ new Point3D(8, 0, 4.0)
+ });
+ const int bottom = 1;
+ const int top = 3;
+ var soilLayer = new MacroStabilityInwardsSoilLayer1D(top);
+ var soilProfile = new MacroStabilityInwardsSoilProfile1D("name", bottom, new[]
+ {
+ soilLayer
+ }, SoilProfileType.SoilProfile1D, 0);
+
+ // Call
+ MacroStabilityInwardsSoilProfileUnderSurfaceLine areas = MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.Create(soilProfile, surfaceLine);
+
+ // Assert
+ Assert.AreEqual(2, areas.LayersUnderSurfaceLine.Count());
+ CollectionAssert.AreEqual(new[]
+ {
+ new Point2D(1, top),
+ new Point2D(3, bottom),
+ new Point2D(0, bottom),
+ new Point2D(0, top)
+ }, areas.LayersUnderSurfaceLine.ElementAt(0).OuterRing);
+ CollectionAssert.AreEqual(new[]
+ {
+ new Point2D(5, bottom),
+ new Point2D(7, top),
+ new Point2D(8, top),
+ new Point2D(8, bottom)
+ }, areas.LayersUnderSurfaceLine.ElementAt(1).OuterRing);
+ }
+
+ [Test]
+ public void Create_SoilProfile2DWithOuterRingAndHoles_ReturnsEqualGeometries()
+ {
+ // Setup
+ Ring outerRingA = CreateRing(21);
+ Ring outerRingB = CreateRing(12);
+ var holesA = new[]
+ {
+ CreateRing(4),
+ CreateRing(7)
+ };
+ var holesB = new[]
+ {
+ CreateRing(4),
+ CreateRing(7),
+ CreateRing(2)
+ };
+ IEnumerable layers = new[]
+ {
+ new MacroStabilityInwardsSoilLayer2D(outerRingA, holesA),
+ new MacroStabilityInwardsSoilLayer2D(outerRingB, holesB)
+ };
+ var profile = new MacroStabilityInwardsSoilProfile2D("name", layers, SoilProfileType.SoilProfile2D, 0);
+
+ // Call
+ MacroStabilityInwardsSoilProfileUnderSurfaceLine profileUnderSurfaceLine = MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.Create(profile);
+
+ // Assert
+ Assert.AreEqual(2, profileUnderSurfaceLine.LayersUnderSurfaceLine.Count());
+ CollectionAssert.AreEqual(new[]
+ {
+ outerRingA.Points,
+ outerRingB.Points
+ }, profileUnderSurfaceLine.LayersUnderSurfaceLine.Select(layer => layer.OuterRing));
+ CollectionAssert.AreEqual(new[]
+ {
+ holesA.Select(h => h.Points),
+ holesB.Select(h => h.Points)
+ }, profileUnderSurfaceLine.LayersUnderSurfaceLine.Select(layer => layer.Holes));
+ }
+
+ private static Ring CreateRing(int seed)
+ {
+ var random = new Random(seed);
+ int x1 = random.Next();
+ int y1 = random.Next();
+ int x2 = x1;
+ int y2 = y1 + random.Next();
+ int x3 = x2 + random.Next();
+ int y3 = y2;
+ double x4 = x1 + (x3 - x1) * random.NextDouble();
+ int y4 = y1;
+
+ return new Ring(new[]
+ {
+ new Point2D(x1, y1),
+ new Point2D(x2, y2),
+ new Point2D(x3, y3),
+ new Point2D(x4, y4)
+ });
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineTest.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineTest.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineTest.cs (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -0,0 +1,57 @@
+// 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 System.Linq;
+using NUnit.Framework;
+using Ringtoets.MacroStabilityInwards.Data.SoilProfile;
+
+namespace Ringtoets.MacroStabilityInwards.Data.Test.SoilProfile
+{
+ [TestFixture]
+ public class MacroStabilityInwardsSoilProfileUnderSurfaceLineTest
+ {
+ [Test]
+ public void Constructor_WithoutLayersUnderSurfaceLine_ThrowsArgumentNullException()
+ {
+ // Call
+ TestDelegate test = () => new MacroStabilityInwardsSoilProfileUnderSurfaceLine(null);
+
+ // Assert
+ var exception = Assert.Throws(test);
+ Assert.AreEqual("layersUnderSurfaceLine", exception.ParamName);
+ }
+
+ [Test]
+ public void Constructor_WithLayersUnderSurfaceLine_NewInstanceWithPropertiesSet()
+ {
+ // Call
+ IEnumerable layers = Enumerable.Empty();
+
+ // Setup
+ var profile = new MacroStabilityInwardsSoilProfileUnderSurfaceLine(layers);
+
+ // Assert
+ Assert.AreSame(layers, profile.LayersUnderSurfaceLine);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilModelCollectionTest.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilModelCollectionTest.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilModelCollectionTest.cs (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -0,0 +1,81 @@
+// 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 System.Linq;
+using Core.Common.Base;
+using NUnit.Framework;
+using Ringtoets.Common.Data.TestUtil;
+using Ringtoets.MacroStabilityInwards.Data.SoilProfile;
+
+namespace Ringtoets.MacroStabilityInwards.Data.Test.SoilProfile
+{
+ [TestFixture]
+ public class MacroStabilityInwardsStochasticSoilModelCollectionTest :
+ CustomObservableUniqueItemCollectionWithSourcePathTestFixtureBase<
+ ObservableUniqueItemCollectionWithSourcePath, MacroStabilityInwardsStochasticSoilModel>
+ {
+ protected override ObservableUniqueItemCollectionWithSourcePath CreateCollection()
+ {
+ return new MacroStabilityInwardsStochasticSoilModelCollection();
+ }
+
+ protected override IEnumerable UniqueElements()
+ {
+ yield return new MacroStabilityInwardsStochasticSoilModel("Model A");
+ yield return new MacroStabilityInwardsStochasticSoilModel("Model B");
+ }
+
+ protected override IEnumerable SingleNonUniqueElements()
+ {
+ const string someName = "Soil model";
+ yield return new MacroStabilityInwardsStochasticSoilModel(someName);
+ yield return new MacroStabilityInwardsStochasticSoilModel(someName);
+ }
+
+ 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);
+ }
+
+ protected override void AssertSingleNonUniqueElements(ArgumentException exception, IEnumerable itemsToAdd)
+ {
+ string someName = itemsToAdd.First().Name;
+ Assert.AreEqual("Stochastische ondergrondmodellen moeten een unieke naam hebben. " +
+ $"Gevonden dubbele elementen: {someName}.", exception.Message);
+ }
+
+ protected override void AssertMultipleNonUniqueElements(ArgumentException exception, IEnumerable itemsToAdd)
+ {
+ string someName = itemsToAdd.First().Name;
+ string someOtherName = itemsToAdd.First(i => i.Name != someName).Name;
+ Assert.AreEqual("Stochastische ondergrondmodellen moeten een unieke naam hebben. " +
+ $"Gevonden dubbele elementen: {someName}, {someOtherName}.", exception.Message);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilModelExtensionsTest.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilModelExtensionsTest.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilModelExtensionsTest.cs (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -0,0 +1,126 @@
+// 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 Core.Common.Base.Geometry;
+using NUnit.Framework;
+using Ringtoets.MacroStabilityInwards.Data.SoilProfile;
+using Ringtoets.MacroStabilityInwards.Primitives;
+
+namespace Ringtoets.MacroStabilityInwards.Data.Test.SoilProfile
+{
+ [TestFixture]
+ public class MacroStabilityInwardsStochasticSoilModelExtensionsTest
+ {
+ [Test]
+ public void IntersectsWithSurfaceLineGeometry_SoilModelNull_ThrowArgumentNullException()
+ {
+ // Setup
+ var surfaceLine = new MacroStabilityInwardsSurfaceLine(string.Empty);
+ surfaceLine.SetGeometry(new[]
+ {
+ new Point3D(3.0, 5.0, 0.0),
+ new Point3D(3.0, 0.0, 1.0),
+ new Point3D(3.0, -5.0, 0.0)
+ });
+
+ MacroStabilityInwardsStochasticSoilModel soilModel = null;
+
+ // Call
+ TestDelegate test = () => soilModel.IntersectsWithSurfaceLineGeometry(surfaceLine);
+
+ // Assert
+ var exception = Assert.Throws(test);
+ Assert.AreEqual("stochasticSoilModel", exception.ParamName);
+ }
+
+ [Test]
+ public void IntersectsWithSurfaceLineGeometry_SurfaceLineNull_ThrowArgumentNullException()
+ {
+ // Setup
+ var soilModel = new MacroStabilityInwardsStochasticSoilModel("A");
+ soilModel.Geometry.AddRange(new[]
+ {
+ new Point2D(1.0, 0.0),
+ new Point2D(5.0, 0.0)
+ });
+
+ // Call
+ TestDelegate test = () => soilModel.IntersectsWithSurfaceLineGeometry(null);
+
+ // Assert
+ var exception = Assert.Throws(test);
+ Assert.AreEqual("surfaceLine", exception.ParamName);
+ }
+
+ [Test]
+ public void IntersectsWithSurfaceLineGeometry_SurfaceLineIntersectingSoilModel_ReturnTrue()
+ {
+ // Setup
+ var soilModel = new MacroStabilityInwardsStochasticSoilModel("A");
+ soilModel.Geometry.AddRange(new[]
+ {
+ new Point2D(1.0, 0.0),
+ new Point2D(5.0, 0.0)
+ });
+
+ var surfaceLine = new MacroStabilityInwardsSurfaceLine(string.Empty);
+ surfaceLine.SetGeometry(new[]
+ {
+ new Point3D(3.0, 5.0, 0.0),
+ new Point3D(3.0, 0.0, 1.0),
+ new Point3D(3.0, -5.0, 0.0)
+ });
+
+ // Call
+ bool intersecting = soilModel.IntersectsWithSurfaceLineGeometry(surfaceLine);
+
+ // Assert
+ Assert.IsTrue(intersecting);
+ }
+
+ [Test]
+ public void IntersectsWithSurfaceLineGeometry_SurfaceLineNotIntersectingSoilModel_ReturnFalse()
+ {
+ // Setup
+ var soilModel = new MacroStabilityInwardsStochasticSoilModel("A");
+ soilModel.Geometry.AddRange(new[]
+ {
+ new Point2D(1.0, 0.0),
+ new Point2D(5.0, 0.0)
+ });
+
+ var surfaceLine = new MacroStabilityInwardsSurfaceLine(string.Empty);
+ surfaceLine.SetGeometry(new[]
+ {
+ new Point3D(0.0, 1.0, 0.0),
+ new Point3D(2.5, 1.0, 1.0),
+ new Point3D(5.0, 1.0, 0.0)
+ });
+
+ // Call
+ bool intersecting = soilModel.IntersectsWithSurfaceLineGeometry(surfaceLine);
+
+ // Assert
+ Assert.IsFalse(intersecting);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilModelTest.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilModelTest.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilModelTest.cs (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -0,0 +1,462 @@
+// 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 System.Collections.ObjectModel;
+using System.Linq;
+using Core.Common.Base;
+using Core.Common.Base.Geometry;
+using NUnit.Framework;
+using Rhino.Mocks;
+using Ringtoets.MacroStabilityInwards.Data.SoilProfile;
+using Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil;
+using Ringtoets.MacroStabilityInwards.Primitives;
+
+namespace Ringtoets.MacroStabilityInwards.Data.Test.SoilProfile
+{
+ [TestFixture]
+ public class MacroStabilityInwardsStochasticSoilModelTest
+ {
+ [Test]
+ public void Constructor_WithoutName_ExpectedValues()
+ {
+ // Call
+ TestDelegate test = () => new MacroStabilityInwardsStochasticSoilModel(null);
+
+ // Assert
+ var exception = Assert.Throws(test);
+ Assert.AreEqual("name", exception.ParamName);
+ }
+
+ [Test]
+ [TestCase("")]
+ [TestCase("segmentSoilModelName")]
+ public void Constructor_WithName_ExpectedValues(string segmentSoilModelName)
+ {
+ // Call
+ var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel(segmentSoilModelName);
+
+ // Assert
+ Assert.IsInstanceOf(stochasticSoilModel);
+ Assert.AreEqual(segmentSoilModelName, stochasticSoilModel.Name);
+ CollectionAssert.IsEmpty(stochasticSoilModel.Geometry);
+ CollectionAssert.IsEmpty(stochasticSoilModel.StochasticSoilProfiles);
+ }
+
+ [Test]
+ public void PropertySegmentPoints_Always_ReturnsExpectedValues()
+ {
+ // Setup
+ const string expectedSegmentSoilModelName = "someSegmentSoilModelName";
+ var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel(expectedSegmentSoilModelName);
+ var point2D = new Point2D(1.0, 2.0);
+
+ // Call
+ stochasticSoilModel.Geometry.Add(point2D);
+
+ // Assert
+ Assert.AreEqual(expectedSegmentSoilModelName, stochasticSoilModel.Name);
+ Assert.AreEqual(1, stochasticSoilModel.Geometry.Count);
+ Assert.AreEqual(point2D, stochasticSoilModel.Geometry[0]);
+ }
+
+ [Test]
+ public void PropertyStochasticSoilProfileProbabilities_Always_ReturnsExpectedValues()
+ {
+ // Setup
+ const string expectedSegmentSoilModelName = "someSegmentSoilModelName";
+ var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel(expectedSegmentSoilModelName);
+
+ var mockRepository = new MockRepository();
+ var stochasticSoilProfileProbability = mockRepository.StrictMock(1.0, null, null);
+ mockRepository.ReplayAll();
+
+ // Call
+ stochasticSoilModel.StochasticSoilProfiles.Add(stochasticSoilProfileProbability);
+
+ // Assert
+ Assert.AreEqual(expectedSegmentSoilModelName, stochasticSoilModel.Name);
+ Assert.AreEqual(1, stochasticSoilModel.StochasticSoilProfiles.Count);
+ Assert.AreEqual(stochasticSoilProfileProbability, stochasticSoilModel.StochasticSoilProfiles[0]);
+ mockRepository.VerifyAll();
+ }
+
+ [Test]
+ public void Update_WithNullModel_ThrowsArgumentNullException()
+ {
+ // Setup
+ var model = new MacroStabilityInwardsStochasticSoilModel("name");
+
+ // Call
+ TestDelegate test = () => model.Update(null);
+
+ // Assert
+ string paramName = Assert.Throws(test).ParamName;
+ Assert.AreEqual("fromModel", paramName);
+ }
+
+ [Test]
+ public void Update_ModelWithUpdatedProperties_PropertiesUpdated()
+ {
+ // Setup
+ var model = new MacroStabilityInwardsStochasticSoilModel("name");
+ model.Geometry.AddRange(new[]
+ {
+ new Point2D(1, 2),
+ new Point2D(4, 5)
+ });
+
+ const string expectedName = "otherName";
+ var expectedGeometry = new[]
+ {
+ new Point2D(4, 2)
+ };
+
+ var otherModel = new MacroStabilityInwardsStochasticSoilModel(expectedName);
+ otherModel.Geometry.AddRange(expectedGeometry);
+
+ // Call
+ MacroStabilityInwardsStochasticSoilModelProfileDifference difference = model.Update(otherModel);
+
+ // Assert
+ Assert.AreEqual(expectedName, model.Name);
+ CollectionAssert.AreEqual(expectedGeometry, model.Geometry);
+
+ CollectionAssert.IsEmpty(difference.AddedProfiles);
+ CollectionAssert.IsEmpty(difference.UpdatedProfiles);
+ CollectionAssert.IsEmpty(difference.RemovedProfiles);
+ }
+
+ [Test]
+ public void Update_ModelWithAddedProfile_ProfileAdded()
+ {
+ // Setup
+ MacroStabilityInwardsStochasticSoilModel model = CreateEmptyModel();
+ MacroStabilityInwardsStochasticSoilModel otherModel = CreateEmptyModel();
+ var expectedAddedProfile = new MacroStabilityInwardsStochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 3)
+ {
+ SoilProfile = new TestSoilProfile()
+ };
+ otherModel.StochasticSoilProfiles.Add(expectedAddedProfile);
+
+ // Call
+ MacroStabilityInwardsStochasticSoilModelProfileDifference difference = model.Update(otherModel);
+
+ // Assert
+ Assert.AreEqual(1, otherModel.StochasticSoilProfiles.Count);
+ Assert.AreEqual(expectedAddedProfile, otherModel.StochasticSoilProfiles[0]);
+
+ CollectionAssert.AreEqual(new[]
+ {
+ expectedAddedProfile
+ }, difference.AddedProfiles);
+ CollectionAssert.IsEmpty(difference.UpdatedProfiles);
+ CollectionAssert.IsEmpty(difference.RemovedProfiles);
+ }
+
+ [Test]
+ public void Update_ModelWithUpdatedProfile_ProfileUpdated()
+ {
+ // Setup
+ const string profileName = "A";
+ var expectedUpdatedProfile = new MacroStabilityInwardsStochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 3)
+ {
+ SoilProfile = new MacroStabilityInwardsSoilProfile1D(profileName, -2, CreateLayers1D(), SoilProfileType.SoilProfile1D, -5)
+ };
+ MacroStabilityInwardsStochasticSoilModel model = CreateEmptyModel();
+ model.StochasticSoilProfiles.Add(expectedUpdatedProfile);
+ MacroStabilityInwardsStochasticSoilModel otherModel = CreateEmptyModel();
+ otherModel.StochasticSoilProfiles.Add(new MacroStabilityInwardsStochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 3)
+ {
+ SoilProfile = new MacroStabilityInwardsSoilProfile1D(profileName, -1, CreateLayers1D(), SoilProfileType.SoilProfile1D, -5)
+ });
+
+ // Call
+ MacroStabilityInwardsStochasticSoilModelProfileDifference difference = model.Update(otherModel);
+
+ // Assert
+ Assert.AreEqual(1, otherModel.StochasticSoilProfiles.Count);
+ Assert.AreEqual(expectedUpdatedProfile, otherModel.StochasticSoilProfiles[0]);
+
+ CollectionAssert.IsEmpty(difference.AddedProfiles);
+ CollectionAssert.AreEqual(new[]
+ {
+ expectedUpdatedProfile
+ }, difference.UpdatedProfiles);
+ CollectionAssert.IsEmpty(difference.RemovedProfiles);
+ }
+
+ [Test]
+ public void Update_ModelWithUpdatedStochasticSoilProfile_ProfileUpdated()
+ {
+ // Setup
+ const string profileName = "A";
+ var soilProfile = new MacroStabilityInwardsSoilProfile1D(profileName, -2, CreateLayers1D(), SoilProfileType.SoilProfile1D, -5);
+ var expectedUpdatedProfile = new MacroStabilityInwardsStochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 3)
+ {
+ SoilProfile = soilProfile
+ };
+ MacroStabilityInwardsStochasticSoilModel model = CreateEmptyModel();
+ model.StochasticSoilProfiles.Add(expectedUpdatedProfile);
+
+ MacroStabilityInwardsStochasticSoilModel otherModel = CreateEmptyModel();
+ otherModel.StochasticSoilProfiles.Add(new MacroStabilityInwardsStochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, 3)
+ {
+ SoilProfile = soilProfile
+ });
+
+ // Call
+ MacroStabilityInwardsStochasticSoilModelProfileDifference difference = model.Update(otherModel);
+
+ // Assert
+ CollectionAssert.IsEmpty(difference.AddedProfiles);
+ CollectionAssert.AreEqual(new[]
+ {
+ expectedUpdatedProfile
+ }, difference.UpdatedProfiles);
+ CollectionAssert.IsEmpty(difference.RemovedProfiles);
+ }
+
+ [Test]
+ public void Update_ModelWithRemovedProfile_ProfileRemoved()
+ {
+ // Setup
+ const string profileName = "A";
+ var soilProfile = new MacroStabilityInwardsSoilProfile1D(profileName, -2, CreateLayers1D(), SoilProfileType.SoilProfile1D, -5);
+ var expectedRemovedProfile = new MacroStabilityInwardsStochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 3)
+ {
+ SoilProfile = soilProfile
+ };
+ MacroStabilityInwardsStochasticSoilModel model = CreateEmptyModel();
+ model.StochasticSoilProfiles.Add(expectedRemovedProfile);
+
+ MacroStabilityInwardsStochasticSoilModel otherModel = CreateEmptyModel();
+
+ // Call
+ MacroStabilityInwardsStochasticSoilModelProfileDifference difference = model.Update(otherModel);
+
+ // Assert
+ CollectionAssert.IsEmpty(difference.AddedProfiles);
+ CollectionAssert.IsEmpty(difference.UpdatedProfiles);
+ CollectionAssert.AreEqual(new[]
+ {
+ expectedRemovedProfile
+ }, difference.RemovedProfiles);
+ }
+
+ [Test]
+ public void Update_ModelWithRemovedProfileSameNameOtherType_ProfileRemoved()
+ {
+ // Setup
+ const string profileName = "A";
+ var soilProfile = new MacroStabilityInwardsSoilProfile1D(profileName, -2, CreateLayers1D(), SoilProfileType.SoilProfile1D, -5);
+ var expectedRemovedProfile = new MacroStabilityInwardsStochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 3)
+ {
+ SoilProfile = soilProfile
+ };
+ var newProfile = new MacroStabilityInwardsStochasticSoilProfile(0.2, SoilProfileType.SoilProfile2D, 3)
+ {
+ SoilProfile = new MacroStabilityInwardsSoilProfile2D(profileName, CreateLayers2D(), SoilProfileType.SoilProfile2D, -5)
+ };
+ MacroStabilityInwardsStochasticSoilModel model = CreateEmptyModel();
+ model.StochasticSoilProfiles.Add(expectedRemovedProfile);
+
+ MacroStabilityInwardsStochasticSoilModel otherModel = CreateEmptyModel();
+ otherModel.StochasticSoilProfiles.Add(newProfile);
+
+ // Call
+ MacroStabilityInwardsStochasticSoilModelProfileDifference difference = model.Update(otherModel);
+
+ // Assert
+ CollectionAssert.AreEqual(new[]
+ {
+ newProfile
+ }, difference.AddedProfiles);
+ CollectionAssert.IsEmpty(difference.UpdatedProfiles);
+ CollectionAssert.AreEqual(new[]
+ {
+ expectedRemovedProfile
+ }, difference.RemovedProfiles);
+ }
+
+ [Test]
+ public void Update_WithOtherModel_PropertiesUpdated()
+ {
+ // Setup
+ const string equalProfileName = "nameA";
+ MacroStabilityInwardsStochasticSoilModel model = CreateEmptyModel();
+
+ var stochasticProfileA = new MacroStabilityInwardsStochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, -11)
+ {
+ SoilProfile = CreateMacroStabilityInwardsSoilProfile1D(equalProfileName)
+ };
+ var stochasticProfileB = new MacroStabilityInwardsStochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, -52)
+ {
+ SoilProfile = CreateMacroStabilityInwardsSoilProfile1D("nameB")
+ };
+ model.StochasticSoilProfiles.Add(stochasticProfileA);
+ model.StochasticSoilProfiles.Add(stochasticProfileB);
+
+ const string otherName = "other name";
+ var otherModel = new MacroStabilityInwardsStochasticSoilModel(otherName);
+
+ 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, SoilProfileType.SoilProfile1D, -1)
+ {
+ SoilProfile = new MacroStabilityInwardsSoilProfile1D(equalProfileName, -1, new[]
+ {
+ new MacroStabilityInwardsSoilLayer1D(0)
+ }, SoilProfileType.SoilProfile1D, -1)
+ };
+ var otherStochasticProfileB = new MacroStabilityInwardsStochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, -2)
+ {
+ SoilProfile = CreateMacroStabilityInwardsSoilProfile1D("other profile name")
+ };
+ otherModel.StochasticSoilProfiles.Add(otherStochasticProfileA);
+ otherModel.StochasticSoilProfiles.Add(otherStochasticProfileB);
+
+ // Call
+ MacroStabilityInwardsStochasticSoilModelProfileDifference difference = model.Update(otherModel);
+
+ // Assert
+ Assert.AreEqual(otherName, model.Name);
+ Assert.AreSame(otherPointA, model.Geometry[0]);
+ Assert.AreSame(otherPointB, model.Geometry[1]);
+ Assert.AreEqual(2, model.StochasticSoilProfiles.Count);
+ Assert.AreSame(stochasticProfileA, model.StochasticSoilProfiles[0]);
+ Assert.AreSame(otherStochasticProfileA.SoilProfile, model.StochasticSoilProfiles[0].SoilProfile);
+ Assert.AreNotSame(stochasticProfileB, model.StochasticSoilProfiles[1]);
+ Assert.AreSame(otherStochasticProfileB.SoilProfile, model.StochasticSoilProfiles[1].SoilProfile);
+
+ CollectionAssert.AreEqual(new[]
+ {
+ stochasticProfileA
+ }, difference.UpdatedProfiles);
+ CollectionAssert.AreEqual(new[]
+ {
+ stochasticProfileB
+ }, difference.RemovedProfiles);
+ CollectionAssert.AreEqual(new[]
+ {
+ otherStochasticProfileB
+ }, difference.AddedProfiles);
+ }
+
+ [Test]
+ public void Update_ModelsWithAddedProfilesWithSameNames_ThrowsInvalidOperationException()
+ {
+ // Setup
+ var addedProfile = new MacroStabilityInwardsStochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 3)
+ {
+ SoilProfile = new TestMacroStabilityInwardsSoilProfile1D()
+ };
+ MacroStabilityInwardsStochasticSoilModel otherModel = CreateEmptyModel();
+ otherModel.StochasticSoilProfiles.Add(addedProfile);
+
+ var existingProfile = new MacroStabilityInwardsStochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 3)
+ {
+ SoilProfile = new TestMacroStabilityInwardsSoilProfile1D()
+ };
+ MacroStabilityInwardsStochasticSoilModel model = CreateEmptyModel();
+ model.StochasticSoilProfiles.Add(existingProfile);
+ model.StochasticSoilProfiles.Add(existingProfile);
+
+ // Call
+ TestDelegate call = () => model.Update(otherModel);
+
+ // Assert
+ Assert.Throws(call);
+
+ Assert.AreEqual(1, otherModel.StochasticSoilProfiles.Count);
+ Assert.AreEqual(addedProfile, otherModel.StochasticSoilProfiles[0]);
+
+ Assert.AreEqual(2, model.StochasticSoilProfiles.Count);
+ CollectionAssert.AreEqual(new[]
+ {
+ existingProfile,
+ existingProfile
+ }, model.StochasticSoilProfiles);
+ }
+
+ [Test]
+ [TestCase("")]
+ [TestCase("some name")]
+ public void ToString_WithName_ReturnsName(string name)
+ {
+ // Setup
+ var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel(name);
+
+ // Call & Assert
+ Assert.AreEqual(name, stochasticSoilModel.ToString());
+ }
+
+ private static ISoilProfile CreateMacroStabilityInwardsSoilProfile1D(string name)
+ {
+ return new MacroStabilityInwardsSoilProfile1D(name, 0.0, new Collection
+ {
+ new MacroStabilityInwardsSoilLayer1D(0.0)
+ {
+ Properties =
+ {
+ IsAquifer = true
+ }
+ }
+ }, SoilProfileType.SoilProfile1D, 0);
+ }
+
+ private class TestSoilProfile : ISoilProfile
+ {
+ public string Name { get; } = "";
+ }
+
+ private static IEnumerable CreateLayers1D()
+ {
+ return new[]
+ {
+ new MacroStabilityInwardsSoilLayer1D(2)
+ };
+ }
+
+ private static IEnumerable CreateLayers2D()
+ {
+ var outerRing = new Ring(new[]
+ {
+ new Point2D(3, 2),
+ new Point2D(3, 5)
+ });
+ return new[]
+ {
+ new MacroStabilityInwardsSoilLayer2D(outerRing, Enumerable.Empty().ToArray())
+ };
+ }
+
+ private static MacroStabilityInwardsStochasticSoilModel CreateEmptyModel()
+ {
+ var model = new MacroStabilityInwardsStochasticSoilModel("name");
+ return model;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilProfileTest.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilProfileTest.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsStochasticSoilProfileTest.cs (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -0,0 +1,355 @@
+// 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 Core.Common.Base;
+using Core.Common.TestUtil;
+using NUnit.Framework;
+using Ringtoets.MacroStabilityInwards.Data.SoilProfile;
+using Ringtoets.MacroStabilityInwards.Primitives;
+
+namespace Ringtoets.MacroStabilityInwards.Data.Test.SoilProfile
+{
+ [TestFixture]
+ public class MacroStabilityInwardsStochasticSoilProfileTest
+ {
+ private static readonly Random profileIdRandom = new Random(32);
+
+ [Test]
+ [TestCase(0.1, SoilProfileType.SoilProfile1D, 123L)]
+ [TestCase(0.26, SoilProfileType.SoilProfile2D, 123L)]
+ public void Constructor_WithValidProbabilities_ExpectedValues(double probability, SoilProfileType soilProfileType, long soilProfileId)
+ {
+ // Call
+ var stochasticSoilProfileProbability = new MacroStabilityInwardsStochasticSoilProfile(probability, soilProfileType, soilProfileId);
+
+ // Assert
+ Assert.IsInstanceOf(stochasticSoilProfileProbability);
+ Assert.AreEqual(probability, stochasticSoilProfileProbability.Probability);
+ Assert.AreEqual(soilProfileType, stochasticSoilProfileProbability.SoilProfileType);
+ Assert.AreEqual(soilProfileId, stochasticSoilProfileProbability.SoilProfileId);
+ }
+
+ [Test]
+ [SetCulture("nl-NL")]
+ [TestCase(12.5)]
+ [TestCase(1 + 1e-6)]
+ [TestCase(0 - 1e-6)]
+ [TestCase(-66.3)]
+ [TestCase(double.NaN)]
+ public void Constructor_WithInvalidProbabilities_ThrowsArgumentOutOfRangeException(double probability)
+ {
+ // Call
+ TestDelegate test = () => new MacroStabilityInwardsStochasticSoilProfile(probability, SoilProfileType.SoilProfile1D, -1);
+
+ // Assert
+ const string expectedMessage = "Het aandeel van de ondergrondschematisatie in het stochastische ondergrondmodel moet in het bereik [0,0, 1,0] liggen.";
+ TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, expectedMessage);
+ }
+
+ [Test]
+ [TestCase(0)]
+ [TestCase(0.23)]
+ [TestCase(0.41)]
+ public void AddProbability_DifferentValues_ProbabilityIncreasedAsExpected(double probabilityToAdd)
+ {
+ // Setup
+ double startProbability = new Random(21).NextDouble() * 0.5;
+ var profile = new MacroStabilityInwardsStochasticSoilProfile(startProbability, SoilProfileType.SoilProfile1D, -1);
+
+ // Call
+ profile.AddProbability(probabilityToAdd);
+
+ // Assert
+ Assert.AreEqual(startProbability + probabilityToAdd, profile.Probability);
+ }
+
+ [Test]
+ [SetCulture("nl-NL")]
+ [TestCase(double.MaxValue)]
+ [TestCase(double.MinValue)]
+ [TestCase(1.0)]
+ [TestCase(-1.0)]
+ [TestCase(double.NaN)]
+ public void AddProbability_DifferentValuesMakingProbabilityInvalid_ThrowsArgumentOutOfRangeException(double probabilityToAdd)
+ {
+ // Setup
+ double startProbability = new Random(21).NextDouble() * 0.5;
+ var profile = new MacroStabilityInwardsStochasticSoilProfile(startProbability, SoilProfileType.SoilProfile1D, -1);
+
+ // Call
+ TestDelegate test = () => profile.AddProbability(probabilityToAdd);
+
+ // Assert
+ const string expectedMessage = "Het aandeel van de ondergrondschematisatie in het stochastische ondergrondmodel moet in het bereik [0,0, 1,0] liggen.";
+ TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, expectedMessage);
+ Assert.AreEqual(startProbability, profile.Probability);
+ }
+
+ [Test]
+ public void Update_WithNullProfile_ThrowsArgumentNullException()
+ {
+ // Setup
+ var stochasticProfile = new MacroStabilityInwardsStochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0);
+
+ // Call
+ TestDelegate test = () => stochasticProfile.Update(null);
+
+ // Assert
+ string paramName = Assert.Throws(test).ParamName;
+ Assert.AreEqual("fromProfile", paramName);
+ }
+
+ [Test]
+ [TestCaseSource(nameof(StochasticProfileUnequalCombinations))]
+ public void Update_WithValidProfile_UpdatesProperties(MacroStabilityInwardsStochasticSoilProfile stochasticProfile, MacroStabilityInwardsStochasticSoilProfile otherStochasticProfile)
+ {
+ // Call
+ bool updated = stochasticProfile.Update(otherStochasticProfile);
+
+ // Assert
+ Assert.IsTrue(updated);
+ Assert.AreEqual(otherStochasticProfile.Probability, stochasticProfile.Probability);
+ Assert.AreEqual(otherStochasticProfile.SoilProfileType, stochasticProfile.SoilProfileType);
+ Assert.AreSame(otherStochasticProfile.SoilProfile, stochasticProfile.SoilProfile);
+ }
+
+ [Test]
+ public void Update_WithEqualProfile_ReturnsFalse()
+ {
+ // Setup
+ const double probability = 1.0;
+ var profile = new TestSoilProfile();
+ var stochasticProfile = new MacroStabilityInwardsStochasticSoilProfile(probability, SoilProfileType.SoilProfile1D, 0)
+ {
+ SoilProfile = profile
+ };
+
+ var otherStochasticProfile = new MacroStabilityInwardsStochasticSoilProfile(probability, SoilProfileType.SoilProfile1D, 0)
+ {
+ SoilProfile = profile
+ };
+
+ // Precondition
+ Assert.AreEqual(stochasticProfile, otherStochasticProfile);
+
+ // Call
+ bool updated = stochasticProfile.Update(otherStochasticProfile);
+
+ // Assert
+ Assert.IsFalse(updated);
+ Assert.AreEqual(probability, stochasticProfile.Probability);
+ Assert.AreSame(profile, stochasticProfile.SoilProfile);
+ }
+
+ [Test]
+ public void Equals_OtherType_ReturnsFalse()
+ {
+ // Setup
+ var stochasticProfile = new MacroStabilityInwardsStochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0);
+
+ // Call
+ bool areEqual = stochasticProfile.Equals(new object());
+
+ // Assert
+ Assert.IsFalse(areEqual);
+ }
+
+ [Test]
+ public void Equals_Null_ReturnsFalse()
+ {
+ // Setup
+ var stochasticProfile = new MacroStabilityInwardsStochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0);
+
+ // Call
+ bool areEqual = stochasticProfile.Equals(null);
+
+ // Assert
+ Assert.IsFalse(areEqual);
+ }
+
+ [Test]
+ [TestCaseSource(nameof(StochasticProfileCombinations))]
+ public void Equals_DifferentScenarios_ReturnsExpectedResult(MacroStabilityInwardsStochasticSoilProfile profile, MacroStabilityInwardsStochasticSoilProfile otherProfile, bool expectedEqual)
+ {
+ // Call
+ bool areEqualOne = profile.Equals(otherProfile);
+ bool areEqualTwo = otherProfile.Equals(profile);
+
+ // Assert
+ Assert.AreEqual(expectedEqual, areEqualOne);
+ Assert.AreEqual(expectedEqual, areEqualTwo);
+ }
+
+ [Test]
+ public void GetHashCode_EqualStochasticSoilProfile_ReturnSameHashCode()
+ {
+ // Setup
+ var stochasticSoilProfileA = new MacroStabilityInwardsStochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 234);
+ var stochasticSoilProfileB = new MacroStabilityInwardsStochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 234);
+
+ // Call
+ int hashCodeOne = stochasticSoilProfileA.GetHashCode();
+ int hashCodeTwo = stochasticSoilProfileB.GetHashCode();
+
+ // Assert
+ Assert.AreEqual(hashCodeOne, hashCodeTwo);
+ }
+
+ [Test]
+ public void ToString_WithProfile_ReturnsToStringResultOfProfile()
+ {
+ // Setup
+ var profile = new TestSoilProfile();
+ var stochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0)
+ {
+ SoilProfile = profile
+ };
+
+ // Call
+ string text = stochasticSoilProfile.ToString();
+
+ // Assert
+ Assert.AreEqual(profile.ToString(), text);
+ }
+
+ private static TestCaseData[] StochasticProfileUnequalCombinations()
+ {
+ var stochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 0);
+ var otherStochasticSoilProfileA = new MacroStabilityInwardsStochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, 0);
+ var otherStochasticSoilProfileB = new MacroStabilityInwardsStochasticSoilProfile(1.0, SoilProfileType.SoilProfile2D, 0);
+
+ return new[]
+ {
+ new TestCaseData(stochasticSoilProfile, otherStochasticSoilProfileA)
+ {
+ TestName = "Update_ProfileWithProfileA_UpdatesProperties"
+ },
+ new TestCaseData(stochasticSoilProfile, otherStochasticSoilProfileB)
+ {
+ TestName = "Update_ProfileWithProfileB_UpdatesProperties"
+ }
+ };
+ }
+
+ private static TestCaseData[] StochasticProfileCombinations()
+ {
+ MacroStabilityInwardsStochasticSoilProfile profileA = CreateRandomStochasticProfile(21);
+ MacroStabilityInwardsStochasticSoilProfile profileB = CreateRandomStochasticProfile(21);
+ MacroStabilityInwardsStochasticSoilProfile profileC = CreateRandomStochasticProfile(73);
+ MacroStabilityInwardsStochasticSoilProfile profileD = CreateRandomStochasticProfile(21);
+ var profileE = new MacroStabilityInwardsStochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, 25);
+ var profileF = new MacroStabilityInwardsStochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, 45);
+ var profileG = new MacroStabilityInwardsStochasticSoilProfile(0.5, SoilProfileType.SoilProfile2D, 25);
+ var profileH = new MacroStabilityInwardsStochasticSoilProfile(0.15, SoilProfileType.SoilProfile1D, 25);
+ var profileI = new MacroStabilityInwardsStochasticSoilProfile(0.15, SoilProfileType.SoilProfile1D, 25)
+ {
+ SoilProfile = CreateRandomProfile(new Random(12))
+ };
+ var profileJ = new MacroStabilityInwardsStochasticSoilProfile(0.15, SoilProfileType.SoilProfile1D, 25)
+ {
+ SoilProfile = CreateRandomProfile(new Random(32))
+ };
+
+ return new[]
+ {
+ new TestCaseData(profileA, profileB, true)
+ {
+ TestName = "Equals_ProfileAProfileB_True"
+ },
+ new TestCaseData(profileB, profileD, true)
+ {
+ TestName = "Equals_ProfileBProfileD_True"
+ },
+ new TestCaseData(profileA, profileD, true)
+ {
+ TestName = "Equals_ProfileAProfileD_True"
+ },
+ new TestCaseData(profileB, profileC, false)
+ {
+ TestName = "Equals_ProfileBProfileC_False"
+ },
+ new TestCaseData(profileA, profileC, false)
+ {
+ TestName = "Equals_ProfileAProfileC_False"
+ },
+ new TestCaseData(profileE, profileF, true)
+ {
+ TestName = "Equals_DifferentIds_True"
+ },
+ new TestCaseData(profileE, profileG, false)
+ {
+ TestName = "Equals_DifferentTypes_False"
+ },
+ new TestCaseData(profileE, profileH, false)
+ {
+ TestName = "Equals_DifferentProbability_False"
+ },
+ new TestCaseData(profileI, profileJ, false)
+ {
+ TestName = "Equals_DifferentProfile_False"
+ }
+ };
+ }
+
+ private static MacroStabilityInwardsStochasticSoilProfile CreateRandomStochasticProfile(int randomSeed)
+ {
+ var random = new Random(randomSeed);
+ return new MacroStabilityInwardsStochasticSoilProfile(random.NextDouble(), random.NextEnumValue(), profileIdRandom.Next())
+ {
+ SoilProfile = CreateRandomProfile(random)
+ };
+ }
+
+ private static TestSoilProfile CreateRandomProfile(Random random)
+ {
+ return new TestSoilProfile(GetRandomName(random));
+ }
+
+ private static string GetRandomName(Random random)
+ {
+ return new string('x', random.Next(0, 40));
+ }
+
+ private class TestSoilProfile : ISoilProfile
+ {
+ public TestSoilProfile() {}
+
+ public TestSoilProfile(string name)
+ {
+ Name = name;
+ }
+
+ public string Name { get; }
+
+ public override int GetHashCode()
+ {
+ return 0;
+ }
+
+ public override bool Equals(object obj)
+ {
+ var other = obj as ISoilProfile;
+ return other != null && Name.Equals(other.Name);
+ }
+ }
+ }
+}
\ No newline at end of file
Fisheye: Tag 78382ec129ddc7537096860680cef36f3796700d refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/SoilLayerUnderSurfaceLineTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 78382ec129ddc7537096860680cef36f3796700d refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/SoilProfileUnderSurfaceLineFactoryTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 78382ec129ddc7537096860680cef36f3796700d refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/SoilProfileUnderSurfaceLineTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 78382ec129ddc7537096860680cef36f3796700d refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/StochasticSoilModelCollectionTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 78382ec129ddc7537096860680cef36f3796700d refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/StochasticSoilModelExtensionsTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 78382ec129ddc7537096860680cef36f3796700d refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/StochasticSoilModelTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 78382ec129ddc7537096860680cef36f3796700d refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/StochasticSoilProfileTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/TestStochasticSoilModelTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/TestStochasticSoilModelTest.cs (.../TestStochasticSoilModelTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/TestStochasticSoilModelTest.cs (.../TestStochasticSoilModelTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -35,7 +35,7 @@
var model = new TestStochasticSoilModel();
// Assert
- Assert.IsInstanceOf(model);
+ Assert.IsInstanceOf(model);
Assert.IsEmpty(model.Name);
Assert.AreEqual(2, model.StochasticSoilProfiles.Count);
CollectionAssert.AreEquivalent(new[]
@@ -56,7 +56,7 @@
var model = new TestStochasticSoilModel(name);
// Assert
- Assert.IsInstanceOf(model);
+ Assert.IsInstanceOf(model);
Assert.AreEqual(name, model.Name);
Assert.AreEqual(2, model.StochasticSoilProfiles.Count);
CollectionAssert.AreEquivalent(new[]
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsCalculationScenarioFactory.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsCalculationScenarioFactory.cs (.../MacroStabilityInwardsCalculationScenarioFactory.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsCalculationScenarioFactory.cs (.../MacroStabilityInwardsCalculationScenarioFactory.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -134,7 +134,7 @@
{
const double bottom = 1.12;
const double top = 10.56;
- var stochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0)
+ var stochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D(string.Empty, 0.0, new[]
{
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsInputFactory.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsInputFactory.cs (.../MacroStabilityInwardsInputFactory.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsInputFactory.cs (.../MacroStabilityInwardsInputFactory.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -47,7 +47,7 @@
new Point3D(0, 0, thicknessCoverageLayer),
new Point3D(1.0, 0, thicknessCoverageLayer)
});
- var stochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0)
+ var stochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D(string.Empty, -thicknessAquiferLayer, new[]
{
@@ -88,7 +88,7 @@
new Point3D(0, 0, 0.0),
new Point3D(1.0, 0, 0.0)
});
- var stochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0)
+ var stochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D(string.Empty, -thicknessAquiferLayer, new[]
{
@@ -123,7 +123,7 @@
new Point3D(0, 0, surfaceLineTopLevel),
new Point3D(1.0, 0, surfaceLineTopLevel)
});
- var stochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0)
+ var stochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D(string.Empty, 0, new[]
{
@@ -171,7 +171,7 @@
new Point3D(0, 0, 3.3),
new Point3D(1.0, 0, 3.3)
});
- var stochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0)
+ var stochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D(string.Empty, 0, new[]
{
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsTestDataGenerator.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsTestDataGenerator.cs (.../MacroStabilityInwardsTestDataGenerator.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsTestDataGenerator.cs (.../MacroStabilityInwardsTestDataGenerator.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -145,8 +145,8 @@
{
HydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, "PUNT_KAT_18", 0, 0),
SurfaceLine = surfaceLine,
- StochasticSoilModel = new StochasticSoilModel("PK001_0001_Macrostabiliteit"),
- StochasticSoilProfile = new StochasticSoilProfile(0, SoilProfileType.SoilProfile1D, 0)
+ StochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("PK001_0001_Macrostabiliteit"),
+ StochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(0, SoilProfileType.SoilProfile1D, 0)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D("W1-6_0_1D1", 0, new[]
{
@@ -230,7 +230,7 @@
surfaceLine1,
surfaceLine2
}, "some/path/to/surfacelines");
- var stochasticSoilModel1 = new StochasticSoilModel("A")
+ var stochasticSoilModel1 = new MacroStabilityInwardsStochasticSoilModel("A")
{
Geometry =
{
@@ -239,10 +239,10 @@
},
StochasticSoilProfiles =
{
- new StochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
+ new MacroStabilityInwardsStochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
}
};
- var stochasticSoilModel2 = new StochasticSoilModel("C")
+ var stochasticSoilModel2 = new MacroStabilityInwardsStochasticSoilModel("C")
{
Geometry =
{
@@ -251,7 +251,7 @@
},
StochasticSoilProfiles =
{
- new StochasticSoilProfile(1.0, SoilProfileType.SoilProfile2D, 2)
+ new MacroStabilityInwardsStochasticSoilProfile(1.0, SoilProfileType.SoilProfile2D, 2)
}
};
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsTestDataGeneratorHelper.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsTestDataGeneratorHelper.cs (.../MacroStabilityInwardsTestDataGeneratorHelper.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsTestDataGeneratorHelper.cs (.../MacroStabilityInwardsTestDataGeneratorHelper.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -62,7 +62,7 @@
}
///
- /// Asserts that the contains .
+ /// Asserts that the contains .
///
/// The failure mechanism to assert.
public static void AssertHasStochasticSoilModels(MacroStabilityInwardsFailureMechanism failureMechanism)
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/TestStochasticSoilModel.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/TestStochasticSoilModel.cs (.../TestStochasticSoilModel.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/TestStochasticSoilModel.cs (.../TestStochasticSoilModel.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -26,9 +26,9 @@
namespace Ringtoets.MacroStabilityInwards.Data.TestUtil
{
///
- /// for testing purposes.
+ /// for testing purposes.
///
- public class TestStochasticSoilModel : StochasticSoilModel
+ public class TestStochasticSoilModel : MacroStabilityInwardsStochasticSoilModel
{
///
/// Creates a new instance of .
@@ -38,11 +38,11 @@
{
StochasticSoilProfiles.AddRange(new[]
{
- new StochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, 0)
+ new MacroStabilityInwardsStochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, 0)
{
SoilProfile = new TestMacroStabilityInwardsSoilProfile1D("A")
},
- new StochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, 0)
+ new MacroStabilityInwardsStochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, 0)
{
SoilProfile = new TestMacroStabilityInwardsSoilProfile1D("B")
}
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Factories/MacroStabilityInwardsMapDataFeaturesFactoryTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Factories/MacroStabilityInwardsMapDataFeaturesFactoryTest.cs (.../MacroStabilityInwardsMapDataFeaturesFactoryTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Factories/MacroStabilityInwardsMapDataFeaturesFactoryTest.cs (.../MacroStabilityInwardsMapDataFeaturesFactoryTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -108,7 +108,7 @@
public void CreateStochasticSoilModelFeatures_NoStochasticSoilModels_ReturnsEmptyFeaturesArray()
{
// Call
- MapFeature[] features = MacroStabilityInwardsMapDataFeaturesFactory.CreateStochasticSoilModelFeatures(new StochasticSoilModel[0]);
+ MapFeature[] features = MacroStabilityInwardsMapDataFeaturesFactory.CreateStochasticSoilModelFeatures(new MacroStabilityInwardsStochasticSoilModel[0]);
// Assert
CollectionAssert.IsEmpty(features);
@@ -130,8 +130,8 @@
};
var stochasticSoilModels = new[]
{
- new StochasticSoilModel("StochasticSoilModelName1"),
- new StochasticSoilModel("StochasticSoilModelName2")
+ new MacroStabilityInwardsStochasticSoilModel("StochasticSoilModelName1"),
+ new MacroStabilityInwardsStochasticSoilModel("StochasticSoilModelName2")
};
stochasticSoilModels[0].Geometry.AddRange(pointsOne);
stochasticSoilModels[1].Geometry.AddRange(pointsTwo);
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/MacroStabilityInwardsCalculationConfigurationHelperTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/MacroStabilityInwardsCalculationConfigurationHelperTest.cs (.../MacroStabilityInwardsCalculationConfigurationHelperTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/MacroStabilityInwardsCalculationConfigurationHelperTest.cs (.../MacroStabilityInwardsCalculationConfigurationHelperTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -42,7 +42,7 @@
public void GetStochasticSoilModelsForSurfaceLine_SurfaceLineIntersectingSoilModel_ReturnSoilModel()
{
// Setup
- var soilProfile1 = new StochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1)
+ var soilProfile1 = new MacroStabilityInwardsStochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D("Profile 1", -10.0, new[]
{
@@ -51,7 +51,7 @@
new MacroStabilityInwardsSoilLayer1D(1.0)
}, SoilProfileType.SoilProfile1D, 1)
};
- var soilProfile2 = new StochasticSoilProfile(0.7, SoilProfileType.SoilProfile1D, 2)
+ var soilProfile2 = new MacroStabilityInwardsStochasticSoilProfile(0.7, SoilProfileType.SoilProfile1D, 2)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D("Profile 2", -8.0, new[]
{
@@ -61,7 +61,7 @@
}, SoilProfileType.SoilProfile1D, 2)
};
- var soilModel = new StochasticSoilModel("A");
+ var soilModel = new MacroStabilityInwardsStochasticSoilModel("A");
soilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
@@ -72,7 +72,7 @@
soilProfile1,
soilProfile2
});
- StochasticSoilModel[] availableSoilModels =
+ MacroStabilityInwardsStochasticSoilModel[] availableSoilModels =
{
soilModel
};
@@ -86,12 +86,12 @@
});
// Call
- IEnumerable result = MacroStabilityInwardsCalculationConfigurationHelper.GetStochasticSoilModelsForSurfaceLine(
+ IEnumerable result = MacroStabilityInwardsCalculationConfigurationHelper.GetStochasticSoilModelsForSurfaceLine(
surfaceLine,
availableSoilModels);
// Assert
- StochasticSoilModel[] expected =
+ MacroStabilityInwardsStochasticSoilModel[] expected =
{
soilModel
};
@@ -115,30 +115,30 @@
new MacroStabilityInwardsSoilLayer1D(4.0)
}, SoilProfileType.SoilProfile1D, 2);
- var soilModel = new StochasticSoilModel("A");
+ var soilModel = new MacroStabilityInwardsStochasticSoilModel("A");
soilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
new Point2D(5.0, 0.0)
});
soilModel.StochasticSoilProfiles.AddRange(new[]
{
- new StochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1)
+ new MacroStabilityInwardsStochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1)
{
SoilProfile = soilProfile1
},
- new StochasticSoilProfile(0.7, SoilProfileType.SoilProfile1D, 2)
+ new MacroStabilityInwardsStochasticSoilProfile(0.7, SoilProfileType.SoilProfile1D, 2)
{
SoilProfile = soilProfile2
}
});
- StochasticSoilModel[] availableSoilModels =
+ MacroStabilityInwardsStochasticSoilModel[] availableSoilModels =
{
soilModel
};
// Call
- IEnumerable result = MacroStabilityInwardsCalculationConfigurationHelper.GetStochasticSoilModelsForSurfaceLine(
+ IEnumerable result = MacroStabilityInwardsCalculationConfigurationHelper.GetStochasticSoilModelsForSurfaceLine(
null,
availableSoilModels);
@@ -159,9 +159,9 @@
});
// Call
- IEnumerable result = MacroStabilityInwardsCalculationConfigurationHelper.GetStochasticSoilModelsForSurfaceLine(
+ IEnumerable result = MacroStabilityInwardsCalculationConfigurationHelper.GetStochasticSoilModelsForSurfaceLine(
surfaceLine,
- Enumerable.Empty());
+ Enumerable.Empty());
// Assert
CollectionAssert.IsEmpty(result);
@@ -171,7 +171,7 @@
public void GetStochasticSoilModelsForSurfaceLine_NoSoilProfiles_ReturnEmpty()
{
// Setup
- var soilModel = new StochasticSoilModel("A");
+ var soilModel = new MacroStabilityInwardsStochasticSoilModel("A");
soilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
@@ -192,7 +192,7 @@
});
// Call
- IEnumerable result = MacroStabilityInwardsCalculationConfigurationHelper.GetStochasticSoilModelsForSurfaceLine(
+ IEnumerable result = MacroStabilityInwardsCalculationConfigurationHelper.GetStochasticSoilModelsForSurfaceLine(
surfaceLine,
availableSoilModels);
@@ -217,24 +217,24 @@
new MacroStabilityInwardsSoilLayer1D(4.0)
}, SoilProfileType.SoilProfile1D, 2);
- var soilModel = new StochasticSoilModel("A");
+ var soilModel = new MacroStabilityInwardsStochasticSoilModel("A");
soilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
new Point2D(5.0, 0.0)
});
soilModel.StochasticSoilProfiles.AddRange(new[]
{
- new StochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1)
+ new MacroStabilityInwardsStochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1)
{
SoilProfile = soilProfile1
},
- new StochasticSoilProfile(0.7, SoilProfileType.SoilProfile1D, 2)
+ new MacroStabilityInwardsStochasticSoilProfile(0.7, SoilProfileType.SoilProfile1D, 2)
{
SoilProfile = soilProfile2
}
});
- StochasticSoilModel[] availableSoilModels =
+ MacroStabilityInwardsStochasticSoilModel[] availableSoilModels =
{
soilModel
};
@@ -248,7 +248,7 @@
});
// Call
- IEnumerable result = MacroStabilityInwardsCalculationConfigurationHelper.GetStochasticSoilModelsForSurfaceLine(surfaceLine, availableSoilModels);
+ IEnumerable result = MacroStabilityInwardsCalculationConfigurationHelper.GetStochasticSoilModelsForSurfaceLine(surfaceLine, availableSoilModels);
// Assert
CollectionAssert.IsEmpty(result);
@@ -258,7 +258,7 @@
public void GetStochasticSoilModelsForSurfaceLine_SurfaceLineOverlappingSoilModels_ReturnSoilModels()
{
// Setup
- var soilProfile1 = new StochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
+ var soilProfile1 = new MacroStabilityInwardsStochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D("Profile 1", -10.0, new[]
{
@@ -267,7 +267,7 @@
new MacroStabilityInwardsSoilLayer1D(1.0)
}, SoilProfileType.SoilProfile1D, 1)
};
- var soilProfile2 = new StochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 2)
+ var soilProfile2 = new MacroStabilityInwardsStochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 2)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D("Profile 2", -8.0, new[]
{
@@ -278,7 +278,7 @@
};
const double y = 1.1;
- var soilModel1 = new StochasticSoilModel("A");
+ var soilModel1 = new MacroStabilityInwardsStochasticSoilModel("A");
soilModel1.Geometry.AddRange(new[]
{
new Point2D(1.0, y),
@@ -289,7 +289,7 @@
soilProfile1
});
- var soilModel2 = new StochasticSoilModel("A");
+ var soilModel2 = new MacroStabilityInwardsStochasticSoilModel("A");
soilModel2.Geometry.AddRange(new[]
{
new Point2D(3.0, y),
@@ -314,12 +314,12 @@
});
// Call
- IEnumerable result = MacroStabilityInwardsCalculationConfigurationHelper.GetStochasticSoilModelsForSurfaceLine(
+ IEnumerable result = MacroStabilityInwardsCalculationConfigurationHelper.GetStochasticSoilModelsForSurfaceLine(
surfaceLine,
availableSoilModels);
// Assert
- StochasticSoilModel[] expected =
+ MacroStabilityInwardsStochasticSoilModel[] expected =
{
soilModel1,
soilModel2
@@ -337,7 +337,7 @@
// Call
TestDelegate test = () => MacroStabilityInwardsCalculationConfigurationHelper.GenerateCalculationItemsStructure(
null,
- Enumerable.Empty(),
+ Enumerable.Empty(),
new GeneralMacroStabilityInwardsInput());
// Assert
@@ -365,7 +365,7 @@
// Call
TestDelegate test = () => MacroStabilityInwardsCalculationConfigurationHelper.GenerateCalculationItemsStructure(
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
null);
// Assert
@@ -396,7 +396,7 @@
{
result = MacroStabilityInwardsCalculationConfigurationHelper.GenerateCalculationItemsStructure(
surfaceLines,
- Enumerable.Empty(),
+ Enumerable.Empty(),
new GeneralMacroStabilityInwardsInput()).ToArray();
};
@@ -417,7 +417,7 @@
public void GenerateCalculationItemsStructure_SurfaceLineIntersectingSoilModel_ReturnOneGroupWithTwoCalculations()
{
// Setup
- var soilProfile1 = new StochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1)
+ var soilProfile1 = new MacroStabilityInwardsStochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D("Profile 1", -10.0, new[]
{
@@ -426,7 +426,7 @@
new MacroStabilityInwardsSoilLayer1D(1.0)
}, SoilProfileType.SoilProfile1D, 1)
};
- var soilProfile2 = new StochasticSoilProfile(0.7, SoilProfileType.SoilProfile1D, 2)
+ var soilProfile2 = new MacroStabilityInwardsStochasticSoilProfile(0.7, SoilProfileType.SoilProfile1D, 2)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D("Profile 2", -8.0, new[]
{
@@ -436,7 +436,7 @@
}, SoilProfileType.SoilProfile1D, 2)
};
- var soilModel = new StochasticSoilModel("A");
+ var soilModel = new MacroStabilityInwardsStochasticSoilModel("A");
soilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
@@ -498,7 +498,7 @@
public void GenerateCalculationItemsStructure_NoSoilProfiles_LogWarning()
{
// Setup
- var soilModel = new StochasticSoilModel("A");
+ var soilModel = new MacroStabilityInwardsStochasticSoilModel("A");
soilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
@@ -559,24 +559,24 @@
new MacroStabilityInwardsSoilLayer1D(4.0)
}, SoilProfileType.SoilProfile1D, 2);
- var soilModel = new StochasticSoilModel("A");
+ var soilModel = new MacroStabilityInwardsStochasticSoilModel("A");
soilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
new Point2D(5.0, 0.0)
});
soilModel.StochasticSoilProfiles.AddRange(new[]
{
- new StochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1)
+ new MacroStabilityInwardsStochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1)
{
SoilProfile = soilProfile1
},
- new StochasticSoilProfile(0.7, SoilProfileType.SoilProfile1D, 2)
+ new MacroStabilityInwardsStochasticSoilProfile(0.7, SoilProfileType.SoilProfile1D, 2)
{
SoilProfile = soilProfile2
}
});
- StochasticSoilModel[] availableSoilModels =
+ MacroStabilityInwardsStochasticSoilModel[] availableSoilModels =
{
soilModel
};
@@ -618,7 +618,7 @@
public void GenerateCalculationItemsStructure_SurfaceLineOverlappingSoilModel_ReturnOneGroupWithProfilesFromBothSoilModels()
{
// Setup
- var soilProfile1 = new StochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
+ var soilProfile1 = new MacroStabilityInwardsStochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D("Profile 1", -10.0, new[]
{
@@ -627,7 +627,7 @@
new MacroStabilityInwardsSoilLayer1D(1.0)
}, SoilProfileType.SoilProfile1D, 1)
};
- var soilProfile2 = new StochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 2)
+ var soilProfile2 = new MacroStabilityInwardsStochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 2)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D("Profile 2", -8.0, new[]
{
@@ -638,7 +638,7 @@
};
const double y = 1.1;
- var soilModel1 = new StochasticSoilModel("A");
+ var soilModel1 = new MacroStabilityInwardsStochasticSoilModel("A");
soilModel1.Geometry.AddRange(new[]
{
new Point2D(1.0, y),
@@ -649,7 +649,7 @@
soilProfile1
});
- var soilModel2 = new StochasticSoilModel("A");
+ var soilModel2 = new MacroStabilityInwardsStochasticSoilModel("A");
soilModel2.Geometry.AddRange(new[]
{
new Point2D(3.0, y),
@@ -711,7 +711,7 @@
public void GenerateCalculationItemsStructure_SurfaceLinesEachIntersectingSoilModel_ReturnTwoGroupsWithProfilesFromIntersectingSoilModels()
{
// Setup
- var soilProfile1 = new StochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
+ var soilProfile1 = new MacroStabilityInwardsStochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D("Profile 1", -10.0, new[]
{
@@ -720,7 +720,7 @@
new MacroStabilityInwardsSoilLayer1D(1.0)
}, SoilProfileType.SoilProfile1D, 1)
};
- var soilProfile2 = new StochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 2)
+ var soilProfile2 = new MacroStabilityInwardsStochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 2)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D("Profile 2", -8.0, new[]
{
@@ -731,7 +731,7 @@
};
const double y = 1.1;
- var soilModel1 = new StochasticSoilModel("A");
+ var soilModel1 = new MacroStabilityInwardsStochasticSoilModel("A");
soilModel1.Geometry.AddRange(new[]
{
new Point2D(1.0, y),
@@ -743,7 +743,7 @@
soilProfile2
});
- var soilModel2 = new StochasticSoilModel("A");
+ var soilModel2 = new MacroStabilityInwardsStochasticSoilModel("A");
soilModel2.Geometry.AddRange(new[]
{
new Point2D(3.0, y),
@@ -826,7 +826,7 @@
public void GenerateCalculationItemsStructure_OneSurfaceLineIntersectingSoilModelOneSurfaceLineNoIntersection_ReturnOneGroupsWithProfilesAndLogOneWarning()
{
// Setup
- var soilProfile1 = new StochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
+ var soilProfile1 = new MacroStabilityInwardsStochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D("Profile 1", -10.0, new[]
{
@@ -835,7 +835,7 @@
new MacroStabilityInwardsSoilLayer1D(1.0)
}, SoilProfileType.SoilProfile1D, 1)
};
- var soilProfile2 = new StochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 2)
+ var soilProfile2 = new MacroStabilityInwardsStochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 2)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D("Profile 2", -8.0, new[]
{
@@ -846,7 +846,7 @@
};
const double y = 1.1;
- var soilModel1 = new StochasticSoilModel("A");
+ var soilModel1 = new MacroStabilityInwardsStochasticSoilModel("A");
soilModel1.Geometry.AddRange(new[]
{
new Point2D(1.0, y),
@@ -858,7 +858,7 @@
soilProfile2
});
- var soilModel2 = new StochasticSoilModel("A");
+ var soilModel2 = new MacroStabilityInwardsStochasticSoilModel("A");
soilModel2.Geometry.AddRange(new[]
{
new Point2D(3.0, y),
@@ -948,19 +948,19 @@
new MacroStabilityInwardsSoilLayer1D(4.0)
}, SoilProfileType.SoilProfile1D, 2);
- var soilModel = new StochasticSoilModel("A");
+ var soilModel = new MacroStabilityInwardsStochasticSoilModel("A");
soilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
new Point2D(5.0, 0.0)
});
soilModel.StochasticSoilProfiles.AddRange(new[]
{
- new StochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1)
+ new MacroStabilityInwardsStochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1)
{
SoilProfile = soilProfile1
},
- new StochasticSoilProfile(0.7, SoilProfileType.SoilProfile1D, 2)
+ new MacroStabilityInwardsStochasticSoilProfile(0.7, SoilProfileType.SoilProfile1D, 2)
{
SoilProfile = soilProfile2
}
@@ -1024,23 +1024,23 @@
new MacroStabilityInwardsSoilLayer1D(4.0)
}, SoilProfileType.SoilProfile1D, 2);
- var soilModel = new StochasticSoilModel("A");
+ var soilModel = new MacroStabilityInwardsStochasticSoilModel("A");
soilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
new Point2D(5.0, 0.0)
});
soilModel.StochasticSoilProfiles.AddRange(new[]
{
- new StochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1)
+ new MacroStabilityInwardsStochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1)
{
SoilProfile = soilProfile1
},
- new StochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 2)
+ new MacroStabilityInwardsStochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 2)
{
SoilProfile = soilProfile2
},
- new StochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, 3)
+ new MacroStabilityInwardsStochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, 3)
{
SoilProfile = soilProfile3
}
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PresentationObjects/MacroStabilityInwardsCalculationGroupContextTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PresentationObjects/MacroStabilityInwardsCalculationGroupContextTest.cs (.../MacroStabilityInwardsCalculationGroupContextTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PresentationObjects/MacroStabilityInwardsCalculationGroupContextTest.cs (.../MacroStabilityInwardsCalculationGroupContextTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -50,7 +50,7 @@
{
new MacroStabilityInwardsSurfaceLine(string.Empty)
};
- var soilModels = new StochasticSoilModel[]
+ var soilModels = new MacroStabilityInwardsStochasticSoilModel[]
{
new TestStochasticSoilModel()
};
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PresentationObjects/MacroStabilityInwardsContextTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PresentationObjects/MacroStabilityInwardsContextTest.cs (.../MacroStabilityInwardsContextTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PresentationObjects/MacroStabilityInwardsContextTest.cs (.../MacroStabilityInwardsContextTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -89,7 +89,7 @@
// Call
TestDelegate call = () => new SimpleMacroStabilityInwardsContext(new ObservableObject(),
null,
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -131,7 +131,7 @@
// Call
TestDelegate call = () => new SimpleMacroStabilityInwardsContext(new ObservableObject(),
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
null,
assessmentSection);
@@ -147,7 +147,7 @@
// Call
TestDelegate call = () => new SimpleMacroStabilityInwardsContext(new ObservableObject(),
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
new MacroStabilityInwardsFailureMechanism(),
null);
@@ -158,7 +158,7 @@
private class SimpleMacroStabilityInwardsContext : MacroStabilityInwardsContext where T : IObservable
{
- public SimpleMacroStabilityInwardsContext(T target, IEnumerable surfaceLines, IEnumerable stochasticSoilModels, MacroStabilityInwardsFailureMechanism macroStabilityInwardsFailureMechanism, IAssessmentSection assessmentSection)
+ public SimpleMacroStabilityInwardsContext(T target, IEnumerable surfaceLines, IEnumerable stochasticSoilModels, MacroStabilityInwardsFailureMechanism macroStabilityInwardsFailureMechanism, IAssessmentSection assessmentSection)
: base(target, surfaceLines, stochasticSoilModels, macroStabilityInwardsFailureMechanism, assessmentSection) {}
}
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PresentationObjects/StochasticSoilModelCollectionContextTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PresentationObjects/StochasticSoilModelCollectionContextTest.cs (.../StochasticSoilModelCollectionContextTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PresentationObjects/StochasticSoilModelCollectionContextTest.cs (.../StochasticSoilModelCollectionContextTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -47,7 +47,7 @@
var context = new StochasticSoilModelCollectionContext(failureMechanism.StochasticSoilModels, failureMechanism, assessmentSection);
// Assert
- Assert.IsInstanceOf>(context);
+ Assert.IsInstanceOf>(context);
Assert.AreSame(failureMechanism.StochasticSoilModels, context.WrappedData);
Assert.AreSame(failureMechanism, context.FailureMechanism);
Assert.AreSame(assessmentSection, context.AssessmentSection);
@@ -62,7 +62,7 @@
var assessmentSection = mocks.Stub();
mocks.ReplayAll();
- var stochasticSoilModels = new StochasticSoilModelCollection();
+ var stochasticSoilModels = new MacroStabilityInwardsStochasticSoilModelCollection();
// Call
TestDelegate test = () => new StochasticSoilModelCollectionContext(stochasticSoilModels, null, assessmentSection);
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsInputContextPropertiesTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsInputContextPropertiesTest.cs (.../MacroStabilityInwardsInputContextPropertiesTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsInputContextPropertiesTest.cs (.../MacroStabilityInwardsInputContextPropertiesTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -95,7 +95,7 @@
var context = new MacroStabilityInwardsInputContext(calculationItem.InputParameters,
calculationItem,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -122,7 +122,7 @@
var context = new MacroStabilityInwardsInputContext(calculationItem.InputParameters,
calculationItem,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -150,7 +150,7 @@
var context = new MacroStabilityInwardsInputContext(calculationItem.InputParameters,
calculationItem,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -280,7 +280,7 @@
var context = new MacroStabilityInwardsInputContext(calculationItem.InputParameters,
calculationItem,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -341,7 +341,7 @@
var random = new Random(22);
MacroStabilityInwardsSurfaceLine surfaceLine = ValidSurfaceLine(0.0, 4.0);
- var stochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0)
+ var stochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D(string.Empty, random.NextDouble(), new[]
{
@@ -354,7 +354,7 @@
}
}, SoilProfileType.SoilProfile1D, 0)
};
- var stochasticSoilModel = new StochasticSoilModel("StochasticSoilModelName");
+ var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("StochasticSoilModelName");
stochasticSoilModel.StochasticSoilProfiles.Add(stochasticSoilProfile);
HydraulicBoundaryLocation testHydraulicBoundaryLocation = TestHydraulicBoundaryLocation.CreateDesignWaterLevelCalculated(0.0);
@@ -376,7 +376,7 @@
var context = new MacroStabilityInwardsInputContext(inputParameters,
calculationItem,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -420,7 +420,7 @@
var context = new MacroStabilityInwardsInputContext(inputParameters,
calculationItem,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -430,8 +430,8 @@
var random = new Random();
const double assessmentLevel = 0.36;
MacroStabilityInwardsSurfaceLine surfaceLine = ValidSurfaceLine(0.0, 4.0);
- StochasticSoilModel soilModel = ValidStochasticSoilModel(0.0, 4.0);
- StochasticSoilProfile soilProfile = soilModel.StochasticSoilProfiles.First();
+ MacroStabilityInwardsStochasticSoilModel soilModel = ValidStochasticSoilModel(0.0, 4.0);
+ MacroStabilityInwardsStochasticSoilProfile soilProfile = soilModel.StochasticSoilProfiles.First();
const MacroStabilityInwardsDikeSoilScenario dikeSoilScenario = MacroStabilityInwardsDikeSoilScenario.SandDikeOnSand;
double slipPlaneMinimumDepth = random.Next();
double slipPlaneMinimumLength = random.Next();
@@ -475,7 +475,7 @@
public void StochasticSoilModel_SetValidValue_SetsValueAndUpdatesObservers()
{
// Setup
- StochasticSoilModel newSoilModel = ValidStochasticSoilModel(0.0, 4.0);
+ MacroStabilityInwardsStochasticSoilModel newSoilModel = ValidStochasticSoilModel(0.0, 4.0);
var calculation = new MacroStabilityInwardsCalculationScenario(new GeneralMacroStabilityInwardsInput());
// Call & Assert
@@ -486,7 +486,7 @@
public void StochasticSoilProfile_SetValidValue_SetsValueAndUpdatesObservers()
{
// Setup
- StochasticSoilProfile newSoilProfile = ValidStochasticSoilModel(0.0, 4.0).StochasticSoilProfiles.First();
+ MacroStabilityInwardsStochasticSoilProfile newSoilProfile = ValidStochasticSoilModel(0.0, 4.0).StochasticSoilProfiles.First();
var calculation = new MacroStabilityInwardsCalculationScenario(new GeneralMacroStabilityInwardsInput());
// Call & Assert
@@ -585,7 +585,7 @@
var context = new MacroStabilityInwardsInputContext(calculationItem.InputParameters,
calculationItem,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -625,7 +625,7 @@
var context = new MacroStabilityInwardsInputContext(calculationItem.InputParameters,
calculationItem,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -665,7 +665,7 @@
var context = new MacroStabilityInwardsInputContext(inputParameters,
calculationItem,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -716,7 +716,7 @@
var context = new MacroStabilityInwardsInputContext(calculationItem.InputParameters,
calculationItem,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -760,7 +760,7 @@
var context = new MacroStabilityInwardsInputContext(calculationItem.InputParameters,
calculationItem,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -807,7 +807,7 @@
var context = new MacroStabilityInwardsInputContext(inputParameters,
calculationItem,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -817,7 +817,7 @@
var properties = new MacroStabilityInwardsInputContextProperties(context, handler);
- inputParameters.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0)
+ inputParameters.StochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0)
{
SoilProfile = new TestMacroStabilityInwardsSoilProfile1D()
};
@@ -841,11 +841,11 @@
mocks.ReplayAll();
MacroStabilityInwardsSurfaceLine testSurfaceLine = ValidSurfaceLine(0, 2);
- var stochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0)
+ var stochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0)
{
SoilProfile = new TestMacroStabilityInwardsSoilProfile1D()
};
- var stochasticSoilModel = new StochasticSoilModel("StochasticSoilModelName");
+ var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("StochasticSoilModelName");
stochasticSoilModel.StochasticSoilProfiles.Add(stochasticSoilProfile);
var calculationItem = new MacroStabilityInwardsCalculationScenario(new GeneralMacroStabilityInwardsInput())
@@ -889,11 +889,11 @@
var assessmentSection = mocks.Stub();
mocks.ReplayAll();
- var soilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0)
+ var soilProfile = new MacroStabilityInwardsStochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0)
{
SoilProfile = new TestMacroStabilityInwardsSoilProfile1D()
};
- var stochasticSoilModel = new StochasticSoilModel("StochasticSoilModelName");
+ var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("StochasticSoilModelName");
stochasticSoilModel.StochasticSoilProfiles.Add(soilProfile);
var calculationItem = new MacroStabilityInwardsCalculationScenario(new GeneralMacroStabilityInwardsInput())
{
@@ -944,18 +944,18 @@
mocks.ReplayAll();
MacroStabilityInwardsSurfaceLine testSurfaceLine = ValidSurfaceLine(0, 2);
- var stochasticSoilProfile1 = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0)
+ var stochasticSoilProfile1 = new MacroStabilityInwardsStochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0)
{
SoilProfile = new TestMacroStabilityInwardsSoilProfile1D()
};
- var stochasticSoilModel1 = new StochasticSoilModel("StochasticSoilModel1Name");
+ var stochasticSoilModel1 = new MacroStabilityInwardsStochasticSoilModel("StochasticSoilModel1Name");
stochasticSoilModel1.StochasticSoilProfiles.Add(stochasticSoilProfile1);
- var stochasticSoilProfile2 = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0)
+ var stochasticSoilProfile2 = new MacroStabilityInwardsStochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0)
{
SoilProfile = new TestMacroStabilityInwardsSoilProfile1D()
};
- var stochasticSoilModel2 = new StochasticSoilModel("StochasticSoilModel2Name");
+ var stochasticSoilModel2 = new MacroStabilityInwardsStochasticSoilModel("StochasticSoilModel2Name");
stochasticSoilModel1.StochasticSoilProfiles.Add(stochasticSoilProfile2);
var calculationItem = new MacroStabilityInwardsCalculationScenario(new GeneralMacroStabilityInwardsInput())
@@ -974,7 +974,7 @@
var context = new MacroStabilityInwardsInputContext(inputParameters,
calculationItem,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -1037,7 +1037,7 @@
Assert.IsNull(calculation.InputParameters.SurfaceLine);
// Call
- IEnumerable soilModels = properties.GetAvailableStochasticSoilModels();
+ IEnumerable soilModels = properties.GetAvailableStochasticSoilModels();
// Assert
Assert.AreSame(context.AvailableStochasticSoilModels, soilModels);
@@ -1062,7 +1062,7 @@
var failureMechanism = new MacroStabilityInwardsFailureMechanism();
var soilModels = new[]
{
- new StochasticSoilModel("A")
+ new MacroStabilityInwardsStochasticSoilModel("A")
{
Geometry =
{
@@ -1071,10 +1071,10 @@
},
StochasticSoilProfiles =
{
- new StochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 1)
+ new MacroStabilityInwardsStochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 1)
}
},
- new StochasticSoilModel("C")
+ new MacroStabilityInwardsStochasticSoilModel("C")
{
Geometry =
{
@@ -1083,10 +1083,10 @@
},
StochasticSoilProfiles =
{
- new StochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 2)
+ new MacroStabilityInwardsStochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 2)
}
},
- new StochasticSoilModel("E")
+ new MacroStabilityInwardsStochasticSoilModel("E")
{
Geometry =
{
@@ -1095,7 +1095,7 @@
},
StochasticSoilProfiles =
{
- new StochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 3)
+ new MacroStabilityInwardsStochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 3)
}
}
};
@@ -1116,7 +1116,7 @@
Assert.IsNotNull(calculation.InputParameters.SurfaceLine);
// Call
- IEnumerable availableStochasticSoilModels = properties.GetAvailableStochasticSoilModels();
+ IEnumerable availableStochasticSoilModels = properties.GetAvailableStochasticSoilModels();
// Assert
CollectionAssert.AreEqual(new[]
@@ -1147,7 +1147,7 @@
Assert.IsNull(calculation.InputParameters.StochasticSoilModel);
// Call
- IEnumerable profiles = properties.GetAvailableStochasticSoilProfiles();
+ IEnumerable profiles = properties.GetAvailableStochasticSoilProfiles();
// Assert
CollectionAssert.IsEmpty(profiles);
@@ -1164,11 +1164,11 @@
mocks.ReplayAll();
var failureMechanism = new MacroStabilityInwardsFailureMechanism();
- var model = new StochasticSoilModel("A")
+ var model = new MacroStabilityInwardsStochasticSoilModel("A")
{
StochasticSoilProfiles =
{
- new StochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
+ new MacroStabilityInwardsStochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
}
};
var calculation = new MacroStabilityInwardsCalculationScenario(failureMechanism.GeneralInput)
@@ -1187,7 +1187,7 @@
Assert.IsNotNull(calculation.InputParameters.StochasticSoilModel);
// Call
- IEnumerable profiles = properties.GetAvailableStochasticSoilProfiles();
+ IEnumerable profiles = properties.GetAvailableStochasticSoilProfiles();
// Assert
CollectionAssert.AreEqual(model.StochasticSoilProfiles, profiles);
@@ -1240,8 +1240,8 @@
var failureMechanism = new MacroStabilityInwardsFailureMechanism();
- StochasticSoilModel soilModel = ValidStochasticSoilModel(0.0, 4.0);
- StochasticSoilProfile soilProfile = soilModel.StochasticSoilProfiles.First();
+ MacroStabilityInwardsStochasticSoilModel soilModel = ValidStochasticSoilModel(0.0, 4.0);
+ MacroStabilityInwardsStochasticSoilProfile soilProfile = soilModel.StochasticSoilProfiles.First();
var calculation = new MacroStabilityInwardsCalculationScenario(failureMechanism.GeneralInput)
{
InputParameters =
@@ -1459,7 +1459,7 @@
var context = new MacroStabilityInwardsInputContext(calculation.InputParameters, calculation,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism, assessmentSection);
var properties = new MacroStabilityInwardsInputContextProperties(context, handler);
@@ -1486,7 +1486,7 @@
var context = new MacroStabilityInwardsInputContext(calculation.InputParameters, calculation,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism, assessmentSection);
var properties = new MacroStabilityInwardsInputContextProperties(context, handler);
@@ -1522,7 +1522,7 @@
var context = new MacroStabilityInwardsInputContext(calculation.InputParameters, calculation,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism, assessmentSection);
var properties = new MacroStabilityInwardsInputContextProperties(context, handler);
@@ -1549,7 +1549,7 @@
var context = new MacroStabilityInwardsInputContext(calculation.InputParameters, calculation,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism, assessmentSection);
var properties = new MacroStabilityInwardsInputContextProperties(context, handler);
@@ -1579,7 +1579,7 @@
var context = new MacroStabilityInwardsInputContext(inputParameters,
calculation,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -1598,10 +1598,10 @@
mocks.VerifyAll();
}
- private static StochasticSoilModel ValidStochasticSoilModel(double xMin, double xMax)
+ private static MacroStabilityInwardsStochasticSoilModel ValidStochasticSoilModel(double xMin, double xMax)
{
- var stochasticSoilModel = new StochasticSoilModel("StochasticSoilModelName");
- stochasticSoilModel.StochasticSoilProfiles.Add(new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 1234)
+ var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("StochasticSoilModelName");
+ stochasticSoilModel.StochasticSoilProfiles.Add(new MacroStabilityInwardsStochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 1234)
{
SoilProfile = new TestMacroStabilityInwardsSoilProfile1D()
});
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/StochasticSoilModelCollectionPropertiesTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/StochasticSoilModelCollectionPropertiesTest.cs (.../StochasticSoilModelCollectionPropertiesTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/StochasticSoilModelCollectionPropertiesTest.cs (.../StochasticSoilModelCollectionPropertiesTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -49,14 +49,14 @@
{
// Setup
const string someFilePath = "location/to/a/file";
- var collection = new StochasticSoilModelCollection();
- collection.AddRange(Enumerable.Empty(), someFilePath);
+ var collection = new MacroStabilityInwardsStochasticSoilModelCollection();
+ collection.AddRange(Enumerable.Empty(), someFilePath);
// Call
var properties = new StochasticSoilModelCollectionProperties(collection);
// Assert
- Assert.IsInstanceOf>(properties);
+ Assert.IsInstanceOf>(properties);
Assert.AreSame(collection, properties.Data);
Assert.AreEqual(someFilePath, properties.SourcePath);
}
@@ -65,7 +65,7 @@
public void Constructor_WithData_PropertiesHaveExpectedAttributesValues()
{
// Setup
- var collection = new StochasticSoilModelCollection();
+ var collection = new MacroStabilityInwardsStochasticSoilModelCollection();
// Call
var properties = new StochasticSoilModelCollectionProperties(collection);
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/StochasticSoilModelPropertiesTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/StochasticSoilModelPropertiesTest.cs (.../StochasticSoilModelPropertiesTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/StochasticSoilModelPropertiesTest.cs (.../StochasticSoilModelPropertiesTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -45,21 +45,21 @@
var properties = new StochasticSoilModelProperties();
// Assert
- Assert.IsInstanceOf>(properties);
+ Assert.IsInstanceOf>(properties);
Assert.IsNull(properties.Data);
}
[Test]
public void GetProperties_WithData_ReturnExpectedValues()
{
// Setup
- var stochasticSoilModel = new StochasticSoilModel("Name");
+ var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("Name");
stochasticSoilModel.Geometry.Add(new Point2D(1.0, 2.0));
var soilProfile = new MacroStabilityInwardsSoilProfile1D("MacroStabilityInwardsSoilProfile", 0, new List
{
new MacroStabilityInwardsSoilLayer1D(10)
}, SoilProfileType.SoilProfile1D, 0);
- var stochasticSoilProfile = new StochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
+ var stochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
{
SoilProfile = soilProfile
};
@@ -83,13 +83,13 @@
public void Constructor_Always_PropertiesHaveExpectedAttributesValues()
{
// Setup
- var stochasticSoilModel = new StochasticSoilModel("Name");
+ var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("Name");
stochasticSoilModel.Geometry.Add(new Point2D(1.0, 2.0));
var soilProfile = new MacroStabilityInwardsSoilProfile1D("MacroStabilityInwardsSoilProfile", 0, new List
{
new MacroStabilityInwardsSoilLayer1D(10)
}, SoilProfileType.SoilProfile1D, 0);
- var stochasticSoilProfile = new StochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
+ var stochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
{
SoilProfile = soilProfile
};
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/StochasticSoilProfilePropertiesTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/StochasticSoilProfilePropertiesTest.cs (.../StochasticSoilProfilePropertiesTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/StochasticSoilProfilePropertiesTest.cs (.../StochasticSoilProfilePropertiesTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -39,7 +39,7 @@
var properties = new StochasticSoilProfileProperties();
// Assert
- Assert.IsInstanceOf>(properties);
+ Assert.IsInstanceOf>(properties);
Assert.IsNull(properties.Data);
}
@@ -80,7 +80,7 @@
};
var soilProfile = new MacroStabilityInwardsSoilProfile1D(expectedName, -5.0, layers, SoilProfileType.SoilProfile1D, 0);
- var stochasticSoilProfile = new StochasticSoilProfile(probability, SoilProfileType.SoilProfile1D, 1234L)
+ var stochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(probability, SoilProfileType.SoilProfile1D, 1234L)
{
SoilProfile = soilProfile
};
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/UITypeEditors/MacroStabilityInwardsInputContextStochasticSoilModelSelectionEditorTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/UITypeEditors/MacroStabilityInwardsInputContextStochasticSoilModelSelectionEditorTest.cs (.../MacroStabilityInwardsInputContextStochasticSoilModelSelectionEditorTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/UITypeEditors/MacroStabilityInwardsInputContextStochasticSoilModelSelectionEditorTest.cs (.../MacroStabilityInwardsInputContextStochasticSoilModelSelectionEditorTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -59,7 +59,7 @@
var input = new MacroStabilityInwardsInput(new GeneralMacroStabilityInwardsInput())
{
- StochasticSoilModel = new StochasticSoilModel("StochasticSoilModelName")
+ StochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("StochasticSoilModelName")
};
var inputContext = new MacroStabilityInwardsInputContext(input,
calculationItem,
@@ -103,11 +103,11 @@
var assessmentSection = mockRepository.Stub();
var handler = mockRepository.Stub();
- var stochasticSoilProfile = new StochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 0)
+ var stochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 0)
{
SoilProfile = new TestMacroStabilityInwardsSoilProfile1D()
};
- var stochasticSoilModel = new StochasticSoilModel("Model")
+ var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("Model")
{
Geometry =
{
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/UITypeEditors/MacroStabilityInwardsInputContextStochasticSoilProfileSelectionEditorTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/UITypeEditors/MacroStabilityInwardsInputContextStochasticSoilProfileSelectionEditorTest.cs (.../MacroStabilityInwardsInputContextStochasticSoilProfileSelectionEditorTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/UITypeEditors/MacroStabilityInwardsInputContextStochasticSoilProfileSelectionEditorTest.cs (.../MacroStabilityInwardsInputContextStochasticSoilProfileSelectionEditorTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -59,7 +59,7 @@
var input = new MacroStabilityInwardsInput(new GeneralMacroStabilityInwardsInput())
{
- StochasticSoilProfile = new StochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 2)
+ StochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 2)
{
SoilProfile = new TestMacroStabilityInwardsSoilProfile1D()
}
@@ -106,11 +106,11 @@
var assessmentSection = mockRepository.Stub();
var handler = mockRepository.Stub();
- var stochasticSoilProfile = new StochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 0)
+ var stochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 0)
{
SoilProfile = new TestMacroStabilityInwardsSoilProfile1D()
};
- var stochasticSoilModel = new StochasticSoilModel("Model")
+ var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("Model")
{
Geometry =
{
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/UITypeEditors/MacroStabilityInwardsInputContextSurfaceLineSelectionEditorTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/UITypeEditors/MacroStabilityInwardsInputContextSurfaceLineSelectionEditorTest.cs (.../MacroStabilityInwardsInputContextSurfaceLineSelectionEditorTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/UITypeEditors/MacroStabilityInwardsInputContextSurfaceLineSelectionEditorTest.cs (.../MacroStabilityInwardsInputContextSurfaceLineSelectionEditorTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -65,7 +65,7 @@
{
new MacroStabilityInwardsSurfaceLine(string.Empty)
},
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -120,7 +120,7 @@
{
surfaceLine
},
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsCalculationRowTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsCalculationRowTest.cs (.../MacroStabilityInwardsCalculationRowTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsCalculationRowTest.cs (.../MacroStabilityInwardsCalculationRowTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -144,8 +144,8 @@
public void StochasticSoilModel_AlwaysOnChange_NotifyObserverCalculationPropertyChangedOutputCleared()
{
// Setup
- var newModel = new StochasticSoilModel("test");
- var newValue = new DataGridViewComboBoxItemWrapper(newModel);
+ var newModel = new MacroStabilityInwardsStochasticSoilModel("test");
+ var newValue = new DataGridViewComboBoxItemWrapper(newModel);
var calculation = new MacroStabilityInwardsCalculationScenario(new GeneralMacroStabilityInwardsInput());
@@ -157,7 +157,7 @@
public void StochasticSoilModel_ChangeToEqualValue_NoNotificationsOutputNotCleared()
{
// Setup
- DataGridViewComboBoxItemWrapper oldValue = null;
+ DataGridViewComboBoxItemWrapper oldValue = null;
// Call
AssertPropertyNotChanged(
@@ -178,8 +178,8 @@
public void StochasticSoilProfile_AlwaysOnChange_NotifyObserverAndCalculationPropertyChanged()
{
// Setup
- var newProfile = new StochasticSoilProfile(0, 0, 0);
- var newValue = new DataGridViewComboBoxItemWrapper(newProfile);
+ var newProfile = new MacroStabilityInwardsStochasticSoilProfile(0, 0, 0);
+ var newValue = new DataGridViewComboBoxItemWrapper(newProfile);
var calculation = new MacroStabilityInwardsCalculationScenario(new GeneralMacroStabilityInwardsInput());
@@ -191,7 +191,7 @@
public void StochasticSoilProfile_ChangeToEqualValue_NoNotificationsOutputNotCleared()
{
// Setup
- DataGridViewComboBoxItemWrapper oldValue = null;
+ DataGridViewComboBoxItemWrapper oldValue = null;
// Call
AssertPropertyNotChanged(
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsCalculationsViewTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsCalculationsViewTest.cs (.../MacroStabilityInwardsCalculationsViewTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsCalculationsViewTest.cs (.../MacroStabilityInwardsCalculationsViewTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -1017,8 +1017,8 @@
var currentCell = (DataGridViewTextBoxCell) dataGridView.Rows[1].Cells[stochasticSoilProfilesProbabilityColumnIndex];
Assert.AreEqual("30", currentCell.FormattedValue);
- StochasticSoilProfile stochasticSoilProfileToChange = calculation.InputParameters.StochasticSoilProfile;
- var updatedProfile = new StochasticSoilProfile(
+ MacroStabilityInwardsStochasticSoilProfile stochasticSoilProfileToChange = calculation.InputParameters.StochasticSoilProfile;
+ var updatedProfile = new MacroStabilityInwardsStochasticSoilProfile(
0.5,
stochasticSoilProfileToChange.SoilProfileType,
stochasticSoilProfileToChange.SoilProfileId)
@@ -1336,7 +1336,7 @@
private static CalculationGroup ConfigureCalculationGroup(IAssessmentSection assessmentSection, MacroStabilityInwardsFailureMechanism failureMechanism)
{
- StochasticSoilModel stochasticSoilModelForCalculation2 = failureMechanism.StochasticSoilModels.Last();
+ MacroStabilityInwardsStochasticSoilModel stochasticSoilModelForCalculation2 = failureMechanism.StochasticSoilModels.Last();
return new CalculationGroup("Group", true)
{
Children =
@@ -1412,7 +1412,7 @@
new Point2D(10.0, 0.0)
}));
- var stochasticSoilProfile1 = new StochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1)
+ var stochasticSoilProfile1 = new MacroStabilityInwardsStochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D("Profile 1", -10.0, new[]
{
@@ -1422,7 +1422,7 @@
}, SoilProfileType.SoilProfile1D, 1)
};
- var stochasticSoilModelA = new StochasticSoilModel("Model A")
+ var stochasticSoilModelA = new MacroStabilityInwardsStochasticSoilModel("Model A")
{
Geometry =
{
@@ -1432,7 +1432,7 @@
StochasticSoilProfiles =
{
stochasticSoilProfile1,
- new StochasticSoilProfile(0.7, SoilProfileType.SoilProfile1D, 2)
+ new MacroStabilityInwardsStochasticSoilProfile(0.7, SoilProfileType.SoilProfile1D, 2)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D("Profile 2", -8.0, new[]
{
@@ -1444,7 +1444,7 @@
}
};
- var stochasticSoilProfile5 = new StochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1)
+ var stochasticSoilProfile5 = new MacroStabilityInwardsStochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D("Profile 5", -10.0, new[]
{
@@ -1454,7 +1454,7 @@
}, SoilProfileType.SoilProfile1D, 1)
};
- var stochasticSoilModelE = new StochasticSoilModel("Model E")
+ var stochasticSoilModelE = new MacroStabilityInwardsStochasticSoilModel("Model E")
{
Geometry =
{
@@ -1470,7 +1470,7 @@
failureMechanism.StochasticSoilModels.AddRange(new[]
{
stochasticSoilModelA,
- new StochasticSoilModel("Model C")
+ new MacroStabilityInwardsStochasticSoilModel("Model C")
{
Geometry =
{
@@ -1479,7 +1479,7 @@
},
StochasticSoilProfiles =
{
- new StochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1)
+ new MacroStabilityInwardsStochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D("Profile 3", -10.0, new[]
{
@@ -1488,7 +1488,7 @@
new MacroStabilityInwardsSoilLayer1D(1.0)
}, SoilProfileType.SoilProfile1D, 1)
},
- new StochasticSoilProfile(0.7, SoilProfileType.SoilProfile1D, 2)
+ new MacroStabilityInwardsStochasticSoilProfile(0.7, SoilProfileType.SoilProfile1D, 2)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D("Profile 4", -8.0, new[]
{
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsFailureMechanismViewTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsFailureMechanismViewTest.cs (.../MacroStabilityInwardsFailureMechanismViewTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsFailureMechanismViewTest.cs (.../MacroStabilityInwardsFailureMechanismViewTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -255,13 +255,13 @@
ReferenceLine = referenceLine
};
- var stochasticSoilModel1 = new StochasticSoilModel("name1");
+ var stochasticSoilModel1 = new MacroStabilityInwardsStochasticSoilModel("name1");
stochasticSoilModel1.Geometry.AddRange(new[]
{
new Point2D(1.0, 2.0),
new Point2D(1.1, 2.2)
});
- var stochasticSoilModel2 = new StochasticSoilModel("name2");
+ var stochasticSoilModel2 = new MacroStabilityInwardsStochasticSoilModel("name2");
stochasticSoilModel2.Geometry.AddRange(new[]
{
new Point2D(3.0, 4.0),
@@ -679,7 +679,7 @@
var failureMechanism = new MacroStabilityInwardsFailureMechanism();
var failureMechanismContext = new MacroStabilityInwardsFailureMechanismContext(failureMechanism, new ObservableTestAssessmentSectionStub());
- var stochasticSoilModel = new StochasticSoilModel("");
+ var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("");
stochasticSoilModel.Geometry.AddRange(new[]
{
@@ -1007,18 +1007,18 @@
Assert.AreEqual("Profielschematisaties", mapData.Name);
}
- private static void AssertStochasticSoilModelsMapData(IEnumerable soilModels, MapData mapData)
+ private static void AssertStochasticSoilModelsMapData(IEnumerable soilModels, MapData mapData)
{
Assert.IsInstanceOf(mapData);
var soilModelsMapData = (MapLineData) mapData;
MapFeature[] soilModelsFeatures = soilModelsMapData.Features.ToArray();
- StochasticSoilModel[] stochasticSoilModelsArray = soilModels.ToArray();
+ MacroStabilityInwardsStochasticSoilModel[] stochasticSoilModelsArray = soilModels.ToArray();
Assert.AreEqual(stochasticSoilModelsArray.Length, soilModelsFeatures.Length);
for (var index = 0; index < stochasticSoilModelsArray.Length; index++)
{
Assert.AreEqual(1, soilModelsFeatures[index].MapGeometries.Count());
- StochasticSoilModel stochasticSoilModel = stochasticSoilModelsArray[index];
+ MacroStabilityInwardsStochasticSoilModel stochasticSoilModel = stochasticSoilModelsArray[index];
CollectionAssert.AreEquivalent(stochasticSoilModel.Geometry.Select(p => new Point2D(p)), soilModelsFeatures[index].MapGeometries.First().PointCollections.First());
}
Assert.AreEqual("Stochastische ondergrondmodellen", mapData.Name);
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsInputViewTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsInputViewTest.cs (.../MacroStabilityInwardsInputViewTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsInputViewTest.cs (.../MacroStabilityInwardsInputViewTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -165,7 +165,7 @@
{
InputParameters =
{
- StochasticSoilProfile = new StochasticSoilProfile(0.1, SoilProfileType.SoilProfile1D, 1)
+ StochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(0.1, SoilProfileType.SoilProfile1D, 1)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D(
"profile",
@@ -210,7 +210,7 @@
{
MacroStabilityInwardsSurfaceLine surfaceLine = GetSurfaceLineWithGeometry();
- StochasticSoilProfile stochasticSoilProfile = GetStochasticSoilProfile();
+ MacroStabilityInwardsStochasticSoilProfile stochasticSoilProfile = GetStochasticSoilProfile();
var calculation = new MacroStabilityInwardsCalculationScenario(new GeneralMacroStabilityInwardsInput())
{
InputParameters =
@@ -290,7 +290,7 @@
InputParameters =
{
SurfaceLine = surfaceLine,
- StochasticSoilProfile = new StochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, 1)
+ StochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, 1)
}
};
@@ -334,7 +334,7 @@
{
InputParameters =
{
- StochasticSoilProfile = new StochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, 1)
+ StochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, 1)
}
};
@@ -468,8 +468,8 @@
using (var view = new MacroStabilityInwardsInputView())
{
MacroStabilityInwardsSurfaceLine surfaceLine = GetSurfaceLineWithGeometry();
- StochasticSoilProfile soilProfile = GetStochasticSoilProfile();
- var soilProfile2 = new StochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, 1)
+ MacroStabilityInwardsStochasticSoilProfile soilProfile = GetStochasticSoilProfile();
+ var soilProfile2 = new MacroStabilityInwardsStochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, 1)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D("profile", -2, new[]
{
@@ -663,7 +663,7 @@
using (var view = new MacroStabilityInwardsInputView())
{
MacroStabilityInwardsSurfaceLine surfaceLine = GetSurfaceLineWithGeometry();
- StochasticSoilProfile stochasticSoilProfile = GetStochasticSoilProfile();
+ MacroStabilityInwardsStochasticSoilProfile stochasticSoilProfile = GetStochasticSoilProfile();
var calculation = new MacroStabilityInwardsCalculationScenario(new GeneralMacroStabilityInwardsInput())
{
InputParameters =
@@ -701,9 +701,9 @@
return ControlTestHelper.GetControls(view, "soilLayerTable").Single();
}
- private static StochasticSoilProfile GetStochasticSoilProfile()
+ private static MacroStabilityInwardsStochasticSoilProfile GetStochasticSoilProfile()
{
- return new StochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, 1)
+ return new MacroStabilityInwardsStochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, 1)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D("profile", -1, new[]
{
@@ -809,7 +809,7 @@
Assert.AreEqual("Maaiveld buitenwaarts", surfaceLevelOutsideData.Name);
}
- private static void AssertSoilProfileChartData(StochasticSoilProfile stochasticSoilProfile, ChartData chartData, bool mapDataShouldContainAreas)
+ private static void AssertSoilProfileChartData(MacroStabilityInwardsStochasticSoilProfile stochasticSoilProfile, ChartData chartData, bool mapDataShouldContainAreas)
{
Assert.IsInstanceOf(chartData);
var soilProfileChartData = (ChartDataCollection) chartData;
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Configurations/MacroStabilityInwardsCalculationConfigurationImporterTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Configurations/MacroStabilityInwardsCalculationConfigurationImporterTest.cs (.../MacroStabilityInwardsCalculationConfigurationImporterTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Configurations/MacroStabilityInwardsCalculationConfigurationImporterTest.cs (.../MacroStabilityInwardsCalculationConfigurationImporterTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -171,7 +171,7 @@
new Point3D(2.5, 1.0, 1.0),
new Point3D(5.0, 1.0, 0.0)
});
- var stochasticSoilModel = new StochasticSoilModel("Ondergrondmodel");
+ var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("Ondergrondmodel");
stochasticSoilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
@@ -218,7 +218,7 @@
new Point3D(3.0, 0.0, 1.0),
new Point3D(3.0, -5.0, 0.0)
});
- var stochasticSoilModel = new StochasticSoilModel("Ondergrondmodel");
+ var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("Ondergrondmodel");
stochasticSoilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
@@ -380,15 +380,15 @@
new Point3D(3.0, 0.0, 1.0),
new Point3D(3.0, -5.0, 0.0)
});
- var stochasticSoilProfile = new StochasticSoilProfile(0, SoilProfileType.SoilProfile1D, 1)
+ var stochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(0, SoilProfileType.SoilProfile1D, 1)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D("Ondergrondschematisatie", 0, new[]
{
new MacroStabilityInwardsSoilLayer1D(0)
}, SoilProfileType.SoilProfile1D, 0)
};
- var stochasticSoilModel = new StochasticSoilModel("Ondergrondmodel");
+ var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("Ondergrondmodel");
stochasticSoilModel.StochasticSoilProfiles.Add(stochasticSoilProfile);
stochasticSoilModel.Geometry.AddRange(new[]
{
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Importers/StochasticSoilModelImporterTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Importers/StochasticSoilModelImporterTest.cs (.../StochasticSoilModelImporterTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Importers/StochasticSoilModelImporterTest.cs (.../StochasticSoilModelImporterTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -84,7 +84,7 @@
{
// Call
TestDelegate call = () => new StochasticSoilModelImporter(
- new StochasticSoilModelCollection(),
+ new MacroStabilityInwardsStochasticSoilModelCollection(),
"",
null,
new TestStochasticSoilModelUpdateModelStrategy());
@@ -103,7 +103,7 @@
// Call
TestDelegate call = () => new StochasticSoilModelImporter(
- new StochasticSoilModelCollection(),
+ new MacroStabilityInwardsStochasticSoilModelCollection(),
"",
messageProvider,
null);
@@ -120,7 +120,7 @@
var messageProvider = mocks.Stub();
mocks.ReplayAll();
- var list = new StochasticSoilModelCollection();
+ var list = new MacroStabilityInwardsStochasticSoilModelCollection();
// Call
var importer = new StochasticSoilModelImporter(
@@ -130,7 +130,7 @@
new TestStochasticSoilModelUpdateModelStrategy());
// Assert
- Assert.IsInstanceOf>(importer);
+ Assert.IsInstanceOf>(importer);
}
[Test]
@@ -295,7 +295,7 @@
TestHelper.AssertLogMessagesCount(call, 0);
Assert.AreEqual(36 * 2, progress);
- StochasticSoilModel[] readModels = AssertSuccessfulImport(validFilePath, importResult, updateStrategy);
+ MacroStabilityInwardsStochasticSoilModel[] readModels = AssertSuccessfulImport(validFilePath, importResult, updateStrategy);
Assert.AreEqual(3, readModels.Length);
}
@@ -483,7 +483,7 @@
const string expectedMessage = "Huidige actie was niet meer te annuleren en is daarom voortgezet.";
Tuple expectedLogMessageAndLevel = Tuple.Create(expectedMessage, LogLevelConstant.Warn);
TestHelper.AssertLogMessageWithLevelIsGenerated(call, expectedLogMessageAndLevel, 1);
- StochasticSoilModel[] readModels = AssertSuccessfulImport(validFilePath, importResult, updateStrategy);
+ MacroStabilityInwardsStochasticSoilModel[] readModels = AssertSuccessfulImport(validFilePath, importResult, updateStrategy);
Assert.AreEqual(3, readModels.Length);
}
@@ -514,7 +514,7 @@
importResult = importer.Import();
// Assert
- StochasticSoilModel[] readModels = AssertSuccessfulImport(validFilePath, importResult, updateStrategy);
+ MacroStabilityInwardsStochasticSoilModel[] readModels = AssertSuccessfulImport(validFilePath, importResult, updateStrategy);
Assert.AreEqual(3, readModels.Length);
}
@@ -553,7 +553,7 @@
TestHelper.AssertLogMessagesWithLevelAreGenerated(call, expectedLogMessagesAndLevel, 2);
Assert.AreEqual(8, progress);
- StochasticSoilModel[] readModels = AssertSuccessfulImport(pathToCorruptFile, importResult, updateStrategy);
+ MacroStabilityInwardsStochasticSoilModel[] readModels = AssertSuccessfulImport(pathToCorruptFile, importResult, updateStrategy);
CollectionAssert.IsEmpty(readModels);
}
@@ -579,7 +579,7 @@
bool importResult = importer.Import();
// Assert
- StochasticSoilModel[] readModels = AssertSuccessfulImport(pathToCorruptFile, importResult, updateStrategy);
+ MacroStabilityInwardsStochasticSoilModel[] readModels = AssertSuccessfulImport(pathToCorruptFile, importResult, updateStrategy);
CollectionAssert.IsEmpty(readModels);
}
@@ -613,7 +613,7 @@
Tuple expectedLogMessageAndLevel = Tuple.Create(expectedLogMessage, LogLevelConstant.Error);
TestHelper.AssertLogMessageWithLevelIsGenerated(call, expectedLogMessageAndLevel, 1);
- StochasticSoilModel[] readModels = AssertSuccessfulImport(pathToCorruptFile, importResult, updateStrategy);
+ MacroStabilityInwardsStochasticSoilModel[] readModels = AssertSuccessfulImport(pathToCorruptFile, importResult, updateStrategy);
CollectionAssert.IsEmpty(readModels);
}
@@ -645,7 +645,7 @@
Tuple expectedLogMessageAndLevel = Tuple.Create(expectedLogMessage, LogLevelConstant.Warn);
TestHelper.AssertLogMessageWithLevelIsGenerated(call, expectedLogMessageAndLevel, 1);
- StochasticSoilModel[] readModels = AssertSuccessfulImport(pathToCorruptFile, importResult, updateStrategy);
+ MacroStabilityInwardsStochasticSoilModel[] readModels = AssertSuccessfulImport(pathToCorruptFile, importResult, updateStrategy);
Assert.AreEqual(1, readModels.Length);
}
@@ -670,17 +670,17 @@
bool importResult = importer.Import();
// Assert
- StochasticSoilModel[] readModels = AssertSuccessfulImport(validFilePath, importResult, updateStrategy);
+ MacroStabilityInwardsStochasticSoilModel[] readModels = AssertSuccessfulImport(validFilePath, importResult, updateStrategy);
Assert.AreEqual(2, readModels.Length);
- StochasticSoilModel model1 = readModels[0];
- StochasticSoilModel model2 = readModels[1];
+ MacroStabilityInwardsStochasticSoilModel model1 = readModels[0];
+ MacroStabilityInwardsStochasticSoilModel model2 = readModels[1];
Assert.AreEqual(1, model1.StochasticSoilProfiles.Count);
Assert.AreEqual(1, model2.StochasticSoilProfiles.Count);
- StochasticSoilProfile profile1 = model1.StochasticSoilProfiles[0];
- StochasticSoilProfile profile2 = model2.StochasticSoilProfiles[0];
+ MacroStabilityInwardsStochasticSoilProfile profile1 = model1.StochasticSoilProfiles[0];
+ MacroStabilityInwardsStochasticSoilProfile profile2 = model2.StochasticSoilProfiles[0];
Assert.AreNotSame(profile1, profile2);
Assert.AreSame(profile1.SoilProfile, profile2.SoilProfile);
@@ -711,17 +711,17 @@
bool importResult = importer.Import();
// Assert
- StochasticSoilModel[] readModels = AssertSuccessfulImport(validFilePath, importResult, updateStrategy);
+ MacroStabilityInwardsStochasticSoilModel[] readModels = AssertSuccessfulImport(validFilePath, importResult, updateStrategy);
Assert.AreEqual(2, readModels.Length);
- StochasticSoilModel model1 = readModels[0];
- StochasticSoilModel model2 = readModels[1];
+ MacroStabilityInwardsStochasticSoilModel model1 = readModels[0];
+ MacroStabilityInwardsStochasticSoilModel model2 = readModels[1];
Assert.AreEqual(1, model1.StochasticSoilProfiles.Count);
Assert.AreEqual(1, model2.StochasticSoilProfiles.Count);
- StochasticSoilProfile profile1 = model1.StochasticSoilProfiles[0];
- StochasticSoilProfile profile2 = model2.StochasticSoilProfiles[0];
+ MacroStabilityInwardsStochasticSoilProfile profile1 = model1.StochasticSoilProfiles[0];
+ MacroStabilityInwardsStochasticSoilProfile profile2 = model2.StochasticSoilProfiles[0];
Assert.AreNotSame(profile1, profile2);
Assert.AreSame(profile1.SoilProfile, profile2.SoilProfile);
@@ -759,7 +759,7 @@
Tuple expectedLogMessageAndLevel = Tuple.Create(expectedLogMessage, LogLevelConstant.Warn);
TestHelper.AssertLogMessageWithLevelIsGenerated(call, expectedLogMessageAndLevel, 1);
- StochasticSoilModel[] readModels = AssertSuccessfulImport(validFilePath, importResult, updateStrategy);
+ MacroStabilityInwardsStochasticSoilModel[] readModels = AssertSuccessfulImport(validFilePath, importResult, updateStrategy);
CollectionAssert.IsEmpty(readModels);
}
@@ -791,9 +791,9 @@
"'StochasticSoilModelName'. Kansen van voorkomen worden opgeteld.";
TestHelper.AssertLogMessageIsGenerated(importAction, expectedMessage, 1);
- StochasticSoilModel[] readModels = AssertSuccessfulImport(pathToFile, importResult, updateStrategy);
+ MacroStabilityInwardsStochasticSoilModel[] readModels = AssertSuccessfulImport(pathToFile, importResult, updateStrategy);
Assert.AreEqual(1, readModels.Length);
- StochasticSoilModel firstModel = readModels.First();
+ MacroStabilityInwardsStochasticSoilModel firstModel = readModels.First();
Assert.AreEqual(1, firstModel.StochasticSoilProfiles.Count);
Assert.AreEqual(1.0, firstModel.StochasticSoilProfiles[0].Probability);
}
@@ -823,9 +823,9 @@
// Assert
TestHelper.AssertLogMessagesCount(importAction, 0);
- StochasticSoilModel[] readModels = AssertSuccessfulImport(pathToFile, importResult, updateStrategy);
+ MacroStabilityInwardsStochasticSoilModel[] readModels = AssertSuccessfulImport(pathToFile, importResult, updateStrategy);
Assert.AreEqual(1, readModels.Length);
- StochasticSoilModel firstModel = readModels.First();
+ MacroStabilityInwardsStochasticSoilModel firstModel = readModels.First();
Assert.AreEqual(2, firstModel.StochasticSoilProfiles.Count);
Assert.AreEqual(firstModel.StochasticSoilProfiles[0].SoilProfile.Name, firstModel.StochasticSoilProfiles[1].SoilProfile.Name);
}
@@ -852,13 +852,13 @@
bool importResult = importer.Import();
// Assert
- StochasticSoilModel[] readModels = AssertSuccessfulImport(validFilePath, importResult, updateStrategy);
+ MacroStabilityInwardsStochasticSoilModel[] readModels = AssertSuccessfulImport(validFilePath, importResult, updateStrategy);
Assert.AreEqual(1, readModels.Length);
- StochasticSoilModel soilModel = readModels[0];
+ MacroStabilityInwardsStochasticSoilModel soilModel = readModels[0];
Assert.AreEqual(1, soilModel.StochasticSoilProfiles.Count);
- StochasticSoilProfile stochasticProfile = soilModel.StochasticSoilProfiles[0];
+ MacroStabilityInwardsStochasticSoilProfile stochasticProfile = soilModel.StochasticSoilProfiles[0];
Assert.AreEqual(1.0, stochasticProfile.Probability);
Assert.AreEqual(SoilProfileType.SoilProfile2D, stochasticProfile.SoilProfileType);
@@ -909,13 +909,13 @@
bool importResult = importer.Import();
// Assert
- StochasticSoilModel[] readModels = AssertSuccessfulImport(validFilePath, importResult, updateStrategy);
+ MacroStabilityInwardsStochasticSoilModel[] readModels = AssertSuccessfulImport(validFilePath, importResult, updateStrategy);
Assert.AreEqual(1, readModels.Length);
- StochasticSoilModel soilModel = readModels[0];
+ MacroStabilityInwardsStochasticSoilModel soilModel = readModels[0];
Assert.AreEqual(1, soilModel.StochasticSoilProfiles.Count);
- StochasticSoilProfile stochasticProfile = soilModel.StochasticSoilProfiles[0];
+ MacroStabilityInwardsStochasticSoilProfile stochasticProfile = soilModel.StochasticSoilProfiles[0];
Assert.AreEqual(1.0, stochasticProfile.Probability);
Assert.AreEqual(SoilProfileType.SoilProfile2D, stochasticProfile.SoilProfileType);
@@ -960,7 +960,7 @@
public void Import_UpdateSurfaceLinesWithImportedDataThrowsUpdateDataException_ReturnFalseAndLogError()
{
// Setup
- var importTarget = new StochasticSoilModelCollection();
+ var importTarget = new MacroStabilityInwardsStochasticSoilModelCollection();
string filePath = Path.Combine(testDataPath, "complete.soil");
@@ -970,7 +970,7 @@
.Return("error {0}");
var strategy = mocks.StrictMock();
- strategy.Expect(s => s.UpdateModelWithImportedData(Arg.Is.NotNull,
+ strategy.Expect(s => s.UpdateModelWithImportedData(Arg.Is.NotNull,
Arg.Is.Same(filePath)
)).Throw(new UpdateDataException("Exception message"));
mocks.ReplayAll();
@@ -1010,7 +1010,7 @@
}
};
var importer = new StochasticSoilModelImporter(
- new StochasticSoilModelCollection(),
+ new MacroStabilityInwardsStochasticSoilModelCollection(),
validFilePath,
messageProvider,
updateStrategy);
@@ -1022,7 +1022,7 @@
// Assert
}
- private static StochasticSoilModel[] AssertSuccessfulImport(
+ private static MacroStabilityInwardsStochasticSoilModel[] AssertSuccessfulImport(
string expectedPath,
bool actualImportResult,
TestStochasticSoilModelUpdateModelStrategy updateStrategy)
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Ringtoets.MacroStabilityInwards.IO.Test.csproj
===================================================================
diff -u -r00bca55b16694cd9d828d5a0052016b442b78b6b -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Ringtoets.MacroStabilityInwards.IO.Test.csproj (.../Ringtoets.MacroStabilityInwards.IO.Test.csproj) (revision 00bca55b16694cd9d828d5a0052016b442b78b6b)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Ringtoets.MacroStabilityInwards.IO.Test.csproj (.../Ringtoets.MacroStabilityInwards.IO.Test.csproj) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -156,6 +156,9 @@
+
+
+
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfile/StochasticSoilModelReaderTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfile/StochasticSoilModelReaderTest.cs (.../StochasticSoilModelReaderTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfile/StochasticSoilModelReaderTest.cs (.../StochasticSoilModelReaderTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -256,7 +256,7 @@
int nrOfModels = stochasticSoilModelDatabaseReader.MacroStabilityInwardsStochasticSoilModelCount;
// Call
- StochasticSoilModel stochasticSoilModel = stochasticSoilModelDatabaseReader.ReadStochasticSoilModel();
+ MacroStabilityInwardsStochasticSoilModel stochasticSoilModel = stochasticSoilModelDatabaseReader.ReadStochasticSoilModel();
// Assert
Assert.IsNull(stochasticSoilModel);
@@ -277,7 +277,7 @@
using (var stochasticSoilModelDatabaseReader = new StochasticSoilModelReader(dbFile))
{
int nrOfModels = stochasticSoilModelDatabaseReader.MacroStabilityInwardsStochasticSoilModelCount;
- var readModels = new List();
+ var readModels = new List();
while (stochasticSoilModelDatabaseReader.HasNext)
{
// Call
@@ -326,7 +326,7 @@
using (var stochasticSoilModelDatabaseReader = new StochasticSoilModelReader(dbFile))
{
int nrOfModels = stochasticSoilModelDatabaseReader.MacroStabilityInwardsStochasticSoilModelCount;
- var readModels = new List();
+ var readModels = new List();
while (stochasticSoilModelDatabaseReader.HasNext)
{
// Call
@@ -390,7 +390,7 @@
using (var stochasticSoilModelDatabaseReader = new StochasticSoilModelReader(dbFile))
{
- var readModels = new List();
+ var readModels = new List();
for (var i = 0; i < stochasticSoilModelDatabaseReader.MacroStabilityInwardsStochasticSoilModelCount; i++)
{
// Call
@@ -414,7 +414,7 @@
using (var stochasticSoilModelDatabaseReader = new StochasticSoilModelReader(dbFile))
{
- var readModels = new List();
+ var readModels = new List();
while (stochasticSoilModelDatabaseReader.HasNext)
{
// Call
@@ -429,7 +429,7 @@
Assert.IsTrue(TestHelper.CanOpenFileForWrite(dbFile));
}
- private static void CheckModelWithoutSegmentPoints(List readModels)
+ private static void CheckModelWithoutSegmentPoints(List readModels)
{
var expectedSegmentAndModelNames = new[]
{
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfile/StochasticSoilProfileReaderTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfile/StochasticSoilProfileReaderTest.cs (.../StochasticSoilProfileReaderTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfile/StochasticSoilProfileReaderTest.cs (.../StochasticSoilProfileReaderTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -256,7 +256,7 @@
using (var stochasticSoilProfileReader = new StochasticSoilProfileReader(dbFile))
{
// Call
- StochasticSoilProfile stochasticSoilProfile = stochasticSoilProfileReader.ReadStochasticSoilProfile(profileId);
+ MacroStabilityInwardsStochasticSoilProfile stochasticSoilProfile = stochasticSoilProfileReader.ReadStochasticSoilProfile(profileId);
// Assert
Assert.IsNotNull(stochasticSoilProfile);
@@ -279,7 +279,7 @@
using (var stochasticSoilProfileReader = new StochasticSoilProfileReader(dbFile))
{
// Call
- StochasticSoilProfile stochasticSoilProfile = stochasticSoilProfileReader.ReadStochasticSoilProfile(987654321);
+ MacroStabilityInwardsStochasticSoilProfile stochasticSoilProfile = stochasticSoilProfileReader.ReadStochasticSoilProfile(987654321);
// Assert
Assert.IsNull(stochasticSoilProfile);
@@ -299,7 +299,7 @@
using (var stochasticSoilProfileReader = new StochasticSoilProfileReader(dbFile))
{
// Call
- StochasticSoilProfile stochasticSoilProfile = stochasticSoilProfileReader.ReadStochasticSoilProfile(profileId);
+ MacroStabilityInwardsStochasticSoilProfile stochasticSoilProfile = stochasticSoilProfileReader.ReadStochasticSoilProfile(profileId);
// Assert
Assert.IsNull(stochasticSoilProfile);
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.TestUtil.Test/TestStochasticSoilModelUpdateModelStrategyTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.TestUtil.Test/TestStochasticSoilModelUpdateModelStrategyTest.cs (.../TestStochasticSoilModelUpdateModelStrategyTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.TestUtil.Test/TestStochasticSoilModelUpdateModelStrategyTest.cs (.../TestStochasticSoilModelUpdateModelStrategyTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -48,7 +48,7 @@
{
// Setup
var strategy = new TestStochasticSoilModelUpdateModelStrategy();
- IEnumerable readModels = new[]
+ IEnumerable readModels = new[]
{
new TestStochasticSoilModel("A"),
new TestStochasticSoilModel("B"),
@@ -71,7 +71,7 @@
{
// Setup
var strategy = new TestStochasticSoilModelUpdateModelStrategy();
- IEnumerable readModels = Enumerable.Empty();
+ IEnumerable readModels = Enumerable.Empty();
var filePath = new string('x', new Random(21).Next(5, 23));
IEnumerable updatedInstances = Enumerable.Empty();
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.TestUtil/TestStochasticSoilModelUpdateModelStrategy.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.TestUtil/TestStochasticSoilModelUpdateModelStrategy.cs (.../TestStochasticSoilModelUpdateModelStrategy.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.TestUtil/TestStochasticSoilModelUpdateModelStrategy.cs (.../TestStochasticSoilModelUpdateModelStrategy.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -42,7 +42,7 @@
///
/// Gets the models that were passed to as the read models.
///
- public StochasticSoilModel[] ReadModels { get; private set; }
+ public MacroStabilityInwardsStochasticSoilModel[] ReadModels { get; private set; }
///
/// Gets the file path that was passed to .
@@ -54,7 +54,7 @@
///
public IEnumerable UpdatedInstances { get; set; } = Enumerable.Empty();
- public IEnumerable UpdateModelWithImportedData(IEnumerable stochasticSoilModels, string sourceFilePath)
+ public IEnumerable UpdateModelWithImportedData(IEnumerable stochasticSoilModels, string sourceFilePath)
{
Updated = true;
EvaluateGetValidStochasticSoilModelsMethod(stochasticSoilModels);
@@ -63,7 +63,7 @@
return UpdatedInstances;
}
- private void EvaluateGetValidStochasticSoilModelsMethod(IEnumerable readStochasticSoilModels)
+ private void EvaluateGetValidStochasticSoilModelsMethod(IEnumerable readStochasticSoilModels)
{
ReadModels = readStochasticSoilModels.ToArray();
}
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Integration.Test/MacroStabilityInwardsCalculationsViewIntegrationTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Integration.Test/MacroStabilityInwardsCalculationsViewIntegrationTest.cs (.../MacroStabilityInwardsCalculationsViewIntegrationTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Integration.Test/MacroStabilityInwardsCalculationsViewIntegrationTest.cs (.../MacroStabilityInwardsCalculationsViewIntegrationTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -96,7 +96,7 @@
// Import soil models and profiles and ensure the corresponding combobox items are updated
DataImportHelper.ImportMacroStabilityInwardsStochasticSoilModels(assessmentSection);
- StochasticSoilModelCollection stochasticSoilModelCollection = assessmentSection.MacroStabilityInwards.StochasticSoilModels;
+ MacroStabilityInwardsStochasticSoilModelCollection stochasticSoilModelCollection = assessmentSection.MacroStabilityInwards.StochasticSoilModels;
calculation1.InputParameters.StochasticSoilModel = stochasticSoilModelCollection.First(sl => sl.Name == "PK001_0001_Piping");
Assert.AreEqual(1, ((DataGridViewComboBoxCell) dataGridView.Rows[0].Cells[stochasticSoilModelsColumnIndex]).Items.Count);
Assert.AreEqual("PK001_0001_Piping", dataGridView.Rows[0].Cells[stochasticSoilModelsColumnIndex].FormattedValue);
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/ExportInfos/MacroStabilityInwardsCalculationContextExportInfoTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/ExportInfos/MacroStabilityInwardsCalculationContextExportInfoTest.cs (.../MacroStabilityInwardsCalculationContextExportInfoTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/ExportInfos/MacroStabilityInwardsCalculationContextExportInfoTest.cs (.../MacroStabilityInwardsCalculationContextExportInfoTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -70,7 +70,7 @@
var context = new MacroStabilityInwardsCalculationScenarioContext(new MacroStabilityInwardsCalculationScenario(new GeneralMacroStabilityInwardsInput()),
new CalculationGroup(),
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
new MacroStabilityInwardsFailureMechanism(),
assessmentSection);
@@ -114,7 +114,7 @@
var context = new MacroStabilityInwardsCalculationScenarioContext(new MacroStabilityInwardsCalculationScenario(new GeneralMacroStabilityInwardsInput()),
new CalculationGroup(),
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
new MacroStabilityInwardsFailureMechanism(),
assessmentSection);
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/ExportInfos/MacroStabilityInwardsCalculationGroupContextExportInfoTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/ExportInfos/MacroStabilityInwardsCalculationGroupContextExportInfoTest.cs (.../MacroStabilityInwardsCalculationGroupContextExportInfoTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/ExportInfos/MacroStabilityInwardsCalculationGroupContextExportInfoTest.cs (.../MacroStabilityInwardsCalculationGroupContextExportInfoTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -70,7 +70,7 @@
var context = new MacroStabilityInwardsCalculationGroupContext(new CalculationGroup(),
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
new MacroStabilityInwardsFailureMechanism(),
assessmentSection);
@@ -114,7 +114,7 @@
var context = new MacroStabilityInwardsCalculationGroupContext(new CalculationGroup(),
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
new MacroStabilityInwardsFailureMechanism(),
assessmentSection);
@@ -156,7 +156,7 @@
var context = new MacroStabilityInwardsCalculationGroupContext(calculationGroup,
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
new MacroStabilityInwardsFailureMechanism(),
assessmentSection);
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/MacroStabilityInwardsSurfaceLineUpdateDataStrategyTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/MacroStabilityInwardsSurfaceLineUpdateDataStrategyTest.cs (.../MacroStabilityInwardsSurfaceLineUpdateDataStrategyTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/MacroStabilityInwardsSurfaceLineUpdateDataStrategyTest.cs (.../MacroStabilityInwardsSurfaceLineUpdateDataStrategyTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -563,7 +563,7 @@
var soilModels = new[]
{
- new StochasticSoilModel("A")
+ new MacroStabilityInwardsStochasticSoilModel("A")
{
Geometry =
{
@@ -572,10 +572,10 @@
},
StochasticSoilProfiles =
{
- new StochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 1)
+ new MacroStabilityInwardsStochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 1)
}
},
- new StochasticSoilModel("C")
+ new MacroStabilityInwardsStochasticSoilModel("C")
{
Geometry =
{
@@ -584,7 +584,7 @@
},
StochasticSoilProfiles =
{
- new StochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 2)
+ new MacroStabilityInwardsStochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 2)
}
}
};
@@ -631,7 +631,7 @@
// Setup
var soilModels = new[]
{
- new StochasticSoilModel("A")
+ new MacroStabilityInwardsStochasticSoilModel("A")
{
Geometry =
{
@@ -640,10 +640,10 @@
},
StochasticSoilProfiles =
{
- new StochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 1)
+ new MacroStabilityInwardsStochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 1)
}
},
- new StochasticSoilModel("C")
+ new MacroStabilityInwardsStochasticSoilModel("C")
{
Geometry =
{
@@ -652,10 +652,10 @@
},
StochasticSoilProfiles =
{
- new StochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 2)
+ new MacroStabilityInwardsStochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 2)
}
},
- new StochasticSoilModel("E")
+ new MacroStabilityInwardsStochasticSoilModel("E")
{
Geometry =
{
@@ -664,7 +664,7 @@
},
StochasticSoilProfiles =
{
- new StochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 3)
+ new MacroStabilityInwardsStochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 3)
}
}
};
@@ -719,7 +719,7 @@
public void UpdateSurfaceLinesWithImportedData_WithCalculationAssignedToRemovedLine_UpdatesCalculationAndDoesNotRemoveStochasticSoilInputs()
{
// Setup
- var soilModel = new StochasticSoilModel("A")
+ var soilModel = new MacroStabilityInwardsStochasticSoilModel("A")
{
Geometry =
{
@@ -728,7 +728,7 @@
},
StochasticSoilProfiles =
{
- new StochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 1)
+ new MacroStabilityInwardsStochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 1)
}
};
@@ -776,7 +776,7 @@
public void UpdateSurfaceLinesWithImportedData_WithCalculationAssignedToRemovedLine_UpdatesCalculationAndDoesNotRemoveStochasticSoilModelInput()
{
// Setup
- var soilModel = new StochasticSoilModel("A")
+ var soilModel = new MacroStabilityInwardsStochasticSoilModel("A")
{
Geometry =
{
@@ -861,7 +861,7 @@
var soilModels = new[]
{
- new StochasticSoilModel("A")
+ new MacroStabilityInwardsStochasticSoilModel("A")
{
Geometry =
{
@@ -870,10 +870,10 @@
},
StochasticSoilProfiles =
{
- new StochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 1)
+ new MacroStabilityInwardsStochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 1)
}
},
- new StochasticSoilModel("C")
+ new MacroStabilityInwardsStochasticSoilModel("C")
{
Geometry =
{
@@ -882,7 +882,7 @@
},
StochasticSoilProfiles =
{
- new StochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 2)
+ new MacroStabilityInwardsStochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 2)
}
}
};
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/StochasticSoilModelReplaceDataStrategyTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/StochasticSoilModelReplaceDataStrategyTest.cs (.../StochasticSoilModelReplaceDataStrategyTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/StochasticSoilModelReplaceDataStrategyTest.cs (.../StochasticSoilModelReplaceDataStrategyTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -58,7 +58,7 @@
// Assert
Assert.IsInstanceOf(strategy);
- Assert.IsInstanceOf>(strategy);
+ Assert.IsInstanceOf>(strategy);
}
[Test]
@@ -82,7 +82,7 @@
var strategy = new StochasticSoilModelReplaceDataStrategy(new MacroStabilityInwardsFailureMechanism());
// Call
- TestDelegate test = () => strategy.UpdateModelWithImportedData(new List(), null);
+ TestDelegate test = () => strategy.UpdateModelWithImportedData(new List(), null);
// Assert
string paramName = Assert.Throws(test).ParamName;
@@ -128,7 +128,7 @@
var strategy = new StochasticSoilModelReplaceDataStrategy(failureMechanism);
// Call
- IEnumerable affectedObjects = strategy.UpdateModelWithImportedData(new List(), sourceFilePath);
+ IEnumerable affectedObjects = strategy.UpdateModelWithImportedData(new List(), sourceFilePath);
// Assert
CollectionAssert.IsEmpty(failureMechanism.StochasticSoilModels);
@@ -181,14 +181,14 @@
var strategy = new StochasticSoilModelReplaceDataStrategy(failureMechanism);
- var targetCollection = new StochasticSoilModelCollection();
+ var targetCollection = new MacroStabilityInwardsStochasticSoilModelCollection();
targetCollection.AddRange(new[]
{
existingModel
}, sourceFilePath);
// Call
- IEnumerable affectedObjects = strategy.UpdateModelWithImportedData(new List(), sourceFilePath).ToArray();
+ IEnumerable affectedObjects = strategy.UpdateModelWithImportedData(new List(), sourceFilePath).ToArray();
// Assert
Assert.IsFalse(calculation.HasOutput);
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/StochasticSoilModelUpdateDataStrategyTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/StochasticSoilModelUpdateDataStrategyTest.cs (.../StochasticSoilModelUpdateDataStrategyTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/StochasticSoilModelUpdateDataStrategyTest.cs (.../StochasticSoilModelUpdateDataStrategyTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -61,7 +61,7 @@
// Assert
Assert.IsInstanceOf(strategy);
- Assert.IsInstanceOf>(strategy);
+ Assert.IsInstanceOf>(strategy);
}
[Test]
@@ -85,7 +85,7 @@
var strategy = new StochasticSoilModelUpdateDataStrategy(new MacroStabilityInwardsFailureMechanism());
// Call
- TestDelegate test = () => strategy.UpdateModelWithImportedData(new List(), null);
+ TestDelegate test = () => strategy.UpdateModelWithImportedData(new List(), null);
// Assert
string paramName = Assert.Throws(test).ParamName;
@@ -98,7 +98,7 @@
// Setup
const string nonUniqueName = "non-unique name";
- var targetCollection = new StochasticSoilModelCollection();
+ var targetCollection = new MacroStabilityInwardsStochasticSoilModelCollection();
targetCollection.AddRange(new[]
{
new TestStochasticSoilModel(nonUniqueName)
@@ -126,7 +126,7 @@
// Setup
const string nonUniqueName = "non-unique name";
- var targetCollection = new StochasticSoilModelCollection();
+ var targetCollection = new MacroStabilityInwardsStochasticSoilModelCollection();
var strategy = new StochasticSoilModelUpdateDataStrategy(new MacroStabilityInwardsFailureMechanism());
var importedStochasticSoilModels = new[]
@@ -152,7 +152,7 @@
// Setup
IEnumerable importedStochasticSoilModels = Enumerable.Empty();
var strategy = new StochasticSoilModelUpdateDataStrategy(new MacroStabilityInwardsFailureMechanism());
- var targetCollection = new StochasticSoilModelCollection();
+ var targetCollection = new MacroStabilityInwardsStochasticSoilModelCollection();
// Call
IEnumerable affectedObjects = strategy.UpdateModelWithImportedData(importedStochasticSoilModels, "path");
@@ -198,7 +198,7 @@
var existingModel = new TestStochasticSoilModel(modelsName);
var failureMechanism = new MacroStabilityInwardsFailureMechanism();
- StochasticSoilModelCollection targetCollection = failureMechanism.StochasticSoilModels;
+ MacroStabilityInwardsStochasticSoilModelCollection targetCollection = failureMechanism.StochasticSoilModels;
targetCollection.AddRange(new[]
{
existingModel
@@ -231,14 +231,14 @@
var existingModel = new TestStochasticSoilModel(modelsName);
var failureMechanism = new MacroStabilityInwardsFailureMechanism();
- StochasticSoilModelCollection targetCollection = failureMechanism.StochasticSoilModels;
+ MacroStabilityInwardsStochasticSoilModelCollection targetCollection = failureMechanism.StochasticSoilModels;
targetCollection.AddRange(new[]
{
existingModel
}, sourceFilePath);
var strategy = new StochasticSoilModelUpdateDataStrategy(failureMechanism);
- StochasticSoilModel readModel = CreateSimpleModel(modelsName, "new profile A", "new profile B");
+ MacroStabilityInwardsStochasticSoilModel readModel = CreateSimpleModel(modelsName, "new profile A", "new profile B");
// Call
IEnumerable affectedObjects = strategy.UpdateModelWithImportedData(new[]
@@ -265,14 +265,14 @@
var existingModel = new TestStochasticSoilModel(modelsName);
var failureMechanism = new MacroStabilityInwardsFailureMechanism();
- StochasticSoilModelCollection targetCollection = failureMechanism.StochasticSoilModels;
+ MacroStabilityInwardsStochasticSoilModelCollection targetCollection = failureMechanism.StochasticSoilModels;
targetCollection.AddRange(new[]
{
existingModel
}, sourceFilePath);
- StochasticSoilProfile firstExistingProfile = existingModel.StochasticSoilProfiles[0];
- StochasticSoilModel readModel = CreateSimpleModel(modelsName, firstExistingProfile.SoilProfile.Name);
+ MacroStabilityInwardsStochasticSoilProfile firstExistingProfile = existingModel.StochasticSoilProfiles[0];
+ MacroStabilityInwardsStochasticSoilModel readModel = CreateSimpleModel(modelsName, firstExistingProfile.SoilProfile.Name);
var calculationWithNotUpdatedProfile = new MacroStabilityInwardsCalculationScenario(new GeneralMacroStabilityInwardsInput());
calculationWithNotUpdatedProfile.InputParameters.StochasticSoilModel = existingModel;
@@ -296,7 +296,7 @@
}, sourceFilePath).ToArray();
// Assert
- StochasticSoilModel firstSoilModel = targetCollection[0];
+ MacroStabilityInwardsStochasticSoilModel firstSoilModel = targetCollection[0];
Assert.AreSame(existingModel, firstSoilModel);
Assert.AreEqual(1, firstSoilModel.StochasticSoilProfiles.Count);
Assert.AreSame(firstExistingProfile, firstSoilModel.StochasticSoilProfiles[0]);
@@ -316,17 +316,17 @@
{
// Setup
const string modelsName = "same model";
- StochasticSoilModel existingModel = CreateStochasticSoilModel(modelsName);
+ MacroStabilityInwardsStochasticSoilModel existingModel = CreateStochasticSoilModel(modelsName);
var failureMechanism = new MacroStabilityInwardsFailureMechanism();
- StochasticSoilModelCollection targetCollection = failureMechanism.StochasticSoilModels;
+ MacroStabilityInwardsStochasticSoilModelCollection targetCollection = failureMechanism.StochasticSoilModels;
targetCollection.AddRange(new[]
{
existingModel
}, sourceFilePath);
- StochasticSoilModel readModel = CreateStochasticSoilModel(modelsName);
- StochasticSoilProfile changedProfile = CloneAndSlightlyModify1DProfile(readModel.StochasticSoilProfiles.ElementAt(0));
+ MacroStabilityInwardsStochasticSoilModel readModel = CreateStochasticSoilModel(modelsName);
+ MacroStabilityInwardsStochasticSoilProfile changedProfile = CloneAndSlightlyModify1DProfile(readModel.StochasticSoilProfiles.ElementAt(0));
readModel.StochasticSoilProfiles[0] = changedProfile;
var calculationWithUpdatedProfile = new MacroStabilityInwardsCalculationScenario(new GeneralMacroStabilityInwardsInput());
@@ -351,7 +351,7 @@
}, sourceFilePath).ToArray();
// Assert
- StochasticSoilModel firstSoilModel = targetCollection[0];
+ MacroStabilityInwardsStochasticSoilModel firstSoilModel = targetCollection[0];
Assert.AreSame(existingModel, firstSoilModel);
Assert.AreEqual(2, firstSoilModel.StochasticSoilProfiles.Count);
Assert.AreSame(existingModel.StochasticSoilProfiles[0], firstSoilModel.StochasticSoilProfiles[0]);
@@ -378,17 +378,17 @@
{
// Setup
const string modelsName = "same model";
- StochasticSoilModel existingModel = CreateStochasticSoilModel(modelsName);
+ MacroStabilityInwardsStochasticSoilModel existingModel = CreateStochasticSoilModel(modelsName);
var failureMechanism = new MacroStabilityInwardsFailureMechanism();
- StochasticSoilModelCollection targetCollection = failureMechanism.StochasticSoilModels;
+ MacroStabilityInwardsStochasticSoilModelCollection targetCollection = failureMechanism.StochasticSoilModels;
targetCollection.AddRange(new[]
{
existingModel
}, sourceFilePath);
- StochasticSoilModel readModel = CreateStochasticSoilModel(modelsName);
- StochasticSoilProfile changedProfile = CloneAndSlightlyModify2DProfile(readModel.StochasticSoilProfiles.ElementAt(1));
+ MacroStabilityInwardsStochasticSoilModel readModel = CreateStochasticSoilModel(modelsName);
+ MacroStabilityInwardsStochasticSoilProfile changedProfile = CloneAndSlightlyModify2DProfile(readModel.StochasticSoilProfiles.ElementAt(1));
readModel.StochasticSoilProfiles[1] = changedProfile;
var calculationWithNotUpdatedProfile = new MacroStabilityInwardsCalculationScenario(new GeneralMacroStabilityInwardsInput());
@@ -413,7 +413,7 @@
}, sourceFilePath).ToArray();
// Assert
- StochasticSoilModel firstSoilModel = targetCollection[0];
+ MacroStabilityInwardsStochasticSoilModel firstSoilModel = targetCollection[0];
Assert.AreSame(existingModel, firstSoilModel);
Assert.AreEqual(2, firstSoilModel.StochasticSoilProfiles.Count);
Assert.AreSame(existingModel.StochasticSoilProfiles[0], firstSoilModel.StochasticSoilProfiles[0]);
@@ -447,7 +447,7 @@
var failureMechanism = new MacroStabilityInwardsFailureMechanism();
failureMechanism.CalculationsGroup.Children.Add(calculation);
- StochasticSoilModelCollection stochasticSoilModelCollection = failureMechanism.StochasticSoilModels;
+ MacroStabilityInwardsStochasticSoilModelCollection stochasticSoilModelCollection = failureMechanism.StochasticSoilModels;
stochasticSoilModelCollection.AddRange(new[]
{
existingModel
@@ -456,7 +456,7 @@
var strategy = new StochasticSoilModelUpdateDataStrategy(failureMechanism);
// Call
- IEnumerable affectedObjects = strategy.UpdateModelWithImportedData(new List(), sourceFilePath).ToArray();
+ IEnumerable affectedObjects = strategy.UpdateModelWithImportedData(new List(), sourceFilePath).ToArray();
// Assert
Assert.IsFalse(calculation.HasOutput);
@@ -478,15 +478,15 @@
var existingModel = new TestStochasticSoilModel(modelsName);
var failureMechanism = new MacroStabilityInwardsFailureMechanism();
- StochasticSoilModelCollection targetCollection = failureMechanism.StochasticSoilModels;
+ MacroStabilityInwardsStochasticSoilModelCollection targetCollection = failureMechanism.StochasticSoilModels;
targetCollection.AddRange(new[]
{
existingModel
}, sourceFilePath);
- StochasticSoilProfile removedProfile = existingModel.StochasticSoilProfiles[0];
- StochasticSoilProfile unaffectedProfile = existingModel.StochasticSoilProfiles[1];
+ MacroStabilityInwardsStochasticSoilProfile removedProfile = existingModel.StochasticSoilProfiles[0];
+ MacroStabilityInwardsStochasticSoilProfile unaffectedProfile = existingModel.StochasticSoilProfiles[1];
- StochasticSoilModel readModel = new TestStochasticSoilModel(modelsName);
+ MacroStabilityInwardsStochasticSoilModel readModel = new TestStochasticSoilModel(modelsName);
readModel.StochasticSoilProfiles.RemoveAt(0);
var calculationWithRemovedProfile = new MacroStabilityInwardsCalculationScenario(new GeneralMacroStabilityInwardsInput());
@@ -511,7 +511,7 @@
}, sourceFilePath).ToArray();
// Assert
- StochasticSoilModel firstSoilModel = targetCollection[0];
+ MacroStabilityInwardsStochasticSoilModel firstSoilModel = targetCollection[0];
Assert.AreSame(existingModel, firstSoilModel);
Assert.AreEqual(1, firstSoilModel.StochasticSoilProfiles.Count);
Assert.AreSame(unaffectedProfile, firstSoilModel.StochasticSoilProfiles[0]);
@@ -531,13 +531,13 @@
}, affectedObjects);
}
- private static StochasticSoilModel CreateStochasticSoilModel(string modelsName)
+ private static MacroStabilityInwardsStochasticSoilModel CreateStochasticSoilModel(string modelsName)
{
- var model = new StochasticSoilModel(modelsName);
+ var model = new MacroStabilityInwardsStochasticSoilModel(modelsName);
model.StochasticSoilProfiles.AddRange(new[]
{
- new StochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, 0)
+ new MacroStabilityInwardsStochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, 0)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D(
"A",
@@ -549,7 +549,7 @@
SoilProfileType.SoilProfile1D,
0)
},
- new StochasticSoilProfile(0.5, SoilProfileType.SoilProfile2D, 0)
+ new MacroStabilityInwardsStochasticSoilProfile(0.5, SoilProfileType.SoilProfile2D, 0)
{
SoilProfile = new MacroStabilityInwardsSoilProfile2D(
"B",
@@ -573,25 +573,25 @@
///
/// Name of the created model.
/// List of names for the profiles to be added to the model.
- /// A new .
- private static StochasticSoilModel CreateSimpleModel(string modelName, params string[] profileNames)
+ /// A new .
+ private static MacroStabilityInwardsStochasticSoilModel CreateSimpleModel(string modelName, params string[] profileNames)
{
- var model = new StochasticSoilModel(modelName);
+ var model = new MacroStabilityInwardsStochasticSoilModel(modelName);
foreach (string profileName in profileNames)
{
model.StochasticSoilProfiles.Add(
- new StochasticSoilProfile(1.0 / profileNames.Length, SoilProfileType.SoilProfile1D, -1)
+ new MacroStabilityInwardsStochasticSoilProfile(1.0 / profileNames.Length, SoilProfileType.SoilProfile1D, -1)
{
SoilProfile = new TestMacroStabilityInwardsSoilProfile1D(profileName)
});
}
return model;
}
- private static StochasticSoilProfile CloneAndSlightlyModify2DProfile(StochasticSoilProfile profile)
+ private static MacroStabilityInwardsStochasticSoilProfile CloneAndSlightlyModify2DProfile(MacroStabilityInwardsStochasticSoilProfile profile)
{
var soilProfile = (MacroStabilityInwardsSoilProfile2D) profile.SoilProfile;
- return new StochasticSoilProfile(profile.Probability, profile.SoilProfileType, profile.SoilProfileId)
+ return new MacroStabilityInwardsStochasticSoilProfile(profile.Probability, profile.SoilProfileType, profile.SoilProfileId)
{
SoilProfile = new MacroStabilityInwardsSoilProfile2D(
soilProfile.Name,
@@ -603,10 +603,10 @@
};
}
- private static StochasticSoilProfile CloneAndSlightlyModify1DProfile(StochasticSoilProfile profile)
+ private static MacroStabilityInwardsStochasticSoilProfile CloneAndSlightlyModify1DProfile(MacroStabilityInwardsStochasticSoilProfile profile)
{
var soilProfile = (MacroStabilityInwardsSoilProfile1D) profile.SoilProfile;
- return new StochasticSoilProfile(profile.Probability, profile.SoilProfileType, profile.SoilProfileId)
+ return new MacroStabilityInwardsStochasticSoilProfile(profile.Probability, profile.SoilProfileType, profile.SoilProfileId)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D(
soilProfile.Name,
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/ImportInfos/MacroStabilityInwardsCalculationGroupContextImportInfoTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/ImportInfos/MacroStabilityInwardsCalculationGroupContextImportInfoTest.cs (.../MacroStabilityInwardsCalculationGroupContextImportInfoTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/ImportInfos/MacroStabilityInwardsCalculationGroupContextImportInfoTest.cs (.../MacroStabilityInwardsCalculationGroupContextImportInfoTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -121,7 +121,7 @@
var context = new MacroStabilityInwardsCalculationGroupContext(new CalculationGroup(),
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/ImportInfos/StochasticSoilModelCollectionContextImportInfoTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/ImportInfos/StochasticSoilModelCollectionContextImportInfoTest.cs (.../StochasticSoilModelCollectionContextImportInfoTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/ImportInfos/StochasticSoilModelCollectionContextImportInfoTest.cs (.../StochasticSoilModelCollectionContextImportInfoTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -146,7 +146,7 @@
var failureMechanism = new MacroStabilityInwardsFailureMechanism();
failureMechanism.CalculationsGroup.Children.Add(new MacroStabilityInwardsCalculationScenario(new GeneralMacroStabilityInwardsInput()));
- var stochasticSoilModelCollection = new StochasticSoilModelCollection();
+ var stochasticSoilModelCollection = new MacroStabilityInwardsStochasticSoilModelCollection();
var context = new StochasticSoilModelCollectionContext(stochasticSoilModelCollection, failureMechanism, assessmentSection);
// Call
@@ -180,7 +180,7 @@
};
failureMechanism.CalculationsGroup.Children.Add(calculationWithOutput);
- var stochasticSoilModelCollection = new StochasticSoilModelCollection();
+ var stochasticSoilModelCollection = new MacroStabilityInwardsStochasticSoilModelCollection();
var context = new StochasticSoilModelCollectionContext(stochasticSoilModelCollection, failureMechanism, assessmentSection);
string textBoxMessage = null;
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/MacroStabilityInwardsPluginTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/MacroStabilityInwardsPluginTest.cs (.../MacroStabilityInwardsPluginTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/MacroStabilityInwardsPluginTest.cs (.../MacroStabilityInwardsPluginTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -94,12 +94,12 @@
PluginTestHelper.AssertPropertyInfoDefined(
propertyInfos,
- typeof(StochasticSoilModel),
+ typeof(MacroStabilityInwardsStochasticSoilModel),
typeof(StochasticSoilModelProperties));
PluginTestHelper.AssertPropertyInfoDefined(
propertyInfos,
- typeof(StochasticSoilProfile),
+ typeof(MacroStabilityInwardsStochasticSoilProfile),
typeof(StochasticSoilProfileProperties));
}
}
@@ -118,8 +118,8 @@
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(MacroStabilityInwardsSurfaceLinesContext)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(MacroStabilityInwardsSurfaceLine)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(StochasticSoilModelCollectionContext)));
- Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(StochasticSoilModel)));
- Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(StochasticSoilProfile)));
+ Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(MacroStabilityInwardsStochasticSoilModel)));
+ Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(MacroStabilityInwardsStochasticSoilProfile)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(MacroStabilityInwardsCalculationScenarioContext)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(MacroStabilityInwardsCalculationGroupContext)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(MacroStabilityInwardsInputContext)));
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/PropertyInfos/MacroStabilityInwardsInputContextPropertyInfoTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/PropertyInfos/MacroStabilityInwardsInputContextPropertyInfoTest.cs (.../MacroStabilityInwardsInputContextPropertyInfoTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/PropertyInfos/MacroStabilityInwardsInputContextPropertyInfoTest.cs (.../MacroStabilityInwardsInputContextPropertyInfoTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -75,7 +75,7 @@
scenario.InputParameters,
scenario,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism, assessmentSection);
// Call
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/PropertyInfos/StochasticSoilModelCollectionContextPropertyInfoTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/PropertyInfos/StochasticSoilModelCollectionContextPropertyInfoTest.cs (.../StochasticSoilModelCollectionContextPropertyInfoTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/PropertyInfos/StochasticSoilModelCollectionContextPropertyInfoTest.cs (.../StochasticSoilModelCollectionContextPropertyInfoTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -69,7 +69,7 @@
var failureMechanism = new MacroStabilityInwardsFailureMechanism();
- var collection = new StochasticSoilModelCollection();
+ var collection = new MacroStabilityInwardsStochasticSoilModelCollection();
var context = new StochasticSoilModelCollectionContext(collection, failureMechanism, assessmentSection);
// Call
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsCalculationGroupContextTreeNodeInfoTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsCalculationGroupContextTreeNodeInfoTest.cs (.../MacroStabilityInwardsCalculationGroupContextTreeNodeInfoTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsCalculationGroupContextTreeNodeInfoTest.cs (.../MacroStabilityInwardsCalculationGroupContextTreeNodeInfoTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -125,7 +125,7 @@
var groupContext = new MacroStabilityInwardsCalculationGroupContext(group,
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -159,7 +159,7 @@
var nodeData = new MacroStabilityInwardsCalculationGroupContext(group,
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -198,13 +198,13 @@
var nodeData = new MacroStabilityInwardsCalculationGroupContext(group,
parentGroup,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
var parentNodeData = new MacroStabilityInwardsCalculationGroupContext(parentGroup,
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -322,7 +322,7 @@
var nodeData = new MacroStabilityInwardsCalculationGroupContext(group,
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -480,7 +480,7 @@
{
new MacroStabilityInwardsSurfaceLine(string.Empty)
},
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -570,7 +570,7 @@
var nodeData = new MacroStabilityInwardsCalculationGroupContext(group,
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -620,7 +620,7 @@
var nodeData = new MacroStabilityInwardsCalculationGroupContext(group,
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -662,13 +662,13 @@
var nodeData = new MacroStabilityInwardsCalculationGroupContext(group,
parentGroup,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
var parentNodeData = new MacroStabilityInwardsCalculationGroupContext(parentGroup,
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -722,13 +722,13 @@
var nodeData = new MacroStabilityInwardsCalculationGroupContext(group,
parentGroup,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
var parentNodeData = new MacroStabilityInwardsCalculationGroupContext(parentGroup,
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -797,13 +797,13 @@
var nodeData = new MacroStabilityInwardsCalculationGroupContext(group,
parentGroup,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
var parentNodeData = new MacroStabilityInwardsCalculationGroupContext(parentGroup,
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -865,13 +865,13 @@
var nodeData = new MacroStabilityInwardsCalculationGroupContext(group,
parentGroup,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
var parentNodeData = new MacroStabilityInwardsCalculationGroupContext(parentGroup,
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -943,13 +943,13 @@
var nodeData = new MacroStabilityInwardsCalculationGroupContext(group,
parentGroup,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
var parentNodeData = new MacroStabilityInwardsCalculationGroupContext(parentGroup,
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -1291,13 +1291,13 @@
var nodeData = new MacroStabilityInwardsCalculationGroupContext(group,
parentGroup,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
var parentNodeData = new MacroStabilityInwardsCalculationGroupContext(parentGroup,
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
parentNodeData.Attach(observer);
@@ -1341,13 +1341,13 @@
var nodeData = new MacroStabilityInwardsCalculationGroupContext(group,
parentGroup,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
macroStabilityInwardsFailureMechanism,
assessmentSection);
var parentNodeData = new MacroStabilityInwardsCalculationGroupContext(parentGroup,
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
macroStabilityInwardsFailureMechanism,
assessmentSection);
parentNodeData.Attach(observer);
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsCalculationScenarioContextTreeNodeInfoTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsCalculationScenarioContextTreeNodeInfoTest.cs (.../MacroStabilityInwardsCalculationScenarioContextTreeNodeInfoTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsCalculationScenarioContextTreeNodeInfoTest.cs (.../MacroStabilityInwardsCalculationScenarioContextTreeNodeInfoTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -158,7 +158,7 @@
var calculationContext = new MacroStabilityInwardsCalculationScenarioContext(new MacroStabilityInwardsCalculationScenario(new GeneralMacroStabilityInwardsInput()),
new CalculationGroup(),
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -190,7 +190,7 @@
var nodeData = new MacroStabilityInwardsCalculationScenarioContext(calculation,
new CalculationGroup(),
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -230,7 +230,7 @@
var nodeData = new MacroStabilityInwardsCalculationScenarioContext(calculation,
new CalculationGroup(),
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -265,7 +265,7 @@
var nodeData = new MacroStabilityInwardsCalculationScenarioContext(calculation,
new CalculationGroup(),
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -309,7 +309,7 @@
var nodeData = new MacroStabilityInwardsCalculationScenarioContext(calculation,
new CalculationGroup(),
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -349,7 +349,7 @@
var nodeData = new MacroStabilityInwardsCalculationScenarioContext(new MacroStabilityInwardsCalculationScenario(new GeneralMacroStabilityInwardsInput()),
new CalculationGroup(),
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -410,13 +410,13 @@
var calculationContext = new MacroStabilityInwardsCalculationScenarioContext(elementToBeRemoved,
group,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
var groupContext = new MacroStabilityInwardsCalculationGroupContext(group,
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -464,13 +464,13 @@
var calculationContext = new MacroStabilityInwardsCalculationScenarioContext(elementToBeRemoved,
group,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
macroStabilityInwardsFailureMechanism,
assessmentSection);
var groupContext = new MacroStabilityInwardsCalculationGroupContext(group,
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
macroStabilityInwardsFailureMechanism,
assessmentSection);
@@ -506,7 +506,7 @@
var calculationContext = new MacroStabilityInwardsCalculationScenarioContext(calculation,
new CalculationGroup(),
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -573,7 +573,7 @@
var calculationContext = new MacroStabilityInwardsCalculationScenarioContext(calculation,
new CalculationGroup(),
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -621,7 +621,7 @@
var calculationContext = new MacroStabilityInwardsCalculationScenarioContext(calculation,
new CalculationGroup(),
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -688,7 +688,7 @@
var calculationContext = new MacroStabilityInwardsCalculationScenarioContext(calculation,
new CalculationGroup(),
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsInputContextTreeNodeInfoTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsInputContextTreeNodeInfoTest.cs (.../MacroStabilityInwardsInputContextTreeNodeInfoTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsInputContextTreeNodeInfoTest.cs (.../MacroStabilityInwardsInputContextTreeNodeInfoTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -93,7 +93,7 @@
new MacroStabilityInwardsInput(new GeneralMacroStabilityInwardsInput()),
new MacroStabilityInwardsCalculationScenario(new GeneralMacroStabilityInwardsInput()),
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
new MacroStabilityInwardsFailureMechanism(),
mocks.Stub());
@@ -114,7 +114,7 @@
new MacroStabilityInwardsInput(new GeneralMacroStabilityInwardsInput()),
new MacroStabilityInwardsCalculationScenario(new GeneralMacroStabilityInwardsInput()),
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
new MacroStabilityInwardsFailureMechanism(),
mocks.Stub());
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/StochasticSoilModelCollectionContextTreeNodeInfoTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/StochasticSoilModelCollectionContextTreeNodeInfoTest.cs (.../StochasticSoilModelCollectionContextTreeNodeInfoTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/StochasticSoilModelCollectionContextTreeNodeInfoTest.cs (.../StochasticSoilModelCollectionContextTreeNodeInfoTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -145,7 +145,7 @@
var failureMechanism = new MacroStabilityInwardsFailureMechanism();
failureMechanism.StochasticSoilModels.AddRange(new[]
{
- new StochasticSoilModel("Name")
+ new MacroStabilityInwardsStochasticSoilModel("Name")
}, "path");
var stochasticSoilModelCollectionContext = new StochasticSoilModelCollectionContext(
@@ -175,16 +175,16 @@
{
new MacroStabilityInwardsSoilLayer1D(10)
}, SoilProfileType.SoilProfile1D, 0);
- var stochasticSoilProfile1 = new StochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
+ var stochasticSoilProfile1 = new MacroStabilityInwardsStochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
{
SoilProfile = soilProfile1
};
- var stochasticSoilProfile2 = new StochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
+ var stochasticSoilProfile2 = new MacroStabilityInwardsStochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
{
SoilProfile = soilProfile2
};
- var stochasticSoilModel = new StochasticSoilModel("Name");
+ var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("Name");
stochasticSoilModel.StochasticSoilProfiles.Add(stochasticSoilProfile1);
stochasticSoilModel.StochasticSoilProfiles.Add(stochasticSoilProfile2);
@@ -230,7 +230,7 @@
using (var treeViewControl = new TreeViewControl())
{
var context = new StochasticSoilModelCollectionContext(
- new StochasticSoilModelCollection(),
+ new MacroStabilityInwardsStochasticSoilModelCollection(),
new MacroStabilityInwardsFailureMechanism(),
assessmentSection);
var gui = mocks.Stub();
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/StochasticSoilModelTreeNodeInfoTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/StochasticSoilModelTreeNodeInfoTest.cs (.../StochasticSoilModelTreeNodeInfoTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/StochasticSoilModelTreeNodeInfoTest.cs (.../StochasticSoilModelTreeNodeInfoTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -44,7 +44,7 @@
public void SetUp()
{
plugin = new MacroStabilityInwardsPlugin();
- info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(StochasticSoilModel));
+ info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(MacroStabilityInwardsStochasticSoilModel));
}
[TearDown]
@@ -82,7 +82,7 @@
{
// Setup
const string name = "test test 123";
- var model = new StochasticSoilModel(name);
+ var model = new MacroStabilityInwardsStochasticSoilModel(name);
// Call
string text = info.Text(model);
@@ -95,7 +95,7 @@
public void Image_Always_ReturnsSetImage()
{
// Setup
- var model = new StochasticSoilModel("A");
+ var model = new MacroStabilityInwardsStochasticSoilModel("A");
// Call
Image image = info.Image(model);
@@ -108,22 +108,22 @@
public void ChildNodeObjects_Always_ReturnsChildrenOfData()
{
// Setup
- var stochasticSoilProfile1 = new StochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
+ var stochasticSoilProfile1 = new MacroStabilityInwardsStochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D("soilProfile1", 0, new List
{
new MacroStabilityInwardsSoilLayer1D(10)
}, SoilProfileType.SoilProfile1D, 0)
};
- var stochasticSoilProfile2 = new StochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
+ var stochasticSoilProfile2 = new MacroStabilityInwardsStochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
{
SoilProfile = new MacroStabilityInwardsSoilProfile1D("soilProfile2", 0, new List
{
new MacroStabilityInwardsSoilLayer1D(10)
}, SoilProfileType.SoilProfile1D, 0)
};
- var stochasticSoilModel = new StochasticSoilModel("Name");
+ var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModel("Name");
stochasticSoilModel.StochasticSoilProfiles.Add(stochasticSoilProfile1);
stochasticSoilModel.StochasticSoilProfiles.Add(stochasticSoilProfile2);
@@ -143,7 +143,7 @@
public void ContextMenuStrip_Always_CallsBuilder()
{
// Setup
- var model = new StochasticSoilModel("A");
+ var model = new MacroStabilityInwardsStochasticSoilModel("A");
var mocks = new MockRepository();
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/StochasticSoilProfileTreeNodeInfoTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/StochasticSoilProfileTreeNodeInfoTest.cs (.../StochasticSoilProfileTreeNodeInfoTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/StochasticSoilProfileTreeNodeInfoTest.cs (.../StochasticSoilProfileTreeNodeInfoTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -45,7 +45,7 @@
{
mocks = new MockRepository();
plugin = new MacroStabilityInwardsPlugin();
- info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(StochasticSoilProfile));
+ info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(MacroStabilityInwardsStochasticSoilProfile));
}
[TearDown]
@@ -92,7 +92,7 @@
{
soilLayer
}, SoilProfileType.SoilProfile2D, 0);
- var stochasticSoilProfile = mocks.StrictMock(0.1, SoilProfileType.SoilProfile1D, 1234L);
+ var stochasticSoilProfile = mocks.StrictMock(0.1, SoilProfileType.SoilProfile1D, 1234L);
stochasticSoilProfile.SoilProfile = soilProfile;
mocks.ReplayAll();
@@ -112,7 +112,7 @@
{
soilLayer
}, SoilProfileType.SoilProfile1D, 0);
- var stochasticSoilProfile = mocks.StrictMock(0.1, SoilProfileType.SoilProfile1D, 1234L);
+ var stochasticSoilProfile = mocks.StrictMock(0.1, SoilProfileType.SoilProfile1D, 1234L);
stochasticSoilProfile.SoilProfile = soilProfile;
mocks.ReplayAll();
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/UpdateInfos/StochasticSoilModelCollectionContextUpdateInfoTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/UpdateInfos/StochasticSoilModelCollectionContextUpdateInfoTest.cs (.../StochasticSoilModelCollectionContextUpdateInfoTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/UpdateInfos/StochasticSoilModelCollectionContextUpdateInfoTest.cs (.../StochasticSoilModelCollectionContextUpdateInfoTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -87,7 +87,7 @@
mocks.ReplayAll();
var failureMechanism = new MacroStabilityInwardsFailureMechanism();
- var stochasticSoilModel = new StochasticSoilModelCollection();
+ var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModelCollection();
var context = new StochasticSoilModelCollectionContext(stochasticSoilModel, failureMechanism, assessmentSection);
@@ -108,8 +108,8 @@
mocks.ReplayAll();
var failureMechanism = new MacroStabilityInwardsFailureMechanism();
- var stochasticSoilModel = new StochasticSoilModelCollection();
- stochasticSoilModel.AddRange(Enumerable.Empty(), "some/path");
+ var stochasticSoilModel = new MacroStabilityInwardsStochasticSoilModelCollection();
+ stochasticSoilModel.AddRange(Enumerable.Empty(), "some/path");
var context = new StochasticSoilModelCollectionContext(stochasticSoilModel, failureMechanism, assessmentSection);
@@ -148,7 +148,7 @@
var failureMechanism = new MacroStabilityInwardsFailureMechanism();
failureMechanism.CalculationsGroup.Children.Add(new MacroStabilityInwardsCalculationScenario(new GeneralMacroStabilityInwardsInput()));
- var stochasticSoilModelCollection = new StochasticSoilModelCollection();
+ var stochasticSoilModelCollection = new MacroStabilityInwardsStochasticSoilModelCollection();
var context = new StochasticSoilModelCollectionContext(stochasticSoilModelCollection, failureMechanism, assessmentSection);
// Call
@@ -182,7 +182,7 @@
};
failureMechanism.CalculationsGroup.Children.Add(calculationWithOutput);
- var stochasticSoilModelCollection = new StochasticSoilModelCollection();
+ var stochasticSoilModelCollection = new MacroStabilityInwardsStochasticSoilModelCollection();
var context = new StochasticSoilModelCollectionContext(stochasticSoilModelCollection, failureMechanism, assessmentSection);
string textBoxMessage = null;
@@ -222,7 +222,7 @@
mocks.ReplayAll();
const string expectedFilePath = "some/path";
- var stochasticSoilModelCollection = new StochasticSoilModelCollection();
+ var stochasticSoilModelCollection = new MacroStabilityInwardsStochasticSoilModelCollection();
stochasticSoilModelCollection.AddRange(new[]
{
new TestStochasticSoilModel()
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/ViewInfos/MacroStabilityInwardsCalculationsViewInfoTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/ViewInfos/MacroStabilityInwardsCalculationsViewInfoTest.cs (.../MacroStabilityInwardsCalculationsViewInfoTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/ViewInfos/MacroStabilityInwardsCalculationsViewInfoTest.cs (.../MacroStabilityInwardsCalculationsViewInfoTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -79,7 +79,7 @@
var calculationGroupContext = new MacroStabilityInwardsCalculationGroupContext(calculationGroup,
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -119,7 +119,7 @@
var calculationGroupContext = new MacroStabilityInwardsCalculationGroupContext(failureMechanism.CalculationsGroup,
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -143,7 +143,7 @@
var calculationGroupContext = new MacroStabilityInwardsCalculationGroupContext(calculationGroup,
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
failureMechanism,
assessmentSection);
@@ -313,7 +313,7 @@
var assessmentSection = mocks.Stub();
var failureMechanism = mocks.StrictMock();
var calculationsGroup = mocks.StrictMock();
- var calculationGroupContext = new MacroStabilityInwardsCalculationGroupContext(calculationsGroup, null, Enumerable.Empty(), Enumerable.Empty(), failureMechanism, assessmentSection);
+ var calculationGroupContext = new MacroStabilityInwardsCalculationGroupContext(calculationsGroup, null, Enumerable.Empty(), Enumerable.Empty(), failureMechanism, assessmentSection);
view.Expect(v => v.AssessmentSection = assessmentSection);
view.Expect(v => v.MacroStabilityInwardsFailureMechanism = failureMechanism);
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/ViewInfos/MacroStabilityInwardsInputViewInfoTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/ViewInfos/MacroStabilityInwardsInputViewInfoTest.cs (.../MacroStabilityInwardsInputViewInfoTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/ViewInfos/MacroStabilityInwardsInputViewInfoTest.cs (.../MacroStabilityInwardsInputViewInfoTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -92,7 +92,7 @@
var calculation = new MacroStabilityInwardsCalculationScenario(new GeneralMacroStabilityInwardsInput());
var calculationInputContext = new MacroStabilityInwardsInputContext(input, calculation, Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
new MacroStabilityInwardsFailureMechanism(),
assessmentSection);
@@ -115,7 +115,7 @@
var calculationScenarioContext = new MacroStabilityInwardsCalculationScenarioContext(calculation,
new CalculationGroup(),
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
new MacroStabilityInwardsFailureMechanism(),
assessmentSection);
@@ -146,7 +146,7 @@
var calculationScenarioContext = new MacroStabilityInwardsCalculationScenarioContext(calculationToRemove,
new CalculationGroup(),
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
new MacroStabilityInwardsFailureMechanism(),
assessmentSection);
@@ -178,7 +178,7 @@
var calculationGroupContext = new MacroStabilityInwardsCalculationGroupContext(calculationGroup,
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
new MacroStabilityInwardsFailureMechanism(),
assessmentSection);
using (var view = new MacroStabilityInwardsInputView
@@ -209,7 +209,7 @@
var calculationGroupContext = new MacroStabilityInwardsCalculationGroupContext(new CalculationGroup(),
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
new MacroStabilityInwardsFailureMechanism(),
assessmentSection);
using (var view = new MacroStabilityInwardsInputView
@@ -242,7 +242,7 @@
var calculationGroupContext = new MacroStabilityInwardsCalculationGroupContext(calculationGroup,
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
new MacroStabilityInwardsFailureMechanism(),
assessmentSection);
using (var view = new MacroStabilityInwardsInputView
@@ -275,7 +275,7 @@
var calculationGroupContext = new MacroStabilityInwardsCalculationGroupContext(new CalculationGroup(),
null,
Enumerable.Empty(),
- Enumerable.Empty(),
+ Enumerable.Empty(),
new MacroStabilityInwardsFailureMechanism(),
assessmentSection);
using (var view = new MacroStabilityInwardsInputView
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsDataSynchronizationServiceTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsDataSynchronizationServiceTest.cs (.../MacroStabilityInwardsDataSynchronizationServiceTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsDataSynchronizationServiceTest.cs (.../MacroStabilityInwardsDataSynchronizationServiceTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -353,7 +353,7 @@
{
// Setup
MacroStabilityInwardsFailureMechanism failureMechanism = null;
- var soilModel = new StochasticSoilModel("A");
+ var soilModel = new MacroStabilityInwardsStochasticSoilModel("A");
// Call
TestDelegate call = () => MacroStabilityInwardsDataSynchronizationService.RemoveStochasticSoilModel(failureMechanism, soilModel);
@@ -368,7 +368,7 @@
{
// Setup
var failureMechanism = new MacroStabilityInwardsFailureMechanism();
- StochasticSoilModel soilModel = null;
+ MacroStabilityInwardsStochasticSoilModel soilModel = null;
// Call
TestDelegate call = () => MacroStabilityInwardsDataSynchronizationService.RemoveStochasticSoilModel(failureMechanism, soilModel);
@@ -383,7 +383,7 @@
{
// Setup
MacroStabilityInwardsFailureMechanism failureMechanism = MacroStabilityInwardsTestDataGenerator.GetMacroStabilityInwardsFailureMechanismWithAllCalculationConfigurations();
- StochasticSoilModel soilModel = failureMechanism.StochasticSoilModels[1];
+ MacroStabilityInwardsStochasticSoilModel soilModel = failureMechanism.StochasticSoilModels[1];
MacroStabilityInwardsCalculation[] calculationsWithSoilModel = failureMechanism.Calculations
.Cast()
.Where(c => ReferenceEquals(c.InputParameters.StochasticSoilModel, soilModel))
@@ -493,7 +493,7 @@
// Call
TestDelegate test = () => MacroStabilityInwardsDataSynchronizationService.RemoveStochasticSoilProfileFromInput(
null,
- new StochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, -1));
+ new MacroStabilityInwardsStochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, -1));
// Assert
var exception = Assert.Throws(test);
@@ -521,12 +521,12 @@
IEnumerable calculations = failureMechanism
.Calculations
.Cast();
- StochasticSoilProfile profileToDelete = null;
+ MacroStabilityInwardsStochasticSoilProfile profileToDelete = null;
foreach (MacroStabilityInwardsCalculationScenario calculationScenario in calculations)
{
MacroStabilityInwardsInput input = calculationScenario.InputParameters;
- StochasticSoilProfile currentProfile = input.StochasticSoilProfile;
+ MacroStabilityInwardsStochasticSoilProfile currentProfile = input.StochasticSoilProfile;
if (profileToDelete == null)
{
profileToDelete = currentProfile;
@@ -552,14 +552,14 @@
IEnumerable calculations = failureMechanism
.Calculations
.Cast();
- StochasticSoilProfile profileToDelete = null;
+ MacroStabilityInwardsStochasticSoilProfile profileToDelete = null;
var expectedInputs = new List();
foreach (MacroStabilityInwardsCalculationScenario calculationScenario in calculations)
{
MacroStabilityInwardsInput input = calculationScenario.InputParameters;
- StochasticSoilProfile currentProfile = input.StochasticSoilProfile;
+ MacroStabilityInwardsStochasticSoilProfile currentProfile = input.StochasticSoilProfile;
if (profileToDelete == null)
{
profileToDelete = currentProfile;
@@ -590,12 +590,12 @@
var expectedAffectedObjects = new List();
- StochasticSoilProfile profileToDelete = null;
+ MacroStabilityInwardsStochasticSoilProfile profileToDelete = null;
foreach (MacroStabilityInwardsCalculationScenario calculationScenario in calculations)
{
MacroStabilityInwardsInput input = calculationScenario.InputParameters;
- StochasticSoilProfile currentProfile = input.StochasticSoilProfile;
+ MacroStabilityInwardsStochasticSoilProfile currentProfile = input.StochasticSoilProfile;
if (profileToDelete == null)
{
profileToDelete = currentProfile;
@@ -624,7 +624,7 @@
// Call
TestDelegate test = () => MacroStabilityInwardsDataSynchronizationService.ClearStochasticSoilProfileDependentData(
null,
- new StochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, -1));
+ new MacroStabilityInwardsStochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, -1));
// Assert
var exception = Assert.Throws(test);
@@ -652,12 +652,12 @@
IEnumerable calculations = failureMechanism
.Calculations
.Cast();
- StochasticSoilProfile profileToDelete = null;
+ MacroStabilityInwardsStochasticSoilProfile profileToDelete = null;
foreach (MacroStabilityInwardsCalculationScenario calculationScenario in calculations)
{
MacroStabilityInwardsInput input = calculationScenario.InputParameters;
- StochasticSoilProfile currentProfile = input.StochasticSoilProfile;
+ MacroStabilityInwardsStochasticSoilProfile currentProfile = input.StochasticSoilProfile;
if (profileToDelete == null)
{
profileToDelete = currentProfile;
@@ -683,14 +683,14 @@
IEnumerable calculations = failureMechanism
.Calculations
.Cast();
- StochasticSoilProfile profileToDelete = null;
+ MacroStabilityInwardsStochasticSoilProfile profileToDelete = null;
var expectedInputs = new List();
foreach (MacroStabilityInwardsCalculationScenario calculationScenario in calculations)
{
MacroStabilityInwardsInput input = calculationScenario.InputParameters;
- StochasticSoilProfile currentProfile = input.StochasticSoilProfile;
+ MacroStabilityInwardsStochasticSoilProfile currentProfile = input.StochasticSoilProfile;
if (profileToDelete == null)
{
profileToDelete = currentProfile;
@@ -721,12 +721,12 @@
var expectedAffectedObjects = new List();
- StochasticSoilProfile profileToDelete = null;
+ MacroStabilityInwardsStochasticSoilProfile profileToDelete = null;
foreach (MacroStabilityInwardsCalculationScenario calculationScenario in calculations)
{
MacroStabilityInwardsInput input = calculationScenario.InputParameters;
- StochasticSoilProfile currentProfile = input.StochasticSoilProfile;
+ MacroStabilityInwardsStochasticSoilProfile currentProfile = input.StochasticSoilProfile;
if (profileToDelete == null)
{
profileToDelete = currentProfile;
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsInputServiceTest.cs
===================================================================
diff -u -r801944e042197afab2cf3bb57359970479e286b3 -r78382ec129ddc7537096860680cef36f3796700d
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsInputServiceTest.cs (.../MacroStabilityInwardsInputServiceTest.cs) (revision 801944e042197afab2cf3bb57359970479e286b3)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsInputServiceTest.cs (.../MacroStabilityInwardsInputServiceTest.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
@@ -33,7 +33,7 @@
public void SetMatchingStochasticSoilModel_SurfaceLineOverlappingSingleSoilModel_SetsSoilModel()
{
// Setup
- var soilModel = new StochasticSoilModel("A");
+ var soilModel = new MacroStabilityInwardsStochasticSoilModel("A");
var input = new MacroStabilityInwardsInput(new GeneralMacroStabilityInwardsInput());
// Call
@@ -51,8 +51,8 @@
{
// Setup
var input = new MacroStabilityInwardsInput(new GeneralMacroStabilityInwardsInput());
- var soilModel1 = new StochasticSoilModel("A");
- var soilModel2 = new StochasticSoilModel("C");
+ var soilModel1 = new MacroStabilityInwardsStochasticSoilModel("A");
+ var soilModel2 = new MacroStabilityInwardsStochasticSoilModel("C");
// Call
MacroStabilityInwardsInputService.SetMatchingStochasticSoilModel(input, new[]
@@ -69,14 +69,14 @@
public void SetMatchingStochasticSoilModel_CurrentSoilModelNotInOverlappingMultipleSoilModels_ClearsModel()
{
// Setup
- var nonOverlappingSoilModel = new StochasticSoilModel("A");
+ var nonOverlappingSoilModel = new MacroStabilityInwardsStochasticSoilModel("A");
var input = new MacroStabilityInwardsInput(new GeneralMacroStabilityInwardsInput())
{
StochasticSoilModel = nonOverlappingSoilModel
};
- var soilModel1 = new StochasticSoilModel("A");
- var soilModel2 = new StochasticSoilModel("C");
+ var soilModel1 = new MacroStabilityInwardsStochasticSoilModel("A");
+ var soilModel2 = new MacroStabilityInwardsStochasticSoilModel("C");
// Call
MacroStabilityInwardsInputService.SetMatchingStochasticSoilModel(input, new[]
@@ -93,9 +93,9 @@
public void SyncStochasticSoilProfileWithStochasticSoilModel_SingleStochasticSoilProfileInStochasticSoilModel_SetsStochasticSoilProfile()
{
// Setup
- var soilProfile = new StochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1);
+ var soilProfile = new MacroStabilityInwardsStochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1);
- var soilModel = new StochasticSoilModel("A");
+ var soilModel = new MacroStabilityInwardsStochasticSoilModel("A");
soilModel.StochasticSoilProfiles.Add(soilProfile);
var input = new MacroStabilityInwardsInput(new GeneralMacroStabilityInwardsInput())
@@ -114,11 +114,11 @@
public void SyncStochasticSoilProfileWithStochasticSoilModel_MultipleStochasticSoilProfilesInStochasticSoilModel_DoesNotSetStochasticSoilProfile()
{
// Setup
- var soilModel = new StochasticSoilModel("A");
+ var soilModel = new MacroStabilityInwardsStochasticSoilModel("A");
soilModel.StochasticSoilProfiles.AddRange(new[]
{
- new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 1),
- new StochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 2)
+ new MacroStabilityInwardsStochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 1),
+ new MacroStabilityInwardsStochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 2)
});
var input = new MacroStabilityInwardsInput(new GeneralMacroStabilityInwardsInput())
{
@@ -136,9 +136,9 @@
public void SyncStochasticSoilProfileWithStochasticSoilModel_SingleStochasticSoilProfileInSoilModelAlreadySet_StochasticSoilProfileDoesNotChange()
{
// Setup
- var soilProfile = new StochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1);
+ var soilProfile = new MacroStabilityInwardsStochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1);
- var soilModel = new StochasticSoilModel("A");
+ var soilModel = new MacroStabilityInwardsStochasticSoilModel("A");
soilModel.StochasticSoilProfiles.Add(soilProfile);
var input = new MacroStabilityInwardsInput(new GeneralMacroStabilityInwardsInput())