Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLine.cs
===================================================================
diff -u -r00e2b17f81b30dfe4b71e3535424256d7cd02895 -rf2838b78c54529e9b15208b44de854f7760e350f
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLine.cs (.../MacroStabilityInwardsSoilProfileUnderSurfaceLine.cs) (revision 00e2b17f81b30dfe4b71e3535424256d7cd02895)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLine.cs (.../MacroStabilityInwardsSoilProfileUnderSurfaceLine.cs) (revision f2838b78c54529e9b15208b44de854f7760e350f)
@@ -32,18 +32,12 @@
///
/// Creates a new instance of .
///
- /// The name of the profile.
/// The layers in the profile.
/// The preconsolidation stresses defined for the profile.
/// Thrown when any parameter is null.
- public MacroStabilityInwardsSoilProfileUnderSurfaceLine(string name,
- IEnumerable layers,
+ public MacroStabilityInwardsSoilProfileUnderSurfaceLine(IEnumerable layers,
IEnumerable preconsolidationStresses)
{
- if (name == null)
- {
- throw new ArgumentNullException(nameof(name));
- }
if (layers == null)
{
throw new ArgumentNullException(nameof(layers));
@@ -52,18 +46,11 @@
{
throw new ArgumentNullException(nameof(preconsolidationStresses));
}
-
- Name = name;
Layers = layers;
PreconsolidationStresses = preconsolidationStresses;
}
///
- /// Gets the name of the profile.
- ///
- public string Name { get; }
-
- ///
/// Gets the layers in the profile.
///
public IEnumerable Layers { get; }
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.cs
===================================================================
diff -u -r00e2b17f81b30dfe4b71e3535424256d7cd02895 -rf2838b78c54529e9b15208b44de854f7760e350f
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.cs (.../MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.cs) (revision 00e2b17f81b30dfe4b71e3535424256d7cd02895)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.cs (.../MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.cs) (revision f2838b78c54529e9b15208b44de854f7760e350f)
@@ -83,7 +83,7 @@
localizedSurfaceLine.First().X,
localizedSurfaceLine.Last().X));
- return GeometriesToIntersections(soilProfile.Name, layerGeometries, surfaceLineGeometry);
+ return GeometriesToIntersections(layerGeometries, surfaceLineGeometry);
}
private static MacroStabilityInwardsSoilProfileUnderSurfaceLine Create(MacroStabilityInwardsSoilProfile2D soilProfile)
@@ -94,17 +94,15 @@
layer.Holes.Select(RingToPoints).ToArray(),
layer.Data)).ToArray();
- return new MacroStabilityInwardsSoilProfileUnderSurfaceLine(soilProfile.Name, layersUnderSurfaceLine, soilProfile.PreconsolidationStresses);
+ return new MacroStabilityInwardsSoilProfileUnderSurfaceLine(layersUnderSurfaceLine, soilProfile.PreconsolidationStresses);
}
private static Point2D[] RingToPoints(Ring ring)
{
return ring.Points.ToArray();
}
- private static MacroStabilityInwardsSoilProfileUnderSurfaceLine GeometriesToIntersections(string name,
- IEnumerable layerGeometries,
- IEnumerable surfaceLineGeometry)
+ private static MacroStabilityInwardsSoilProfileUnderSurfaceLine GeometriesToIntersections(IEnumerable layerGeometries, IEnumerable surfaceLineGeometry)
{
var collection = new Collection();
@@ -118,7 +116,7 @@
}
}
- return new MacroStabilityInwardsSoilProfileUnderSurfaceLine(name, collection, Enumerable.Empty());
+ return new MacroStabilityInwardsSoilProfileUnderSurfaceLine(collection, Enumerable.Empty());
}
private static TempSoilLayerGeometry As2DGeometry(MacroStabilityInwardsSoilLayer1D layer, MacroStabilityInwardsSoilProfile1D soilProfile, double minX, double maxX)
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Calculators/Input/SoilProfile.cs
===================================================================
diff -u -r00e2b17f81b30dfe4b71e3535424256d7cd02895 -rf2838b78c54529e9b15208b44de854f7760e350f
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Calculators/Input/SoilProfile.cs (.../SoilProfile.cs) (revision 00e2b17f81b30dfe4b71e3535424256d7cd02895)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Calculators/Input/SoilProfile.cs (.../SoilProfile.cs) (revision f2838b78c54529e9b15208b44de854f7760e350f)
@@ -32,18 +32,11 @@
///
/// Creates a new instance of .
///
- /// The name of the profile.
/// The layers in the profile.
/// The preconsolidation stresses in the profile.
/// Thrown when any parameter is null.
- public SoilProfile(string name,
- IEnumerable layers,
- IEnumerable preconsolidationStresses)
+ public SoilProfile(IEnumerable layers, IEnumerable preconsolidationStresses)
{
- if (name == null)
- {
- throw new ArgumentNullException(nameof(name));
- }
if (layers == null)
{
throw new ArgumentNullException(nameof(layers));
@@ -53,17 +46,11 @@
throw new ArgumentNullException(nameof(preconsolidationStresses));
}
- Name = name;
Layers = layers;
PreconsolidationStresses = preconsolidationStresses;
}
///
- /// The name of the profile.
- ///
- public string Name { get; }
-
- ///
/// Gets the layers in the profile.
///
public IEnumerable Layers { get; }
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/Input/SoilProfileCreator.cs
===================================================================
diff -u -r00e2b17f81b30dfe4b71e3535424256d7cd02895 -rf2838b78c54529e9b15208b44de854f7760e350f
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/Input/SoilProfileCreator.cs (.../SoilProfileCreator.cs) (revision 00e2b17f81b30dfe4b71e3535424256d7cd02895)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/Input/SoilProfileCreator.cs (.../SoilProfileCreator.cs) (revision f2838b78c54529e9b15208b44de854f7760e350f)
@@ -64,17 +64,13 @@
throw new ArgumentNullException(nameof(layersWithSoils));
}
- var profile = new SoilProfile2D
- {
- Name = soilProfile.Name
- };
+ var profile = new SoilProfile2D();
profile.PreconsolidationStresses.AddRange(CreatePreconsolidationStresses(soilProfile));
foreach (KeyValuePair layerWithSoil in layersWithSoils)
{
profile.Surfaces.Add(new SoilLayer2D
{
- Name = layerWithSoil.Key.MaterialName,
IsAquifer = layerWithSoil.Key.IsAquifer,
Soil = layerWithSoil.Value,
GeometrySurface = CreateGeometrySurface(layerWithSoil.Key),
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/Converters/SoilProfileConverter.cs
===================================================================
diff -u -r00e2b17f81b30dfe4b71e3535424256d7cd02895 -rf2838b78c54529e9b15208b44de854f7760e350f
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/Converters/SoilProfileConverter.cs (.../SoilProfileConverter.cs) (revision 00e2b17f81b30dfe4b71e3535424256d7cd02895)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/Converters/SoilProfileConverter.cs (.../SoilProfileConverter.cs) (revision f2838b78c54529e9b15208b44de854f7760e350f)
@@ -59,7 +59,7 @@
IEnumerable layers = ConvertLayers(soilProfile.Layers);
IEnumerable preconsolidationStresses = ConvertPreconsolidationStresses(soilProfile.PreconsolidationStresses);
- return new SoilProfile(soilProfile.Name, layers, preconsolidationStresses);
+ return new SoilProfile(layers, preconsolidationStresses);
}
///
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineTest.cs
===================================================================
diff -u -r00e2b17f81b30dfe4b71e3535424256d7cd02895 -rf2838b78c54529e9b15208b44de854f7760e350f
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineTest.cs (.../MacroStabilityInwardsSoilProfileUnderSurfaceLineTest.cs) (revision 00e2b17f81b30dfe4b71e3535424256d7cd02895)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineTest.cs (.../MacroStabilityInwardsSoilProfileUnderSurfaceLineTest.cs) (revision f2838b78c54529e9b15208b44de854f7760e350f)
@@ -31,37 +31,22 @@
public class MacroStabilityInwardsSoilProfileUnderSurfaceLineTest
{
[Test]
- public void Constructor_NameNull_ThrowsArgumentNullException()
+ public void Constructor_LayersNull_ThrowsArgumentNullException()
{
// Call
TestDelegate test = () => new MacroStabilityInwardsSoilProfileUnderSurfaceLine(null,
- Enumerable.Empty(),
Enumerable.Empty());
// Assert
var exception = Assert.Throws(test);
- Assert.AreEqual("name", exception.ParamName);
- }
-
- [Test]
- public void Constructor_LayersNull_ThrowsArgumentNullException()
- {
- // Call
- TestDelegate test = () => new MacroStabilityInwardsSoilProfileUnderSurfaceLine("name",
- null,
- Enumerable.Empty());
-
- // Assert
- var exception = Assert.Throws(test);
Assert.AreEqual("layers", exception.ParamName);
}
[Test]
public void Constructor_PreconsolidationStressesNull_ThrowsArgumentNullException()
{
// Call
- TestDelegate call = () => new MacroStabilityInwardsSoilProfileUnderSurfaceLine("name",
- Enumerable.Empty(),
+ TestDelegate call = () => new MacroStabilityInwardsSoilProfileUnderSurfaceLine(Enumerable.Empty(),
null);
// Assert
@@ -73,16 +58,14 @@
public void Constructor_WithValidParameters_NewInstanceWithPropertiesSet()
{
// Call
- const string name = "Profile Name";
IEnumerable layers = Enumerable.Empty();
IEnumerable preconsolidationStresses =
Enumerable.Empty();
// Setup
- var profile = new MacroStabilityInwardsSoilProfileUnderSurfaceLine(name, layers, preconsolidationStresses);
+ var profile = new MacroStabilityInwardsSoilProfileUnderSurfaceLine(layers, preconsolidationStresses);
// Assert
- Assert.AreEqual(name, profile.Name);
Assert.AreSame(layers, profile.Layers);
Assert.AreSame(preconsolidationStresses, profile.PreconsolidationStresses);
}
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/Input/SoilProfileTest.cs
===================================================================
diff -u -r00e2b17f81b30dfe4b71e3535424256d7cd02895 -rf2838b78c54529e9b15208b44de854f7760e350f
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/Input/SoilProfileTest.cs (.../SoilProfileTest.cs) (revision 00e2b17f81b30dfe4b71e3535424256d7cd02895)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/Input/SoilProfileTest.cs (.../SoilProfileTest.cs) (revision f2838b78c54529e9b15208b44de854f7760e350f)
@@ -23,28 +23,18 @@
using Core.Common.Base.Geometry;
using NUnit.Framework;
using Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Input;
+using Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.UpliftVan.Input;
namespace Ringtoets.MacroStabilityInwards.KernelWrapper.Test.Calculators.Input
{
[TestFixture]
public class SoilProfileTest
{
[Test]
- public void Constructor_NameNull_ThrowsArgumentNullException()
- {
- // Call
- TestDelegate call = () => new SoilProfile(null, new SoilLayer[0], new PreconsolidationStress[0]);
-
- // Assert
- var exception = Assert.Throws(call);
- Assert.AreEqual("name", exception.ParamName);
- }
-
- [Test]
public void Constructor_LayersNull_ThrowsArgumentNullException()
{
// Call
- TestDelegate call = () => new SoilProfile("name", null, new PreconsolidationStress[0]);
+ TestDelegate call = () => new SoilProfile(null, new PreconsolidationStress[0]);
// Assert
var exception = Assert.Throws(call);
@@ -55,7 +45,7 @@
public void Constructor_PreconsolidationStressesNull_ThrowsArgumentNullException()
{
// Call
- TestDelegate call = () => new SoilProfile("name", new SoilLayer[0], null);
+ TestDelegate call = () => new SoilProfile(new SoilLayer[0], null);
// Assert
var exception = Assert.Throws(call);
@@ -66,7 +56,6 @@
public void Constructor_ExpectedValues()
{
// Setup
- const string name = "Soil Profile Name";
var layers = new[]
{
new SoilLayer(new Point2D[0], new Point2D[0][], new SoilLayer.ConstructionProperties())
@@ -77,10 +66,9 @@
};
// Call
- var profile = new SoilProfile(name, layers, preconsolidationStresses);
+ var profile = new SoilProfile(layers, preconsolidationStresses);
// Assert
- Assert.AreEqual(name, profile.Name);
Assert.AreSame(layers, profile.Layers);
Assert.AreSame(preconsolidationStresses, profile.PreconsolidationStresses);
}
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/UpliftVan/UpliftVanCalculatorTest.cs
===================================================================
diff -u -r00e2b17f81b30dfe4b71e3535424256d7cd02895 -rf2838b78c54529e9b15208b44de854f7760e350f
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/UpliftVan/UpliftVanCalculatorTest.cs (.../UpliftVanCalculatorTest.cs) (revision 00e2b17f81b30dfe4b71e3535424256d7cd02895)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/UpliftVan/UpliftVanCalculatorTest.cs (.../UpliftVanCalculatorTest.cs) (revision f2838b78c54529e9b15208b44de854f7760e350f)
@@ -325,48 +325,47 @@
private static SoilProfile CreateValidSoilProfile(MacroStabilityInwardsSurfaceLine surfaceLine)
{
- return new SoilProfile("Valid 2D profile",
- new[]
- {
- new SoilLayer(
- new[]
- {
- surfaceLine.LocalGeometry.First(),
- surfaceLine.LocalGeometry.Last()
- },
- Enumerable.Empty(),
- new SoilLayer.ConstructionProperties()),
- new SoilLayer(
- new[]
- {
- surfaceLine.LocalGeometry.First(),
- surfaceLine.LocalGeometry.Last()
- },
- Enumerable.Empty(),
- new SoilLayer.ConstructionProperties
- {
- IsAquifer = true
- }),
- new SoilLayer(
- new[]
- {
- surfaceLine.LocalGeometry.First(),
- surfaceLine.LocalGeometry.Last()
- },
- Enumerable.Empty(),
- new SoilLayer.ConstructionProperties()),
- new SoilLayer(
- new[]
- {
- surfaceLine.LocalGeometry.First(),
- surfaceLine.LocalGeometry.Last()
- },
- Enumerable.Empty(),
- new SoilLayer.ConstructionProperties())
- }, new[]
- {
- new PreconsolidationStress(new Point2D(0, 0), 1.1)
- });
+ return new SoilProfile(new[]
+ {
+ new SoilLayer(
+ new[]
+ {
+ surfaceLine.LocalGeometry.First(),
+ surfaceLine.LocalGeometry.Last()
+ },
+ Enumerable.Empty(),
+ new SoilLayer.ConstructionProperties()),
+ new SoilLayer(
+ new[]
+ {
+ surfaceLine.LocalGeometry.First(),
+ surfaceLine.LocalGeometry.Last()
+ },
+ Enumerable.Empty(),
+ new SoilLayer.ConstructionProperties
+ {
+ IsAquifer = true
+ }),
+ new SoilLayer(
+ new[]
+ {
+ surfaceLine.LocalGeometry.First(),
+ surfaceLine.LocalGeometry.Last()
+ },
+ Enumerable.Empty(),
+ new SoilLayer.ConstructionProperties()),
+ new SoilLayer(
+ new[]
+ {
+ surfaceLine.LocalGeometry.First(),
+ surfaceLine.LocalGeometry.Last()
+ },
+ Enumerable.Empty(),
+ new SoilLayer.ConstructionProperties())
+ }, new[]
+ {
+ new PreconsolidationStress(new Point2D(0, 0), 1.1)
+ });
}
private static MacroStabilityInwardsSurfaceLine CreateValidSurfaceLine()
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/Waternet/WaternetCalculatorTest.cs
===================================================================
diff -u -r909bc295bbe951245e30dd57407efc924be76e12 -rf2838b78c54529e9b15208b44de854f7760e350f
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/Waternet/WaternetCalculatorTest.cs (.../WaternetCalculatorTest.cs) (revision 909bc295bbe951245e30dd57407efc924be76e12)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/Waternet/WaternetCalculatorTest.cs (.../WaternetCalculatorTest.cs) (revision f2838b78c54529e9b15208b44de854f7760e350f)
@@ -285,7 +285,7 @@
private static SoilProfile CreateValidSoilProfile(MacroStabilityInwardsSurfaceLine surfaceLine)
{
- return new SoilProfile("Valid Profile", new[]
+ return new SoilProfile(new[]
{
new SoilLayer(
new[]
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/Input/SoilCreatorTest.cs
===================================================================
diff -u -r00e2b17f81b30dfe4b71e3535424256d7cd02895 -rf2838b78c54529e9b15208b44de854f7760e350f
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/Input/SoilCreatorTest.cs (.../SoilCreatorTest.cs) (revision 00e2b17f81b30dfe4b71e3535424256d7cd02895)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/Input/SoilCreatorTest.cs (.../SoilCreatorTest.cs) (revision f2838b78c54529e9b15208b44de854f7760e350f)
@@ -56,9 +56,8 @@
{
// Setup
var random = new Random(11);
- const string name = "Profile Name";
- var profile = new SoilProfile(name, new[]
+ var profile = new SoilProfile(new[]
{
new SoilLayer(
new[]
@@ -129,7 +128,6 @@
Soil[] soils = SoilCreator.Create(profile);
// Assert
- Assert.AreEqual(name, profile.Name);
Assert.AreEqual(3, soils.Length);
CollectionAssert.AreEqual(profile.Layers.Select(l => l.UsePop), soils.Select(s => s.UsePop));
@@ -163,7 +161,7 @@
public void Create_InvalidShearStrengthModel_ThrowInvalidEnumArgumentException()
{
// Setup
- var profile = new SoilProfile("name", new[]
+ var profile = new SoilProfile(new[]
{
new SoilLayer(
new[]
@@ -189,7 +187,7 @@
public void Create_InvalidDilatancyType_ThrowInvalidEnumArgumentException()
{
// Setup
- var profile = new SoilProfile("name", new[]
+ var profile = new SoilProfile(new[]
{
new SoilLayer(
new[]
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/Input/SoilProfileCreatorTest.cs
===================================================================
diff -u -r00e2b17f81b30dfe4b71e3535424256d7cd02895 -rf2838b78c54529e9b15208b44de854f7760e350f
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/Input/SoilProfileCreatorTest.cs (.../SoilProfileCreatorTest.cs) (revision 00e2b17f81b30dfe4b71e3535424256d7cd02895)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/Input/SoilProfileCreatorTest.cs (.../SoilProfileCreatorTest.cs) (revision f2838b78c54529e9b15208b44de854f7760e350f)
@@ -55,9 +55,9 @@
public void Create_SoilDictionaryNull_ThrowsArgumentNullException()
{
// Call
- TestDelegate call = () => SoilProfileCreator.Create(new SoilProfile(string.Empty,
- Enumerable.Empty(),
- Enumerable.Empty()),
+ TestDelegate call = () => SoilProfileCreator.Create(new SoilProfile(
+ Enumerable.Empty(),
+ Enumerable.Empty()),
null);
// Assert
@@ -80,11 +80,10 @@
WaterPressureInterpolationModel = (WaterPressureInterpolationModel) 99
});
- var soilProfile = new SoilProfile(string.Empty,
- new[]
- {
- layer
- }, Enumerable.Empty());
+ var soilProfile = new SoilProfile(new[]
+ {
+ layer
+ }, Enumerable.Empty());
// Call
TestDelegate test = () => SoilProfileCreator.Create(soilProfile, new Dictionary
@@ -108,7 +107,6 @@
double preconsolidationStressXCoordinate = random.Next();
double preconsolidationStressZCoordinate = random.Next();
RoundedDouble preconsolidationStressDesignValue = random.NextRoundedDouble();
- const string name = "Profile Name Test";
var outerRing = new[]
{
@@ -136,17 +134,13 @@
outerRing, holes,
new SoilLayer.ConstructionProperties
{
- MaterialName = "Sand",
IsAquifer = true,
WaterPressureInterpolationModel = waterPressureInterpolationModel
});
- var soil = new Soil
- {
- Name = layer.MaterialName
- };
+ var soil = new Soil();
- var soilProfile = new SoilProfile(name, new[]
+ var soilProfile = new SoilProfile(new[]
{
layer
}, new[]
@@ -163,7 +157,6 @@
});
// Assert
- Assert.AreEqual(name, profile.Name);
Assert.AreEqual(1, profile.PreconsolidationStresses.Count);
PreConsolidationStress preconsolidationStress = profile.PreconsolidationStresses.First();
@@ -175,7 +168,7 @@
Assert.AreEqual(1, profile.Surfaces.Count);
SoilLayer2D surface = profile.Surfaces.First();
Assert.AreSame(soil, surface.Soil);
- Assert.AreEqual(layer.MaterialName, surface.Name);
+ Assert.IsFalse(string.IsNullOrEmpty(surface.Name)); // Unused property
Assert.AreEqual(layer.IsAquifer, surface.IsAquifer);
Assert.AreEqual(waterpressureInterpolationModel, surface.WaterpressureInterpolationModel);
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Calculators/Input/TestSoilProfileTest.cs
===================================================================
diff -u -r00e2b17f81b30dfe4b71e3535424256d7cd02895 -rf2838b78c54529e9b15208b44de854f7760e350f
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Calculators/Input/TestSoilProfileTest.cs (.../TestSoilProfileTest.cs) (revision 00e2b17f81b30dfe4b71e3535424256d7cd02895)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Calculators/Input/TestSoilProfileTest.cs (.../TestSoilProfileTest.cs) (revision f2838b78c54529e9b15208b44de854f7760e350f)
@@ -39,7 +39,6 @@
Assert.IsInstanceOf(profile);
Assert.AreEqual(1, profile.Layers.Count());
SoilLayer layer = profile.Layers.First();
- Assert.AreEqual(string.Empty, profile.Name);
CollectionAssert.IsEmpty(layer.OuterRing);
CollectionAssert.IsEmpty(layer.Holes);
CollectionAssert.IsEmpty(profile.PreconsolidationStresses);
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Calculators/Input/TestSoilProfile.cs
===================================================================
diff -u -r00e2b17f81b30dfe4b71e3535424256d7cd02895 -rf2838b78c54529e9b15208b44de854f7760e350f
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Calculators/Input/TestSoilProfile.cs (.../TestSoilProfile.cs) (revision 00e2b17f81b30dfe4b71e3535424256d7cd02895)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Calculators/Input/TestSoilProfile.cs (.../TestSoilProfile.cs) (revision f2838b78c54529e9b15208b44de854f7760e350f)
@@ -32,7 +32,7 @@
///
/// Creates a new instance of .
///
- public TestSoilProfile() : base(string.Empty, new[]
+ public TestSoilProfile() : base(new[]
{
new SoilLayer(new Point2D[0], new Point2D[0][], new SoilLayer.ConstructionProperties())
}, new PreconsolidationStress[0]) {}
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/Input/KernelInputAssert.cs
===================================================================
diff -u -r00e2b17f81b30dfe4b71e3535424256d7cd02895 -rf2838b78c54529e9b15208b44de854f7760e350f
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/Input/KernelInputAssert.cs (.../KernelInputAssert.cs) (revision 00e2b17f81b30dfe4b71e3535424256d7cd02895)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/Input/KernelInputAssert.cs (.../KernelInputAssert.cs) (revision f2838b78c54529e9b15208b44de854f7760e350f)
@@ -57,7 +57,6 @@
/// is not equal to .
public static void AssertSoilProfiles(SoilProfile2D expected, SoilProfile2D actual)
{
- Assert.AreEqual(expected.Name, actual.Name);
AssertSoilLayers(expected.Surfaces.ToArray(), actual.Surfaces.ToArray());
AssertPreconsolidationStresses(expected.PreconsolidationStresses.ToArray(), actual.PreconsolidationStresses.ToArray());
AssertGeometryDatas(expected.Geometry, actual.Geometry);
@@ -130,7 +129,6 @@
SoilLayer2D expectedSurface = expected[i];
SoilLayer2D actualSurface = actual[i];
- Assert.AreEqual(expectedSurface.Name, actualSurface.Name);
Assert.AreEqual(expectedSurface.IsAquifer, actualSurface.IsAquifer);
AssertGeometrySurfaces(expectedSurface.GeometrySurface, actualSurface.GeometrySurface);
AssertSoils(expectedSurface.Soil, actualSurface.Soil);
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/Converters/SoilProfileConverterTest.cs
===================================================================
diff -u -r00e2b17f81b30dfe4b71e3535424256d7cd02895 -rf2838b78c54529e9b15208b44de854f7760e350f
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/Converters/SoilProfileConverterTest.cs (.../SoilProfileConverterTest.cs) (revision 00e2b17f81b30dfe4b71e3535424256d7cd02895)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/Converters/SoilProfileConverterTest.cs (.../SoilProfileConverterTest.cs) (revision f2838b78c54529e9b15208b44de854f7760e350f)
@@ -56,67 +56,64 @@
// Setup
var random = new Random(22);
- var profile = new MacroStabilityInwardsSoilProfileUnderSurfaceLine(
- "Profile Test",
- new[]
+ var profile = new MacroStabilityInwardsSoilProfileUnderSurfaceLine(new[]
+ {
+ new MacroStabilityInwardsSoilLayerUnderSurfaceLine(CreateRing(21), new List
{
- new MacroStabilityInwardsSoilLayerUnderSurfaceLine(CreateRing(21),
- new List
- {
- CreateRing(11),
- CreateRing(22)
- }, new MacroStabilityInwardsSoilLayerData
- {
- UsePop = random.NextBoolean(),
- IsAquifer = random.NextBoolean(),
- MaterialName = "Test",
- AbovePhreaticLevel =
- {
- Mean = (RoundedDouble) 10,
- CoefficientOfVariation = (RoundedDouble) 0.3,
- Shift = (RoundedDouble) 0.1
- },
- BelowPhreaticLevel =
- {
- Mean = (RoundedDouble) 5,
- CoefficientOfVariation = (RoundedDouble) 0.8,
- Shift = (RoundedDouble) 0.3
- },
- Cohesion =
- {
- Mean = random.NextRoundedDouble(),
- CoefficientOfVariation = random.NextRoundedDouble()
- },
- FrictionAngle =
- {
- Mean = random.NextRoundedDouble(),
- CoefficientOfVariation = random.NextRoundedDouble()
- },
- StrengthIncreaseExponent =
- {
- Mean = random.NextRoundedDouble(),
- CoefficientOfVariation = random.NextRoundedDouble()
- },
- ShearStrengthRatio =
- {
- Mean = random.NextRoundedDouble(),
- CoefficientOfVariation = random.NextRoundedDouble()
- },
- Pop =
- {
- Mean = random.NextRoundedDouble(),
- CoefficientOfVariation = random.NextRoundedDouble()
- }
- })
- }, new[]
+ CreateRing(11),
+ CreateRing(22)
+ }, new MacroStabilityInwardsSoilLayerData
{
- new MacroStabilityInwardsPreconsolidationStress(new Point2D(random.NextDouble(), random.NextDouble()),
- new VariationCoefficientLogNormalDistribution
- {
- Mean = (RoundedDouble) 0.05,
- CoefficientOfVariation = random.NextRoundedDouble()
- })
- });
+ UsePop = random.NextBoolean(),
+ IsAquifer = random.NextBoolean(),
+ MaterialName = "Test",
+ AbovePhreaticLevel =
+ {
+ Mean = (RoundedDouble) 10,
+ CoefficientOfVariation = (RoundedDouble) 0.3,
+ Shift = (RoundedDouble) 0.1
+ },
+ BelowPhreaticLevel =
+ {
+ Mean = (RoundedDouble) 5,
+ CoefficientOfVariation = (RoundedDouble) 0.8,
+ Shift = (RoundedDouble) 0.3
+ },
+ Cohesion =
+ {
+ Mean = random.NextRoundedDouble(),
+ CoefficientOfVariation = random.NextRoundedDouble()
+ },
+ FrictionAngle =
+ {
+ Mean = random.NextRoundedDouble(),
+ CoefficientOfVariation = random.NextRoundedDouble()
+ },
+ StrengthIncreaseExponent =
+ {
+ Mean = random.NextRoundedDouble(),
+ CoefficientOfVariation = random.NextRoundedDouble()
+ },
+ ShearStrengthRatio =
+ {
+ Mean = random.NextRoundedDouble(),
+ CoefficientOfVariation = random.NextRoundedDouble()
+ },
+ Pop =
+ {
+ Mean = random.NextRoundedDouble(),
+ CoefficientOfVariation = random.NextRoundedDouble()
+ }
+ })
+ }, new[]
+ {
+ new MacroStabilityInwardsPreconsolidationStress(new Point2D(random.NextDouble(), random.NextDouble()),
+ new VariationCoefficientLogNormalDistribution
+ {
+ Mean = (RoundedDouble) 0.05,
+ CoefficientOfVariation = random.NextRoundedDouble()
+ })
+ });
// Call
SoilProfile soilProfile = SoilProfileConverter.Convert(profile);
@@ -129,7 +126,7 @@
public void Convert_InvalidShearStrengthModel_ThrowInvalidEnumArgumentException()
{
// Setup
- var profile = new MacroStabilityInwardsSoilProfileUnderSurfaceLine("name", new[]
+ var profile = new MacroStabilityInwardsSoilProfileUnderSurfaceLine(new[]
{
new MacroStabilityInwardsSoilLayerUnderSurfaceLine(CreateRing(21), new Point2D[0][],
new MacroStabilityInwardsSoilLayerData
@@ -154,7 +151,7 @@
ShearStrengthModel expectedShearStrengthModel)
{
// Setup
- var profile = new MacroStabilityInwardsSoilProfileUnderSurfaceLine("name", new[]
+ var profile = new MacroStabilityInwardsSoilProfileUnderSurfaceLine(new[]
{
new MacroStabilityInwardsSoilLayerUnderSurfaceLine(CreateRing(21), new Point2D[0][],
new MacroStabilityInwardsSoilLayerData