Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/MacroStabilityInwards/MacroStabilityInwardsSoilLayerTwoDEntityReadExtensions.cs
===================================================================
diff -u -reed141519790c00aff15e16a4c2b8a73ee26d17a -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/MacroStabilityInwards/MacroStabilityInwardsSoilLayerTwoDEntityReadExtensions.cs (.../MacroStabilityInwardsSoilLayerTwoDEntityReadExtensions.cs) (revision eed141519790c00aff15e16a4c2b8a73ee26d17a)
+++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/MacroStabilityInwards/MacroStabilityInwardsSoilLayerTwoDEntityReadExtensions.cs (.../MacroStabilityInwardsSoilLayerTwoDEntityReadExtensions.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -21,12 +21,10 @@
using System;
using System.Collections.Generic;
-using System.Drawing;
using System.Linq;
using Application.Ringtoets.Storage.DbContext;
using Application.Ringtoets.Storage.Serializers;
using Core.Common.Base.Data;
-using Ringtoets.MacroStabilityInwards.Data.SoilProfile;
using Ringtoets.MacroStabilityInwards.Primitives;
namespace Application.Ringtoets.Storage.Read.MacroStabilityInwards
@@ -55,7 +53,6 @@
var outerRing = new Ring(new Point2DXmlSerializer().FromXml(entity.OuterRingXml));
return new MacroStabilityInwardsSoilLayer2D(outerRing,
- new Ring[0],
new MacroStabilityInwardsSoilLayerData(),
ReadNestedLayers(entity).ToArray())
{
Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs
===================================================================
diff -u -r7078f0ab14bab4985d611c668d73267e3a37c8d0 -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision 7078f0ab14bab4985d611c668d73267e3a37c8d0)
+++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -1124,7 +1124,7 @@
{
new Point2D(0, 0),
new Point2D(1, 1)
- }), new Ring[0],
+ }),
new MacroStabilityInwardsSoilLayerData(), new[]
{
new MacroStabilityInwardsSoilLayer2D(new Ring(new[]
Index: Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/SoilLayer2D.cs
===================================================================
diff -u -rcbb43f0461395479263e3245f2f3f136d1d07d00 -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/SoilLayer2D.cs (.../SoilLayer2D.cs) (revision cbb43f0461395479263e3245f2f3f136d1d07d00)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/SoilLayer2D.cs (.../SoilLayer2D.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -33,22 +33,22 @@
/// Creates a new instance of .
///
/// The outer loop of the soil layer.
- /// The inner loops of the soil layer.
+ /// The nested layers of the soil layer.
/// Thrown when any input parameter is null.
- public SoilLayer2D(SoilLayer2DLoop outerLoop, IEnumerable innerLoops)
+ public SoilLayer2D(SoilLayer2DLoop outerLoop, IEnumerable nestedLayers)
{
if (outerLoop == null)
{
throw new ArgumentNullException(nameof(outerLoop));
}
- if (innerLoops == null)
+ if (nestedLayers == null)
{
- throw new ArgumentNullException(nameof(innerLoops));
+ throw new ArgumentNullException(nameof(nestedLayers));
}
OuterLoop = outerLoop;
- InnerLoops = innerLoops;
+ NestedLayers = nestedLayers;
}
///
@@ -57,13 +57,8 @@
public SoilLayer2DLoop OuterLoop { get; }
///
- /// Gets the inner loops of the soil layer.
+ /// Gets the nested layers of the soil layer.
///
- public IEnumerable InnerLoops { get; }
-
- ///
- /// Gets or sets any nested layers.
- ///
- public IEnumerable NestedLayers { get; set; }
+ public IEnumerable NestedLayers { get; }
}
}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/SoilProfile2DReader.cs
===================================================================
diff -u -r8ddbbc3be70d5c9c368d5b35611f813f2d5ca641 -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/SoilProfile2DReader.cs (.../SoilProfile2DReader.cs) (revision 8ddbbc3be70d5c9c368d5b35611f813f2d5ca641)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/SoilProfile2DReader.cs (.../SoilProfile2DReader.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -244,35 +244,33 @@
continue;
}
- SoilLayer2D soilLayer = CreateSoilLayer2D(soilLayerGeometry, soilLayerGeometryLookup[soilLayerGeometry]);
-
- CreateNestedSoilLayersRecursively(soilLayerGeometryLookup, soilLayerGeometry, soilLayer);
-
- yield return soilLayer;
+ yield return CreateSoilLayer2D(soilLayerGeometry,
+ soilLayerGeometryLookup[soilLayerGeometry],
+ CreateNestedSoilLayersRecursively(soilLayerGeometryLookup, soilLayerGeometry));
}
}
- private static void CreateNestedSoilLayersRecursively(Dictionary soilLayerGeometryLookup, SoilLayer2DGeometry soilLayerGeometry, SoilLayer2D soilLayer)
+ private static IEnumerable CreateNestedSoilLayersRecursively(Dictionary soilLayerGeometryLookup, SoilLayer2DGeometry soilLayerGeometry)
{
var nestedLayers = new List();
SoilLayer2DGeometry[] soilLayerGeometries = soilLayerGeometryLookup.Keys.ToArray();
foreach (SoilLayer2DLoop innerLoop in soilLayerGeometry.InnerLoops)
{
SoilLayer2DGeometry nestedSoilLayerGeometry = soilLayerGeometries.First(slg => slg.OuterLoop.Equals(innerLoop));
- SoilLayer2D nestedSoilLayer = CreateSoilLayer2D(nestedSoilLayerGeometry, soilLayerGeometryLookup[nestedSoilLayerGeometry]);
+ SoilLayer2D nestedSoilLayer = CreateSoilLayer2D(nestedSoilLayerGeometry,
+ soilLayerGeometryLookup[nestedSoilLayerGeometry],
+ CreateNestedSoilLayersRecursively(soilLayerGeometryLookup, nestedSoilLayerGeometry));
- CreateNestedSoilLayersRecursively(soilLayerGeometryLookup, nestedSoilLayerGeometry, nestedSoilLayer);
-
nestedLayers.Add(nestedSoilLayer);
}
- soilLayer.NestedLayers = StripDuplicateNestedLayers(nestedLayers);
+ return StripDuplicateNestedLayers(nestedLayers);
}
- private static SoilLayer2D CreateSoilLayer2D(SoilLayer2DGeometry soilLayerGeometry, LayerProperties layerProperties)
+ private static SoilLayer2D CreateSoilLayer2D(SoilLayer2DGeometry soilLayerGeometry, LayerProperties layerProperties, IEnumerable nestedLayers)
{
- var soilLayer = new SoilLayer2D(soilLayerGeometry.OuterLoop, soilLayerGeometry.InnerLoops);
+ var soilLayer = new SoilLayer2D(soilLayerGeometry.OuterLoop, nestedLayers);
SoilLayerHelper.SetSoilLayerBaseProperties(soilLayer, layerProperties);
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/SoilProfile/SoilLayer2DTest.cs
===================================================================
diff -u -rcbb43f0461395479263e3245f2f3f136d1d07d00 -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/SoilProfile/SoilLayer2DTest.cs (.../SoilLayer2DTest.cs) (revision cbb43f0461395479263e3245f2f3f136d1d07d00)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/SoilProfile/SoilLayer2DTest.cs (.../SoilLayer2DTest.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -35,38 +35,38 @@
public void Constructor_OuterLoopNull_ThrowsArgumentNullException()
{
// Call
- TestDelegate test = () => new SoilLayer2D(null, Enumerable.Empty());
+ TestDelegate test = () => new SoilLayer2D(null, Enumerable.Empty());
// Assert
string paramName = Assert.Throws(test).ParamName;
Assert.AreEqual("outerLoop", paramName);
}
[Test]
- public void Constructor_InnerLoopsNull_ThrowsArgumentNullException()
+ public void Constructor_NestedLayersNull_ThrowsArgumentNullException()
{
// Call
TestDelegate test = () => new SoilLayer2D(new SoilLayer2DLoop(new Segment2D[0]), null);
// Assert
string paramName = Assert.Throws(test).ParamName;
- Assert.AreEqual("innerLoops", paramName);
+ Assert.AreEqual("nestedLayers", paramName);
}
[Test]
public void Constructor_ExpectedPropertiesSet()
{
// Setup
var outerLoop = new SoilLayer2DLoop(new Segment2D[0]);
- IEnumerable innerLoops = Enumerable.Empty();
+ IEnumerable nestedLayers = Enumerable.Empty();
// Call
- var layer = new SoilLayer2D(outerLoop, innerLoops);
+ var layer = new SoilLayer2D(outerLoop, nestedLayers);
// Assert
Assert.IsInstanceOf(layer);
Assert.AreSame(outerLoop, layer.OuterLoop);
- Assert.AreSame(innerLoops, layer.InnerLoops);
+ Assert.AreSame(nestedLayers, layer.NestedLayers);
}
}
}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.IO.TestUtil.Test/SoilLayer2DTestFactoryTest.cs
===================================================================
diff -u -r6f92c6b83004d3de670def257b70157e1369da9a -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Ringtoets/Common/test/Ringtoets.Common.IO.TestUtil.Test/SoilLayer2DTestFactoryTest.cs (.../SoilLayer2DTestFactoryTest.cs) (revision 6f92c6b83004d3de670def257b70157e1369da9a)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.TestUtil.Test/SoilLayer2DTestFactoryTest.cs (.../SoilLayer2DTestFactoryTest.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -143,7 +143,7 @@
new Segment2D(pointC, pointD),
new Segment2D(pointD, pointC)
}), nestedLayer.OuterLoop);
- CollectionAssert.IsEmpty(nestedLayer.InnerLoops);
+ CollectionAssert.IsEmpty(nestedLayer.NestedLayers);
Assert.AreEqual(0.0, nestedLayer.IsAquifer);
}
@@ -173,7 +173,7 @@
new Segment2D(pointA, pointB),
new Segment2D(pointB, pointA)
}), nestedLayer.OuterLoop);
- CollectionAssert.IsEmpty(nestedLayer.InnerLoops);
+ CollectionAssert.IsEmpty(nestedLayer.NestedLayers);
Assert.AreEqual(0.0, nestedLayer.IsAquifer);
}
}
Index: Ringtoets/Common/test/Ringtoets.Common.IO.TestUtil/SoilLayer2DTestFactory.cs
===================================================================
diff -u -r6f92c6b83004d3de670def257b70157e1369da9a -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Ringtoets/Common/test/Ringtoets.Common.IO.TestUtil/SoilLayer2DTestFactory.cs (.../SoilLayer2DTestFactory.cs) (revision 6f92c6b83004d3de670def257b70157e1369da9a)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.TestUtil/SoilLayer2DTestFactory.cs (.../SoilLayer2DTestFactory.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -80,16 +80,15 @@
throw new ArgumentNullException(nameof(outerLoop));
}
- return new SoilLayer2D(new SoilLayer2DLoop(outerLoop.ToArray()), Enumerable.Empty())
+ return new SoilLayer2D(new SoilLayer2DLoop(outerLoop.ToArray()),
+ innerLoops.Select(il => new SoilLayer2D(
+ new SoilLayer2DLoop(il.ToArray()),
+ Enumerable.Empty())
+ {
+ IsAquifer = 0.0
+ }).ToArray())
{
- IsAquifer = 0.0,
- NestedLayers = innerLoops.Select(il => new SoilLayer2D(
- new SoilLayer2DLoop(il.ToArray()),
- Enumerable.Empty())
- {
- IsAquifer = 0.0,
- NestedLayers = Enumerable.Empty()
- }).ToArray()
+ IsAquifer = 0.0
};
}
}
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.cs
===================================================================
diff -u -r686c5eeaad900a6bb627733de8c21bd607f130aa -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.cs (.../MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.cs) (revision 686c5eeaad900a6bb627733de8c21bd607f130aa)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.cs (.../MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -104,7 +104,6 @@
foreach (Point2D[] soilLayerArea in GetSoilLayerWithSurfaceLineIntersection(surfaceLineGeometryArray, layer.OuterLoop))
{
soilLayers.Add(new MacroStabilityInwardsSoilLayer2D(new Ring(soilLayerArea),
- Enumerable.Empty(),
layer.Data,
Enumerable.Empty()));
}
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsSoilLayerTransformer.cs
===================================================================
diff -u -r1a3f904157a3f86e702ea8086bee67e780da7856 -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsSoilLayerTransformer.cs (.../MacroStabilityInwardsSoilLayerTransformer.cs) (revision 1a3f904157a3f86e702ea8086bee67e780da7856)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsSoilLayerTransformer.cs (.../MacroStabilityInwardsSoilLayerTransformer.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -88,11 +88,7 @@
private static MacroStabilityInwardsSoilLayer2D ConvertLayerRecursively(SoilLayer2D soilLayer)
{
- Ring outerRing = TransformSegmentsToRing(soilLayer.OuterLoop.Segments);
- Ring[] innerRings = soilLayer.InnerLoops.Select(il => TransformSegmentsToRing(il.Segments)).ToArray();
-
- return new MacroStabilityInwardsSoilLayer2D(outerRing,
- innerRings,
+ return new MacroStabilityInwardsSoilLayer2D(TransformSegmentsToRing(soilLayer.OuterLoop.Segments),
ConvertSoilLayerData(soilLayer),
soilLayer.NestedLayers.Select(ConvertLayerRecursively).ToArray());
}
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Calculators/Input/SoilLayer.cs
===================================================================
diff -u -r66894d34e58e0db658fa3183df8792ed244ccda3 -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Calculators/Input/SoilLayer.cs (.../SoilLayer.cs) (revision 66894d34e58e0db658fa3183df8792ed244ccda3)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Calculators/Input/SoilLayer.cs (.../SoilLayer.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -80,7 +80,7 @@
public Point2D[] OuterRing { get; }
///
- /// Gets any nested layers of the soil layer.
+ /// Gets the nested layers of the soil layer.
///
public IEnumerable NestedLayers { get; }
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilLayer2D.cs
===================================================================
diff -u -r7078f0ab14bab4985d611c668d73267e3a37c8d0 -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilLayer2D.cs (.../MacroStabilityInwardsSoilLayer2D.cs) (revision 7078f0ab14bab4985d611c668d73267e3a37c8d0)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilLayer2D.cs (.../MacroStabilityInwardsSoilLayer2D.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -36,29 +36,22 @@
/// The ring describing the outer boundaries of the layer.
/// Thrown when any parameter is null.
public MacroStabilityInwardsSoilLayer2D(Ring outerRing)
- : this(outerRing, Enumerable.Empty(), new MacroStabilityInwardsSoilLayerData(), Enumerable.Empty()) {}
+ : this(outerRing, new MacroStabilityInwardsSoilLayerData(), Enumerable.Empty()) {}
///
/// Creates a new instance of .
///
/// The ring describing the outer boundaries of the layer.
- /// The rings describing the holes within the outer boundaries of
- /// the layer.
/// The data of the soil layer.
/// The nested .
/// Thrown when any parameter is null.
- public MacroStabilityInwardsSoilLayer2D(Ring outerRing, IEnumerable holes, MacroStabilityInwardsSoilLayerData data, IEnumerable nestedLayers)
+ public MacroStabilityInwardsSoilLayer2D(Ring outerRing, MacroStabilityInwardsSoilLayerData data, IEnumerable nestedLayers)
{
if (outerRing == null)
{
throw new ArgumentNullException(nameof(outerRing));
}
- if (holes == null)
- {
- throw new ArgumentNullException(nameof(holes));
- }
-
if (data == null)
{
throw new ArgumentNullException(nameof(data));
@@ -70,24 +63,18 @@
}
OuterRing = outerRing;
- Holes = holes.ToArray();
Data = data;
NestedLayers = nestedLayers;
}
///
- /// Gets the outer ring of the layer.
+ /// Gets the outer ring of the soil layer.
///
public Ring OuterRing { get; }
///
- /// Gets the holes of the layer.
+ /// Gets the nested layers of the soil layer.
///
- public Ring[] Holes { get; }
-
- ///
- /// Gets any nested layers.
- ///
public IEnumerable NestedLayers { get; }
public MacroStabilityInwardsSoilLayerData Data { get; }
@@ -117,11 +104,6 @@
hashCode = (hashCode * 397) ^ OuterRing.GetHashCode();
- foreach (Ring hole in Holes)
- {
- hashCode = (hashCode * 397) ^ hole.GetHashCode();
- }
-
foreach (MacroStabilityInwardsSoilLayer2D nestedLayer in NestedLayers)
{
hashCode = (hashCode * 397) ^ nestedLayer.GetHashCode();
@@ -135,7 +117,6 @@
{
return Data.Equals(other.Data)
&& OuterRing.Equals(other.OuterRing)
- && Holes.SequenceEqual(other.Holes)
&& NestedLayers.SequenceEqual(other.NestedLayers);
}
}
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.CalculatedInput.Test/Converters/SoilProfileConverterTest.cs
===================================================================
diff -u -r270ff83cd5433a873836488efaf016f340b59b95 -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.CalculatedInput.Test/Converters/SoilProfileConverterTest.cs (.../SoilProfileConverterTest.cs) (revision 270ff83cd5433a873836488efaf016f340b59b95)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.CalculatedInput.Test/Converters/SoilProfileConverterTest.cs (.../SoilProfileConverterTest.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -148,7 +148,6 @@
private static MacroStabilityInwardsSoilLayer2D CreateRandomSoilLayer(int seed, IEnumerable nestedLayers)
{
return new MacroStabilityInwardsSoilLayer2D(RingTestFactory.CreateRandomRing(seed),
- Enumerable.Empty(),
CreateRandomSoilLayerData(seed),
nestedLayers);
}
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfile2DLayersHelperTest.cs
===================================================================
diff -u -r7078f0ab14bab4985d611c668d73267e3a37c8d0 -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfile2DLayersHelperTest.cs (.../MacroStabilityInwardsSoilProfile2DLayersHelperTest.cs) (revision 7078f0ab14bab4985d611c668d73267e3a37c8d0)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfile2DLayersHelperTest.cs (.../MacroStabilityInwardsSoilProfile2DLayersHelperTest.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -20,7 +20,6 @@
// All rights reserved.
using System.Collections.Generic;
-using System.Linq;
using Core.Common.Base.Geometry;
using NUnit.Framework;
using Ringtoets.MacroStabilityInwards.Data.SoilProfile;
@@ -58,7 +57,6 @@
new Point2D(0.0, 1.0),
new Point2D(2.0, 4.0)
}),
- Enumerable.Empty(),
new MacroStabilityInwardsSoilLayerData(),
new[]
{
@@ -78,7 +76,6 @@
new Point2D(4.0, 2.0),
new Point2D(0.0, 2.5)
}),
- Enumerable.Empty(),
new MacroStabilityInwardsSoilLayerData(),
new[]
{
@@ -91,7 +88,6 @@
new Point2D(3.0, 1.0),
new Point2D(8.0, 3.0)
}),
- Enumerable.Empty(),
new MacroStabilityInwardsSoilLayerData(),
new[]
{
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfile2DTest.cs
===================================================================
diff -u -r270ff83cd5433a873836488efaf016f340b59b95 -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfile2DTest.cs (.../MacroStabilityInwardsSoilProfile2DTest.cs) (revision 270ff83cd5433a873836488efaf016f340b59b95)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfile2DTest.cs (.../MacroStabilityInwardsSoilProfile2DTest.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -313,7 +313,6 @@
private static MacroStabilityInwardsSoilLayer2D CreateRandomLayer(Random random)
{
return new MacroStabilityInwardsSoilLayer2D(RingTestFactory.CreateRandomRing(random.Next()),
- Enumerable.Empty(),
new MacroStabilityInwardsSoilLayerData
{
Color = Color.FromKnownColor(random.NextEnumValue())
@@ -328,7 +327,6 @@
private static MacroStabilityInwardsSoilLayer2D CopyAndModifySoilLayer(MacroStabilityInwardsSoilLayer2D soilLayer)
{
return new MacroStabilityInwardsSoilLayer2D(soilLayer.OuterRing,
- Enumerable.Empty(),
new MacroStabilityInwardsSoilLayerData
{
Color = soilLayer.Data.Color
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/SoilProfile/MacroStabilityInwardsStochasticSoilProfileTestFactoryTest.cs
===================================================================
diff -u -rb2b200315a083c291be715da833f87b0247a4050 -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/SoilProfile/MacroStabilityInwardsStochasticSoilProfileTestFactoryTest.cs (.../MacroStabilityInwardsStochasticSoilProfileTestFactoryTest.cs) (revision b2b200315a083c291be715da833f87b0247a4050)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/SoilProfile/MacroStabilityInwardsStochasticSoilProfileTestFactoryTest.cs (.../MacroStabilityInwardsStochasticSoilProfileTestFactoryTest.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -46,7 +46,6 @@
new Point2D(4.0, 2.0),
new Point2D(0.0, 2.5)
}),
- Enumerable.Empty(),
new MacroStabilityInwardsSoilLayerData
{
MaterialName = "Soil"
@@ -59,7 +58,6 @@
new Point2D(4.0, 2.0),
new Point2D(0.0, 2.5)
}),
- Enumerable.Empty(),
new MacroStabilityInwardsSoilLayerData
{
MaterialName = "Clay"
@@ -77,7 +75,6 @@
new Point2D(0.0, 1.0),
new Point2D(2.0, 4.0)
}),
- Enumerable.Empty(),
new MacroStabilityInwardsSoilLayerData
{
MaterialName = "Sand"
@@ -89,7 +86,6 @@
new Point2D(3.0, 1.0),
new Point2D(8.0, 3.0)
}),
- Enumerable.Empty(),
new MacroStabilityInwardsSoilLayerData
{
MaterialName = "Sand"
@@ -105,7 +101,6 @@
new Point2D(2.0, 4.0),
new Point2D(2.0, 8.0)
}),
- Enumerable.Empty(),
new MacroStabilityInwardsSoilLayerData
{
MaterialName = "Sand"
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/SoilProfile/MacroStabilityInwardsSoilLayer2DTestFactory.cs
===================================================================
diff -u -rf1a0220eaafcd55ec39eb0b0c93d5fbd1c65d8c9 -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/SoilProfile/MacroStabilityInwardsSoilLayer2DTestFactory.cs (.../MacroStabilityInwardsSoilLayer2DTestFactory.cs) (revision f1a0220eaafcd55ec39eb0b0c93d5fbd1c65d8c9)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/SoilProfile/MacroStabilityInwardsSoilLayer2DTestFactory.cs (.../MacroStabilityInwardsSoilLayer2DTestFactory.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -20,7 +20,6 @@
// All rights reserved.
using System.Collections.Generic;
-using System.Linq;
using Core.Common.Base.Geometry;
using Ringtoets.MacroStabilityInwards.Primitives;
@@ -52,7 +51,7 @@
{
new Point2D(0, 0),
new Point2D(1, 1)
- }), Enumerable.Empty(),
+ }),
new MacroStabilityInwardsSoilLayerData
{
MaterialName = "Valid"
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/SoilProfile/MacroStabilityInwardsStochasticSoilProfileTestFactory.cs
===================================================================
diff -u -rf1a0220eaafcd55ec39eb0b0c93d5fbd1c65d8c9 -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/SoilProfile/MacroStabilityInwardsStochasticSoilProfileTestFactory.cs (.../MacroStabilityInwardsStochasticSoilProfileTestFactory.cs) (revision f1a0220eaafcd55ec39eb0b0c93d5fbd1c65d8c9)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/SoilProfile/MacroStabilityInwardsStochasticSoilProfileTestFactory.cs (.../MacroStabilityInwardsStochasticSoilProfileTestFactory.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -46,7 +46,6 @@
new Point2D(4.0, 2.0),
new Point2D(0.0, 2.5)
}),
- Enumerable.Empty(),
new MacroStabilityInwardsSoilLayerData
{
MaterialName = "Soil"
@@ -59,7 +58,6 @@
new Point2D(4.0, 2.0),
new Point2D(0.0, 2.5)
}),
- Enumerable.Empty(),
new MacroStabilityInwardsSoilLayerData
{
MaterialName = "Clay"
@@ -77,7 +75,6 @@
new Point2D(0.0, 1.0),
new Point2D(2.0, 4.0)
}),
- Enumerable.Empty(),
new MacroStabilityInwardsSoilLayerData
{
MaterialName = "Sand"
@@ -89,7 +86,6 @@
new Point2D(3.0, 1.0),
new Point2D(8.0, 3.0)
}),
- Enumerable.Empty(),
new MacroStabilityInwardsSoilLayerData
{
MaterialName = "Sand"
@@ -105,7 +101,6 @@
new Point2D(2.0, 4.0),
new Point2D(2.0, 8.0)
}),
- Enumerable.Empty(),
new MacroStabilityInwardsSoilLayerData
{
MaterialName = "Sand"
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsSoilLayer2DBasePropertiesTest.cs
===================================================================
diff -u -r7078f0ab14bab4985d611c668d73267e3a37c8d0 -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsSoilLayer2DBasePropertiesTest.cs (.../MacroStabilityInwardsSoilLayer2DBasePropertiesTest.cs) (revision 7078f0ab14bab4985d611c668d73267e3a37c8d0)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsSoilLayer2DBasePropertiesTest.cs (.../MacroStabilityInwardsSoilLayer2DBasePropertiesTest.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -21,7 +21,6 @@
using System;
using System.ComponentModel;
-using System.Linq;
using Core.Common.Base.Geometry;
using Core.Common.Gui.Converters;
using Core.Common.Gui.PropertyBag;
@@ -73,7 +72,6 @@
new Point2D(20.210230, 26.00001),
new Point2D(3.830, 1.040506)
}),
- Enumerable.Empty(),
new MacroStabilityInwardsSoilLayerData
{
MaterialName = "Test Name",
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsSoilLayer2DTopLevelPropertiesTest.cs
===================================================================
diff -u -r7078f0ab14bab4985d611c668d73267e3a37c8d0 -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsSoilLayer2DTopLevelPropertiesTest.cs (.../MacroStabilityInwardsSoilLayer2DTopLevelPropertiesTest.cs) (revision 7078f0ab14bab4985d611c668d73267e3a37c8d0)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsSoilLayer2DTopLevelPropertiesTest.cs (.../MacroStabilityInwardsSoilLayer2DTopLevelPropertiesTest.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -59,7 +59,6 @@
new Point2D(20.210230, 26.00001),
new Point2D(3.830, 1.040506)
}),
- new Ring[0],
new MacroStabilityInwardsSoilLayerData
{
IsAquifer = true
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsSoilLayerTransformerTest.cs
===================================================================
diff -u -r6f92c6b83004d3de670def257b70157e1369da9a -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsSoilLayerTransformerTest.cs (.../MacroStabilityInwardsSoilLayerTransformerTest.cs) (revision 6f92c6b83004d3de670def257b70157e1369da9a)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsSoilLayerTransformerTest.cs (.../MacroStabilityInwardsSoilLayerTransformerTest.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -328,29 +328,19 @@
public void SoilLayer2DTransform_PropertiesSetAndValid_ReturnMacroStabilityInwardSoilLayer2D()
{
// Setup
- var nestedLayer1 = new SoilLayer2D(CreateRandomLoop(21), Enumerable.Empty())
- {
- NestedLayers = Enumerable.Empty()
- };
- var nestedLayer2 = new SoilLayer2D(CreateRandomLoop(22), Enumerable.Empty())
- {
- NestedLayers = Enumerable.Empty()
- };
- var nestedLayer3 = new SoilLayer2D(CreateRandomLoop(22), Enumerable.Empty())
- {
- NestedLayers = new[]
- {
- nestedLayer2
- }
- };
- var layer = new SoilLayer2D(CreateRandomLoop(23), Enumerable.Empty())
- {
- NestedLayers = new[]
- {
- nestedLayer1,
- nestedLayer3
- }
- };
+ var nestedLayer1 = new SoilLayer2D(CreateRandomLoop(21), Enumerable.Empty());
+ var nestedLayer2 = new SoilLayer2D(CreateRandomLoop(22), Enumerable.Empty());
+ var nestedLayer3 = new SoilLayer2D(CreateRandomLoop(22),
+ new[]
+ {
+ nestedLayer2
+ });
+ var layer = new SoilLayer2D(CreateRandomLoop(23),
+ new[]
+ {
+ nestedLayer1,
+ nestedLayer3
+ });
SetRandomSoilData(nestedLayer1, 21, "Nested sand");
SetRandomSoilData(nestedLayer2, 22, "Nested gold");
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsStochasticSoilModelTransformerTest.cs
===================================================================
diff -u -r6f92c6b83004d3de670def257b70157e1369da9a -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsStochasticSoilModelTransformerTest.cs (.../MacroStabilityInwardsStochasticSoilModelTransformerTest.cs) (revision 6f92c6b83004d3de670def257b70157e1369da9a)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsStochasticSoilModelTransformerTest.cs (.../MacroStabilityInwardsStochasticSoilModelTransformerTest.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -173,7 +173,6 @@
new Point2D(1.0, 1.0),
new Point2D(2.0, 1.0)
}),
- Enumerable.Empty(),
new MacroStabilityInwardsSoilLayerData
{
UsePop = true
@@ -185,7 +184,6 @@
new Point2D(0.0, 0.0),
new Point2D(1.0, 0.0)
}),
- Enumerable.Empty(),
new MacroStabilityInwardsSoilLayerData
{
UsePop = true
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/MacroStabilityInwardsStochasticSoilModelUpdateDataStrategyTest.cs
===================================================================
diff -u -r98b2f17626f8db9da39a343ca21202157b060c1c -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/MacroStabilityInwardsStochasticSoilModelUpdateDataStrategyTest.cs (.../MacroStabilityInwardsStochasticSoilModelUpdateDataStrategyTest.cs) (revision 98b2f17626f8db9da39a343ca21202157b060c1c)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/MacroStabilityInwardsStochasticSoilModelUpdateDataStrategyTest.cs (.../MacroStabilityInwardsStochasticSoilModelUpdateDataStrategyTest.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -585,7 +585,6 @@
soilProfile.Name,
soilProfile.Layers.Select(s => new MacroStabilityInwardsSoilLayer2D(
new Ring(s.OuterRing.Points.Select(p => new Point2D(p.Y - 1, p.Y))),
- s.Holes,
s.Data,
s.NestedLayers)),
soilProfile.PreconsolidationStresses.Select(stress => new MacroStabilityInwardsPreconsolidationStress(new Point2D(stress.Location.X + 1,
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.Test/MacroStabilityInwardsSoilLayer2DTest.cs
===================================================================
diff -u -r270ff83cd5433a873836488efaf016f340b59b95 -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.Test/MacroStabilityInwardsSoilLayer2DTest.cs (.../MacroStabilityInwardsSoilLayer2DTest.cs) (revision 270ff83cd5433a873836488efaf016f340b59b95)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.Test/MacroStabilityInwardsSoilLayer2DTest.cs (.../MacroStabilityInwardsSoilLayer2DTest.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -23,9 +23,7 @@
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
-using Core.Common.Base.Geometry;
using Core.Common.TestUtil;
-using Core.Common.Utils;
using NUnit.Framework;
using Ringtoets.MacroStabilityInwards.Primitives.TestUtil;
@@ -48,19 +46,8 @@
[Test]
public void Constructor_OuterRingNullWithDataAndNestedLayers_ThrowsArgumentNullException()
{
- // Setup
- var holes = new[]
- {
- new Ring(new[]
- {
- new Point2D(0, 2),
- new Point2D(2, 2)
- })
- };
-
// Call
TestDelegate test = () => new MacroStabilityInwardsSoilLayer2D(null,
- holes,
new MacroStabilityInwardsSoilLayerData(),
Enumerable.Empty());
@@ -70,34 +57,13 @@
}
[Test]
- public void Constructor_HolesNullWithDataAndNestedLayers_ThrowsArgumentNullException()
- {
- // Setup
- Ring outerRing = RingTestFactory.CreateRandomRing();
-
- // Call
- TestDelegate test = () => new MacroStabilityInwardsSoilLayer2D(outerRing,
- null,
- new MacroStabilityInwardsSoilLayerData(),
- Enumerable.Empty());
-
- // Assert
- var exception = Assert.Throws(test);
- Assert.AreEqual("holes", exception.ParamName);
- }
-
- [Test]
public void Constructor_DataNull_ThrowsArgumentNullException()
{
// Setup
Ring outerRing = RingTestFactory.CreateRandomRing();
- var holes = new[]
- {
- RingTestFactory.CreateRandomRing()
- };
// Call
- TestDelegate test = () => new MacroStabilityInwardsSoilLayer2D(outerRing, holes, null, Enumerable.Empty());
+ TestDelegate test = () => new MacroStabilityInwardsSoilLayer2D(outerRing, null, Enumerable.Empty());
// Assert
var exception = Assert.Throws(test);
@@ -109,13 +75,9 @@
{
// Setup
Ring outerRing = RingTestFactory.CreateRandomRing();
- var holes = new[]
- {
- RingTestFactory.CreateRandomRing()
- };
// Call
- TestDelegate test = () => new MacroStabilityInwardsSoilLayer2D(outerRing, holes, new MacroStabilityInwardsSoilLayerData(), null);
+ TestDelegate test = () => new MacroStabilityInwardsSoilLayer2D(outerRing, new MacroStabilityInwardsSoilLayerData(), null);
// Assert
var exception = Assert.Throws(test);
@@ -134,31 +96,24 @@
// Assert
Assert.IsInstanceOf(layer);
Assert.AreSame(outerRing, layer.OuterRing);
- CollectionAssert.IsEmpty(layer.Holes);
Assert.IsNotNull(layer.Data);
Assert.IsEmpty(layer.NestedLayers);
}
[Test]
- public void Constructor_WithOuterRingHolesDataAndNestedLayers_ReturnsNewInstance()
+ public void Constructor_WithOuterRingDataAndNestedLayers_ReturnsNewInstance()
{
// Setup
Ring outerRing = RingTestFactory.CreateRandomRing();
- var holes = new[]
- {
- RingTestFactory.CreateRandomRing()
- };
var data = new MacroStabilityInwardsSoilLayerData();
IEnumerable nestedLayers = Enumerable.Empty();
// Call
- var layer = new MacroStabilityInwardsSoilLayer2D(outerRing, holes, data, nestedLayers);
+ var layer = new MacroStabilityInwardsSoilLayer2D(outerRing, data, nestedLayers);
// Assert
Assert.IsInstanceOf(layer);
Assert.AreSame(outerRing, layer.OuterRing);
- Assert.AreNotSame(holes, layer.Holes);
- TestHelper.AssertCollectionsAreEqual(holes, layer.Holes, new ReferenceEqualityComparer());
Assert.AreSame(data, layer.Data);
Assert.AreSame(nestedLayers, layer.NestedLayers);
}
@@ -227,7 +182,6 @@
var layerE = new MacroStabilityInwardsSoilLayer2D(
RingTestFactory.CreateRandomRing(21),
- Enumerable.Empty(),
new MacroStabilityInwardsSoilLayerData
{
Color = Color.Blue
@@ -239,7 +193,6 @@
var layerF = new MacroStabilityInwardsSoilLayer2D(
RingTestFactory.CreateRandomRing(31),
- Enumerable.Empty(),
new MacroStabilityInwardsSoilLayerData
{
Color = Color.Blue
@@ -251,28 +204,54 @@
var layerG = new MacroStabilityInwardsSoilLayer2D(
RingTestFactory.CreateRandomRing(21),
- Enumerable.Empty(),
new MacroStabilityInwardsSoilLayerData
{
+ Color = Color.Gold
+ },
+ new[]
+ {
+ new MacroStabilityInwardsSoilLayer2D(RingTestFactory.CreateRandomRing(22))
+ });
+
+ var layerH = new MacroStabilityInwardsSoilLayer2D(
+ RingTestFactory.CreateRandomRing(21),
+ new MacroStabilityInwardsSoilLayerData
+ {
Color = Color.Blue
},
new[]
{
new MacroStabilityInwardsSoilLayer2D(RingTestFactory.CreateRandomRing(32))
});
- var layerH = new MacroStabilityInwardsSoilLayer2D(
+ var layerI = new MacroStabilityInwardsSoilLayer2D(
RingTestFactory.CreateRandomRing(21),
- Enumerable.Empty(),
new MacroStabilityInwardsSoilLayerData
{
- Color = Color.Gold
+ Color = Color.Blue
},
new[]
{
+ new MacroStabilityInwardsSoilLayer2D(RingTestFactory.CreateRandomRing(22)),
new MacroStabilityInwardsSoilLayer2D(RingTestFactory.CreateRandomRing(22))
});
+ var layerJ = new MacroStabilityInwardsSoilLayer2D(
+ RingTestFactory.CreateRandomRing(21),
+ new MacroStabilityInwardsSoilLayerData
+ {
+ Color = Color.Blue
+ },
+ new[]
+ {
+ new MacroStabilityInwardsSoilLayer2D(RingTestFactory.CreateRandomRing(22),
+ new MacroStabilityInwardsSoilLayerData(),
+ new[]
+ {
+ new MacroStabilityInwardsSoilLayer2D(RingTestFactory.CreateRandomRing(22))
+ })
+ });
+
return new[]
{
new TestCaseData(layerA, layerA, true)
@@ -285,7 +264,7 @@
},
new TestCaseData(layerB, layerD, true)
{
- TestName = "Equals_LayerALayerD_True"
+ TestName = "Equals_LayerBLayerD_True"
},
new TestCaseData(layerA, layerD, true)
{
@@ -309,11 +288,19 @@
},
new TestCaseData(layerE, layerG, false)
{
- TestName = "Equals_DifferentHoles_False"
+ TestName = "Equals_DifferentProperties_False"
},
new TestCaseData(layerE, layerH, false)
{
- TestName = "Equals_DifferentProperties_False"
+ TestName = "Equals_DifferentNestedLayers1False"
+ },
+ new TestCaseData(layerE, layerI, false)
+ {
+ TestName = "Equals_DifferentNestedLayers2_False"
+ },
+ new TestCaseData(layerE, layerJ, false)
+ {
+ TestName = "Equals_DifferentNestedLayers3_False"
}
};
}
@@ -323,7 +310,6 @@
var random = new Random(randomSeed);
return new MacroStabilityInwardsSoilLayer2D(RingTestFactory.CreateRandomRing(randomSeed),
- Enumerable.Empty(),
new MacroStabilityInwardsSoilLayerData
{
Color = Color.FromKnownColor(random.NextEnumValue())
Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfiles/PipingSoilLayerTransformerTest.cs
===================================================================
diff -u -r6f92c6b83004d3de670def257b70157e1369da9a -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfiles/PipingSoilLayerTransformerTest.cs (.../PipingSoilLayerTransformerTest.cs) (revision 6f92c6b83004d3de670def257b70157e1369da9a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfiles/PipingSoilLayerTransformerTest.cs (.../PipingSoilLayerTransformerTest.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -236,7 +236,7 @@
public void SoilLayer2DTransform_EmptySoilLayer2D_ReturnsEmptyCollectionWithMaxValueBottom()
{
// Setup
- var layer = new SoilLayer2D(new SoilLayer2DLoop(new Segment2D[0]), Enumerable.Empty());
+ var layer = new SoilLayer2D(new SoilLayer2DLoop(new Segment2D[0]), Enumerable.Empty());
double bottom;
// Call
@@ -531,11 +531,6 @@
innerLoop
}, outerLoop);
- layer.NestedLayers = new[]
- {
- SoilLayer2DTestFactory.CreateSoilLayer2D(new IEnumerable[0], innerLoop)
- };
-
double bottom;
// Call
@@ -575,11 +570,6 @@
innerLoop
}, outerLoop);
- layer.NestedLayers = new[]
- {
- SoilLayer2DTestFactory.CreateSoilLayer2D(new IEnumerable[0], innerLoop)
- };
-
double bottom;
// Call
@@ -632,12 +622,6 @@
innerLoop2
}, outerLoop);
- layer.NestedLayers = new[]
- {
- SoilLayer2DTestFactory.CreateSoilLayer2D(new IEnumerable[0], innerLoop),
- SoilLayer2DTestFactory.CreateSoilLayer2D(new IEnumerable[0], innerLoop2)
- };
-
double bottom;
// Call
@@ -684,23 +668,23 @@
"........",
"........"));
- SoilLayer2D layer = SoilLayer2DTestFactory.CreateSoilLayer2D(new[]
+ var layer = new SoilLayer2D(new SoilLayer2DLoop(outerLoop.ToArray()), new[]
{
- innerLoop,
- innerLoop2
- }, outerLoop);
-
- SoilLayer2D nestedLayer = SoilLayer2DTestFactory.CreateSoilLayer2D(new IEnumerable[0], innerLoop);
- nestedLayer.NestedLayers = new[]
+ new SoilLayer2D(new SoilLayer2DLoop(innerLoop.ToArray()), new[]
+ {
+ new SoilLayer2D(new SoilLayer2DLoop(innerLoop2.ToArray()), Enumerable.Empty())
+ {
+ IsAquifer = 0.0
+ }
+ })
+ {
+ IsAquifer = 0.0
+ }
+ })
{
- SoilLayer2DTestFactory.CreateSoilLayer2D(new IEnumerable[0], innerLoop2)
+ IsAquifer = 0.0
};
- layer.NestedLayers = new[]
- {
- nestedLayer
- };
-
double bottom;
// Call
@@ -742,11 +726,6 @@
innerLoop
}, outerLoop);
- layer.NestedLayers = new[]
- {
- SoilLayer2DTestFactory.CreateSoilLayer2D(new IEnumerable[0], innerLoop)
- };
-
double bottom;
// Call
@@ -796,12 +775,6 @@
innerLoop2
}, outerLoop);
- layer.NestedLayers = new[]
- {
- SoilLayer2DTestFactory.CreateSoilLayer2D(new IEnumerable[0], innerLoop),
- SoilLayer2DTestFactory.CreateSoilLayer2D(new IEnumerable[0], innerLoop2)
- };
-
double bottom;
// Call
@@ -841,11 +814,6 @@
innerLoop
}, outerLoop);
- layer.NestedLayers = new[]
- {
- SoilLayer2DTestFactory.CreateSoilLayer2D(new IEnumerable[0], innerLoop)
- };
-
double bottom;
// Call
@@ -885,11 +853,6 @@
innerLoop
}, outerLoop);
- layer.NestedLayers = new[]
- {
- SoilLayer2DTestFactory.CreateSoilLayer2D(new IEnumerable[0], innerLoop)
- };
-
double bottom;
// Call
@@ -921,11 +884,6 @@
innerLoop
}, outerLoop);
- layer.NestedLayers = new[]
- {
- SoilLayer2DTestFactory.CreateSoilLayer2D(new IEnumerable[0], innerLoop)
- };
-
double bottom;
// Call
@@ -986,11 +944,6 @@
innerLoop
}, outerLoop);
- layer.NestedLayers = new[]
- {
- SoilLayer2DTestFactory.CreateSoilLayer2D(new IEnumerable[0], innerLoop)
- };
-
double bottom;
// Call
Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfiles/PipingSoilProfileTransformerTest.cs
===================================================================
diff -u -r6f92c6b83004d3de670def257b70157e1369da9a -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfiles/PipingSoilProfileTransformerTest.cs (.../PipingSoilProfileTransformerTest.cs) (revision 6f92c6b83004d3de670def257b70157e1369da9a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfiles/PipingSoilProfileTransformerTest.cs (.../PipingSoilProfileTransformerTest.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -70,7 +70,7 @@
const string name = "name";
var profile = new SoilProfile2D(0, name, new[]
{
- new SoilLayer2D(new SoilLayer2DLoop(new Segment2D[0]), Enumerable.Empty())
+ new SoilLayer2D(new SoilLayer2DLoop(new Segment2D[0]), Enumerable.Empty())
}, Enumerable.Empty());
// Call
@@ -165,7 +165,7 @@
const string profileName = "SomeProfile";
var profile = new SoilProfile2D(0, profileName, new[]
{
- new SoilLayer2D(new SoilLayer2DLoop(new Segment2D[0]), Enumerable.Empty())
+ new SoilLayer2D(new SoilLayer2DLoop(new Segment2D[0]), Enumerable.Empty())
}, Enumerable.Empty());
// Call
@@ -342,11 +342,6 @@
".....",
"1...4")));
- soilLayer2D.NestedLayers = new[]
- {
- SoilLayer2DTestFactory.CreateSoilLayer2D(new IEnumerable[0], loopHole)
- };
-
var profile = new SoilProfile2D(pipingSoilProfileId, profileName,
new List
{
Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfiles/PipingStochasticSoilModelTransformerTest.cs
===================================================================
diff -u -r6f92c6b83004d3de670def257b70157e1369da9a -reb6d3b69267f3ae2870b25679793bbc0099338cd
--- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfiles/PipingStochasticSoilModelTransformerTest.cs (.../PipingStochasticSoilModelTransformerTest.cs) (revision 6f92c6b83004d3de670def257b70157e1369da9a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfiles/PipingStochasticSoilModelTransformerTest.cs (.../PipingStochasticSoilModelTransformerTest.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd)
@@ -109,7 +109,7 @@
{
StochasticSoilProfileTestFactory.CreateStochasticSoilProfileWithValidProbability(new SoilProfile2D(0, name, new[]
{
- new SoilLayer2D(new SoilLayer2DLoop(new Segment2D[0]), Enumerable.Empty())
+ new SoilLayer2D(new SoilLayer2DLoop(new Segment2D[0]), Enumerable.Empty())
}, Enumerable.Empty()))
});