Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/Piping/StochasticSoilModelEntityReadExtensions.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/Piping/StochasticSoilModelEntityReadExtensions.cs (.../StochasticSoilModelEntityReadExtensions.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/Piping/StochasticSoilModelEntityReadExtensions.cs (.../StochasticSoilModelEntityReadExtensions.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -53,7 +53,7 @@
return collector.Get(entity);
}
- var model = new StochasticSoilModel(-1, entity.Name);
+ var model = new StochasticSoilModel(entity.Name);
entity.ReadStochasticSoilProfiles(model, collector);
entity.ReadSegmentPoints(model);
Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/PersistenceRegistryTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/PersistenceRegistryTest.cs (.../PersistenceRegistryTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/PersistenceRegistryTest.cs (.../PersistenceRegistryTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -321,7 +321,7 @@
{
// Setup
var registry = new PersistenceRegistry();
- var soilModel = new StochasticSoilModel(1, "A");
+ var soilModel = new StochasticSoilModel("A");
registry.Register(new StochasticSoilModelEntity(), soilModel);
// Call
@@ -336,7 +336,7 @@
{
// Setup
var registry = new PersistenceRegistry();
- var soilModel = new StochasticSoilModel(1, "A");
+ var soilModel = new StochasticSoilModel("A");
// Call
bool result = registry.Contains(soilModel);
@@ -350,8 +350,8 @@
{
// Setup
var registry = new PersistenceRegistry();
- var soilModel = new StochasticSoilModel(1, "A");
- registry.Register(new StochasticSoilModelEntity(), new StochasticSoilModel(3, "B"));
+ var soilModel = new StochasticSoilModel("A");
+ registry.Register(new StochasticSoilModelEntity(), new StochasticSoilModel("B"));
// Call
bool result = registry.Contains(soilModel);
@@ -1268,7 +1268,7 @@
{
// Setup
var registry = new PersistenceRegistry();
- var soilModel = new StochasticSoilModel(5, "6");
+ var soilModel = new StochasticSoilModel("6");
var entity = new StochasticSoilModelEntity();
registry.Register(entity, soilModel);
@@ -1284,7 +1284,7 @@
{
// Setup
var registry = new PersistenceRegistry();
- var soilModel = new StochasticSoilModel(5, "6");
+ var soilModel = new StochasticSoilModel("6");
// Call
TestDelegate test = () => registry.Get(soilModel);
@@ -1298,8 +1298,8 @@
{
// Setup
var registry = new PersistenceRegistry();
- var soilModel = new StochasticSoilModel(5, "6");
- registry.Register(new StochasticSoilModelEntity(), new StochasticSoilModel(1, "2"));
+ var soilModel = new StochasticSoilModel("6");
+ registry.Register(new StochasticSoilModelEntity(), new StochasticSoilModel("2"));
// Call
TestDelegate test = () => registry.Get(soilModel);
Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingCalculationScenarioCreateExtensionsTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingCalculationScenarioCreateExtensionsTest.cs (.../PipingCalculationScenarioCreateExtensionsTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingCalculationScenarioCreateExtensionsTest.cs (.../PipingCalculationScenarioCreateExtensionsTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -245,7 +245,7 @@
SoilProfile = soilProfile
};
- var soilModel = new StochasticSoilModel(1, "A");
+ var soilModel = new StochasticSoilModel("A");
soilModel.StochasticSoilProfiles.Add(stochasticSoilProfile);
var registry = new PersistenceRegistry();
Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingFailureMechanismCreateExtensionsTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingFailureMechanismCreateExtensionsTest.cs (.../PipingFailureMechanismCreateExtensionsTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingFailureMechanismCreateExtensionsTest.cs (.../PipingFailureMechanismCreateExtensionsTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -149,8 +149,8 @@
const string somePath = "some/path/to/file";
failureMechanism.StochasticSoilModels.AddRange(new[]
{
- new StochasticSoilModel(-1, "name"),
- new StochasticSoilModel(-1, "name2")
+ new StochasticSoilModel("name"),
+ new StochasticSoilModel("name2")
}, somePath);
var registry = new PersistenceRegistry();
Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/StochasticSoilModelCreateExtensionsTest.cs
===================================================================
diff -u -r9dd9ba51fe935a7f309d21f0524ea79e5e28d32a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/StochasticSoilModelCreateExtensionsTest.cs (.../StochasticSoilModelCreateExtensionsTest.cs) (revision 9dd9ba51fe935a7f309d21f0524ea79e5e28d32a)
+++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/StochasticSoilModelCreateExtensionsTest.cs (.../StochasticSoilModelCreateExtensionsTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -56,7 +56,7 @@
// Setup
int order = new Random(1).Next();
const string testName = "testName";
- var stochasticSoilModel = new StochasticSoilModel(-1, testName);
+ var stochasticSoilModel = new StochasticSoilModel(testName);
var registry = new PersistenceRegistry();
// Call
@@ -74,7 +74,7 @@
{
// Setup
const string testName = "testName";
- var stochasticSoilModel = new StochasticSoilModel(-1, testName);
+ var stochasticSoilModel = new StochasticSoilModel(testName);
var registry = new PersistenceRegistry();
// Call
@@ -90,7 +90,7 @@
public void Create_WithStochasticSoilProfiles_ReturnsStochasticSoilModelEntityWithPropertiesAndStochasticSoilProfileEntitiesSet()
{
// Setup
- var stochasticSoilModel = new StochasticSoilModel(-1, "testName");
+ var stochasticSoilModel = new StochasticSoilModel("testName");
stochasticSoilModel.StochasticSoilProfiles.Add(new StochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, -1)
{
SoilProfile = new TestPipingSoilProfile()
@@ -113,7 +113,7 @@
public void Create_WithGeometryPoints_ReturnsStochasticSoilModelEntityWithPropertiesAndStochasticSoilModelSegmentPointEntitiesSet()
{
// Setup
- var stochasticSoilModel = new StochasticSoilModel(-1, "testName");
+ var stochasticSoilModel = new StochasticSoilModel("testName");
stochasticSoilModel.Geometry.AddRange(new[]
{
new Point2D(-12.34, 56.78),
@@ -134,7 +134,7 @@
public void Create_SameModelCreatedMultipleTimes_ReturnSameEntity()
{
// Setup
- var soilModel = new StochasticSoilModel(1, "A");
+ var soilModel = new StochasticSoilModel("A");
var registry = new PersistenceRegistry();
Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/Piping/PipingCalculationEntityReadExtensionsTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/Piping/PipingCalculationEntityReadExtensionsTest.cs (.../PipingCalculationEntityReadExtensionsTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/Piping/PipingCalculationEntityReadExtensionsTest.cs (.../PipingCalculationEntityReadExtensionsTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -245,7 +245,7 @@
public void Read_EntityWithStochasticSoilModelEntityInCollector_CalculationHasAlreadyReadStochasticSoilModel()
{
// Setup
- var stochasticSoilModel = new StochasticSoilModel(1, "A");
+ var stochasticSoilModel = new StochasticSoilModel("A");
var stochasticSoilModelEntity = new StochasticSoilModelEntity();
var stochasticSoilProfile = new StochasticSoilProfile(1, SoilProfileType.SoilProfile1D, 1);
Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil.Test/RingtoetsProjectTestHelperTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil.Test/RingtoetsProjectTestHelperTest.cs (.../RingtoetsProjectTestHelperTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil.Test/RingtoetsProjectTestHelperTest.cs (.../RingtoetsProjectTestHelperTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -90,7 +90,6 @@
Assert.AreEqual("some/path/to/stochasticSoilModelFile", failureMechanism.StochasticSoilModels.SourcePath);
Assert.AreEqual(1, failureMechanism.StochasticSoilModels.Count);
StochasticSoilModel soilModel = failureMechanism.StochasticSoilModels[0];
- Assert.AreEqual(-1, soilModel.Id);
Assert.AreEqual("modelName", soilModel.Name);
Assert.AreEqual(2, soilModel.StochasticSoilProfiles.Count);
StochasticSoilProfile stochasticSoilProfile1 = soilModel.StochasticSoilProfiles[0];
Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -672,7 +672,7 @@
pipingFailureMechanism.StochasticSoilModels.AddRange(new[]
{
- new StochasticSoilModel(-1, "modelName")
+ new StochasticSoilModel("modelName")
{
Geometry =
{
Index: Ringtoets/Piping/src/Ringtoets.Piping.Data/StochasticSoilModel.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/src/Ringtoets.Piping.Data/StochasticSoilModel.cs (.../StochasticSoilModel.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Data/StochasticSoilModel.cs (.../StochasticSoilModel.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -37,22 +37,15 @@
///
/// Creates a new instance of .
///
- /// Database identifier of the stochastic soil model.
/// Name of the segment soil model.
- public StochasticSoilModel(long id, string name)
+ public StochasticSoilModel(string name)
{
- Id = id;
Name = name;
Geometry = new List();
StochasticSoilProfiles = new List();
}
///
- /// Gets the database identifier of the stochastic soil model.
- ///
- public long Id { get; private set; }
-
- ///
/// Gets the name of the segment soil model.
///
public string Name { get; private set; }
@@ -86,7 +79,6 @@
throw new ArgumentNullException(nameof(fromModel));
}
- Id = fromModel.Id;
Name = fromModel.Name;
Geometry.Clear();
foreach (Point2D point in fromModel.Geometry)
Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfile/StochasticSoilModelReader.cs
===================================================================
diff -u -r271c2fc54b79aa394b3d8d417f9dcd6d5675728e -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfile/StochasticSoilModelReader.cs (.../StochasticSoilModelReader.cs) (revision 271c2fc54b79aa394b3d8d417f9dcd6d5675728e)
+++ Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfile/StochasticSoilModelReader.cs (.../StochasticSoilModelReader.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -115,7 +115,7 @@
return null;
}
StochasticSoilModel stochasticSoilModelSegment = ReadStochasticSoilModelSegment();
- long currentSegmentSoilModelId = stochasticSoilModelSegment.Id;
+ long currentSegmentSoilModelId = ReadStochasticSoilModelSegmentId();
do
{
// Read Points
@@ -125,27 +125,32 @@
stochasticSoilModelSegment.Geometry.Add(point2D);
}
MoveNext();
- } while (HasNext && ReadStochasticSoilModelSegment().Id == currentSegmentSoilModelId);
+ } while (HasNext && ReadStochasticSoilModelSegmentId() == currentSegmentSoilModelId);
- AddStochasticSoilProfiles(stochasticSoilModelSegment);
+ AddStochasticSoilProfiles(stochasticSoilModelSegment, currentSegmentSoilModelId);
return stochasticSoilModelSegment;
}
- private void AddStochasticSoilProfiles(StochasticSoilModel stochasticSoilModelSegment)
+ private void AddStochasticSoilProfiles(StochasticSoilModel stochasticSoilModelSegment,
+ long stochasticSoilModelSegmentId)
{
using (var stochasticSoilProfileReader = new StochasticSoilProfileReader(filePath))
{
while (stochasticSoilProfileReader.HasNext)
{
- AddStochasticSoilProfile(stochasticSoilModelSegment, stochasticSoilProfileReader);
+ AddStochasticSoilProfile(stochasticSoilModelSegment,
+ stochasticSoilProfileReader,
+ stochasticSoilModelSegmentId);
}
}
}
- private static void AddStochasticSoilProfile(StochasticSoilModel stochasticSoilModelSegment, StochasticSoilProfileReader stochasticSoilProfileReader)
+ private static void AddStochasticSoilProfile(StochasticSoilModel stochasticSoilModelSegment,
+ StochasticSoilProfileReader stochasticSoilProfileReader,
+ long stochasticSoilSegementId)
{
- StochasticSoilProfile stochasticSoilProfile = stochasticSoilProfileReader.ReadStochasticSoilProfile(stochasticSoilModelSegment.Id);
+ StochasticSoilProfile stochasticSoilProfile = stochasticSoilProfileReader.ReadStochasticSoilProfile(stochasticSoilSegementId);
if (stochasticSoilProfile != null)
{
stochasticSoilModelSegment.StochasticSoilProfiles.Add(stochasticSoilProfile);
@@ -229,11 +234,15 @@
private StochasticSoilModel ReadStochasticSoilModelSegment()
{
- long stochasticSoilModelId = Convert.ToInt64(dataReader[StochasticSoilModelTableColumns.StochasticSoilModelId]);
string stochasticSoilModelName = Convert.ToString(dataReader[StochasticSoilModelTableColumns.StochasticSoilModelName]);
- return new StochasticSoilModel(stochasticSoilModelId, stochasticSoilModelName);
+ return new StochasticSoilModel(stochasticSoilModelName);
}
+ private long ReadStochasticSoilModelSegmentId()
+ {
+ return Convert.ToInt64(dataReader[StochasticSoilModelTableColumns.StochasticSoilModelId]);
+ }
+
private Point2D ReadSegmentPoint()
{
double coordinateX = Convert.ToDouble(dataReader[SegmentPointsTableColumns.CoordinateX]);
Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/StochasticSoilModelCollectionTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/StochasticSoilModelCollectionTest.cs (.../StochasticSoilModelCollectionTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/StochasticSoilModelCollectionTest.cs (.../StochasticSoilModelCollectionTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -40,26 +40,26 @@
protected override IEnumerable UniqueElements()
{
- yield return new StochasticSoilModel(5, "Model A");
- yield return new StochasticSoilModel(6, "Model B");
+ yield return new StochasticSoilModel("Model A");
+ yield return new StochasticSoilModel("Model B");
}
protected override IEnumerable SingleNonUniqueElements()
{
const string someName = "Soil model";
- yield return new StochasticSoilModel(5, someName);
- yield return new StochasticSoilModel(6, someName);
+ yield return new StochasticSoilModel(someName);
+ yield return new StochasticSoilModel(someName);
}
protected override IEnumerable MultipleNonUniqueElements()
{
const string someName = "Soil model";
const string someOtherName = "Other soil model";
- yield return new StochasticSoilModel(5, someName);
- yield return new StochasticSoilModel(6, someName);
- yield return new StochasticSoilModel(7, someOtherName);
- yield return new StochasticSoilModel(8, someOtherName);
- yield return new StochasticSoilModel(9, someOtherName);
+ yield return new StochasticSoilModel(someName);
+ yield return new StochasticSoilModel(someName);
+ yield return new StochasticSoilModel(someOtherName);
+ yield return new StochasticSoilModel(someOtherName);
+ yield return new StochasticSoilModel(someOtherName);
}
protected override void AssertSingleNonUniqueElements(ArgumentException exception, IEnumerable itemsToAdd)
Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/StochasticSoilModelExtensionsTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/StochasticSoilModelExtensionsTest.cs (.../StochasticSoilModelExtensionsTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/StochasticSoilModelExtensionsTest.cs (.../StochasticSoilModelExtensionsTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -55,7 +55,7 @@
public void IntersectsWithSurfaceLineGeometry_SurfaceLineNull_ThrowArgumentNullException()
{
// Setup
- var soilModel = new StochasticSoilModel(1, "A");
+ var soilModel = new StochasticSoilModel("A");
soilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
@@ -74,7 +74,7 @@
public void IntersectsWithSurfaceLineGeometry_SurfacelineIntersectingSoilModel_ReturnTrue()
{
// Setup
- var soilModel = new StochasticSoilModel(1, "A");
+ var soilModel = new StochasticSoilModel("A");
soilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
@@ -100,7 +100,7 @@
public void IntersectsWithSurfaceLineGeometry_SurfacelineNotIntersectingSoilModel_ReturnFalse()
{
// Setup
- var soilModel = new StochasticSoilModel(1, "A");
+ var soilModel = new StochasticSoilModel("A");
soilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/StochasticSoilModelTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/StochasticSoilModelTest.cs (.../StochasticSoilModelTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/StochasticSoilModelTest.cs (.../StochasticSoilModelTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -39,11 +39,10 @@
public void Constructor_Always_ExpectedValues(long segmentSoilModelId, string segmentSoilModelName)
{
// Call
- var stochasticSoilModel = new StochasticSoilModel(segmentSoilModelId, segmentSoilModelName);
+ var stochasticSoilModel = new StochasticSoilModel(segmentSoilModelName);
// Assert
Assert.IsInstanceOf(stochasticSoilModel);
- Assert.AreEqual(segmentSoilModelId, stochasticSoilModel.Id);
Assert.AreEqual(segmentSoilModelName, stochasticSoilModel.Name);
CollectionAssert.IsEmpty(stochasticSoilModel.Geometry);
CollectionAssert.IsEmpty(stochasticSoilModel.StochasticSoilProfiles);
@@ -53,16 +52,14 @@
public void PropertySegmentPoints_Always_ReturnsExpectedValues()
{
// Setup
- const long expectedSegmentSoilModelId = 1234L;
const string expectedSegmentSoilModelName = "someSegmentSoilModelName";
- var stochasticSoilModel = new StochasticSoilModel(expectedSegmentSoilModelId, expectedSegmentSoilModelName);
+ var stochasticSoilModel = new StochasticSoilModel(expectedSegmentSoilModelName);
var point2D = new Point2D(1.0, 2.0);
// Call
stochasticSoilModel.Geometry.Add(point2D);
// Assert
- Assert.AreEqual(expectedSegmentSoilModelId, stochasticSoilModel.Id);
Assert.AreEqual(expectedSegmentSoilModelName, stochasticSoilModel.Name);
Assert.AreEqual(1, stochasticSoilModel.Geometry.Count);
Assert.AreEqual(point2D, stochasticSoilModel.Geometry[0]);
@@ -72,9 +69,8 @@
public void PropertyStochasticSoilProfileProbabilities_Always_ReturnsExpectedValues()
{
// Setup
- const long expectedSegmentSoilModelId = 1234L;
const string expectedSegmentSoilModelName = "someSegmentSoilModelName";
- var stochasticSoilModel = new StochasticSoilModel(expectedSegmentSoilModelId, expectedSegmentSoilModelName);
+ var stochasticSoilModel = new StochasticSoilModel(expectedSegmentSoilModelName);
var mockRepository = new MockRepository();
var stochasticSoilProfileProbabilityMock = mockRepository.StrictMock(1.0, null, null);
@@ -84,7 +80,6 @@
stochasticSoilModel.StochasticSoilProfiles.Add(stochasticSoilProfileProbabilityMock);
// Assert
- Assert.AreEqual(expectedSegmentSoilModelId, stochasticSoilModel.Id);
Assert.AreEqual(expectedSegmentSoilModelName, stochasticSoilModel.Name);
Assert.AreEqual(1, stochasticSoilModel.StochasticSoilProfiles.Count);
Assert.AreEqual(stochasticSoilProfileProbabilityMock, stochasticSoilModel.StochasticSoilProfiles[0]);
@@ -95,7 +90,7 @@
public void Update_WithNullModel_ThrowsArgumentNullException()
{
// Setup
- var model = new StochasticSoilModel(1234, "name");
+ var model = new StochasticSoilModel("name");
// Call
TestDelegate test = () => model.Update(null);
@@ -109,28 +104,26 @@
public void Update_ModelWithUpdatedProperties_PropertiesUpdated()
{
// Setup
- var model = new StochasticSoilModel(1234, "name");
+ var model = new StochasticSoilModel("name");
model.Geometry.AddRange(new[]
{
new Point2D(1, 2),
new Point2D(4, 5)
});
- const int expectedId = 1236;
const string expectedName = "otherName";
var expectedGeometry = new[]
{
new Point2D(4, 2)
};
- var otherModel = new StochasticSoilModel(expectedId, expectedName);
+ var otherModel = new StochasticSoilModel(expectedName);
otherModel.Geometry.AddRange(expectedGeometry);
// Call
StochasticSoilModelProfileDifference difference = model.Update(otherModel);
// Assert
- Assert.AreEqual(expectedId, model.Id);
Assert.AreEqual(expectedName, model.Name);
CollectionAssert.AreEqual(expectedGeometry, model.Geometry);
@@ -310,7 +303,7 @@
model.StochasticSoilProfiles.Add(stochasticProfileB);
const string otherName = "other name";
- var otherModel = new StochasticSoilModel(41, otherName);
+ var otherModel = new StochasticSoilModel(otherName);
var otherPointA = new Point2D(2, 0);
var otherPointB = new Point2D(3, 0);
@@ -401,7 +394,7 @@
public void ToString_WithName_ReturnsName(string name)
{
// Setup
- var stochasticSoilModel = new StochasticSoilModel(1, name);
+ var stochasticSoilModel = new StochasticSoilModel(name);
// Call & Assert
Assert.AreEqual(name, stochasticSoilModel.ToString());
@@ -417,7 +410,7 @@
private StochasticSoilModel CreateEmptyModel()
{
- var model = new StochasticSoilModel(1234, "name");
+ var model = new StochasticSoilModel("name");
return model;
}
}
Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil/TestStochasticSoilModel.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil/TestStochasticSoilModel.cs (.../TestStochasticSoilModel.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil/TestStochasticSoilModel.cs (.../TestStochasticSoilModel.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -33,7 +33,7 @@
/// Creates a new instance of .
///
/// The name of the stochastic soil model.
- public TestStochasticSoilModel(string name) : base(0, name)
+ public TestStochasticSoilModel(string name) : base(name)
{
StochasticSoilProfiles.AddRange(new[]
{
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Factories/PipingMapDataFeaturesFactoryTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Factories/PipingMapDataFeaturesFactoryTest.cs (.../PipingMapDataFeaturesFactoryTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Factories/PipingMapDataFeaturesFactoryTest.cs (.../PipingMapDataFeaturesFactoryTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -135,8 +135,8 @@
};
var stochasticSoilModels = new[]
{
- new StochasticSoilModel(1, "StochasticSoilModelName1"),
- new StochasticSoilModel(2, "StochasticSoilModelName2")
+ new StochasticSoilModel("StochasticSoilModelName1"),
+ new StochasticSoilModel("StochasticSoilModelName2")
};
stochasticSoilModels[0].Geometry.AddRange(pointsOne);
stochasticSoilModels[1].Geometry.AddRange(pointsTwo);
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PipingCalculationConfigurationHelperTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PipingCalculationConfigurationHelperTest.cs (.../PipingCalculationConfigurationHelperTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PipingCalculationConfigurationHelperTest.cs (.../PipingCalculationConfigurationHelperTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -75,7 +75,7 @@
}, SoilProfileType.SoilProfile1D, 2)
};
- var soilModel = new StochasticSoilModel(1, "A");
+ var soilModel = new StochasticSoilModel("A");
soilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
@@ -129,7 +129,7 @@
new PipingSoilLayer(4.0)
}, SoilProfileType.SoilProfile1D, 2);
- var soilModel = new StochasticSoilModel(1, "A");
+ var soilModel = new StochasticSoilModel("A");
soilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
@@ -185,7 +185,7 @@
public void GetStochasticSoilModelsForSurfaceLine_NoSoilProfiles_ReturnEmpty()
{
// Setup
- var soilModel = new StochasticSoilModel(1, "A");
+ var soilModel = new StochasticSoilModel("A");
soilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
@@ -231,7 +231,7 @@
new PipingSoilLayer(4.0)
}, SoilProfileType.SoilProfile1D, 2);
- var soilModel = new StochasticSoilModel(1, "A");
+ var soilModel = new StochasticSoilModel("A");
soilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
@@ -292,7 +292,7 @@
};
const double y = 1.1;
- var soilModel1 = new StochasticSoilModel(1, "A");
+ var soilModel1 = new StochasticSoilModel("A");
soilModel1.Geometry.AddRange(new[]
{
new Point2D(1.0, y),
@@ -303,7 +303,7 @@
soilProfile1
});
- var soilModel2 = new StochasticSoilModel(1, "A");
+ var soilModel2 = new StochasticSoilModel("A");
soilModel2.Geometry.AddRange(new[]
{
new Point2D(3.0, y),
@@ -462,7 +462,7 @@
}, SoilProfileType.SoilProfile1D, 2)
};
- var soilModel = new StochasticSoilModel(1, "A");
+ var soilModel = new StochasticSoilModel("A");
soilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
@@ -524,7 +524,7 @@
public void GenerateCalculationItemsStructure_NoSoilProfiles_LogWarning()
{
// Setup
- var soilModel = new StochasticSoilModel(1, "A");
+ var soilModel = new StochasticSoilModel("A");
soilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
@@ -589,7 +589,7 @@
new PipingSoilLayer(4.0)
}, SoilProfileType.SoilProfile1D, 2);
- var soilModel = new StochasticSoilModel(1, "A");
+ var soilModel = new StochasticSoilModel("A");
soilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
@@ -672,7 +672,7 @@
};
const double y = 1.1;
- var soilModel1 = new StochasticSoilModel(1, "A");
+ var soilModel1 = new StochasticSoilModel("A");
soilModel1.Geometry.AddRange(new[]
{
new Point2D(1.0, y),
@@ -683,7 +683,7 @@
soilProfile1
});
- var soilModel2 = new StochasticSoilModel(1, "A");
+ var soilModel2 = new StochasticSoilModel("A");
soilModel2.Geometry.AddRange(new[]
{
new Point2D(3.0, y),
@@ -765,7 +765,7 @@
};
const double y = 1.1;
- var soilModel1 = new StochasticSoilModel(1, "A");
+ var soilModel1 = new StochasticSoilModel("A");
soilModel1.Geometry.AddRange(new[]
{
new Point2D(1.0, y),
@@ -777,7 +777,7 @@
soilProfile2
});
- var soilModel2 = new StochasticSoilModel(1, "A");
+ var soilModel2 = new StochasticSoilModel("A");
soilModel2.Geometry.AddRange(new[]
{
new Point2D(3.0, y),
@@ -886,7 +886,7 @@
};
const double y = 1.1;
- var soilModel1 = new StochasticSoilModel(1, "A");
+ var soilModel1 = new StochasticSoilModel("A");
soilModel1.Geometry.AddRange(new[]
{
new Point2D(1.0, y),
@@ -898,7 +898,7 @@
soilProfile2
});
- var soilModel2 = new StochasticSoilModel(1, "A");
+ var soilModel2 = new StochasticSoilModel("A");
soilModel2.Geometry.AddRange(new[]
{
new Point2D(3.0, y),
@@ -996,7 +996,7 @@
new PipingSoilLayer(4.0)
}, SoilProfileType.SoilProfile1D, 2);
- var soilModel = new StochasticSoilModel(1, "A");
+ var soilModel = new StochasticSoilModel("A");
soilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
@@ -1078,7 +1078,7 @@
new PipingSoilLayer(4.0)
}, SoilProfileType.SoilProfile1D, 2);
- var soilModel = new StochasticSoilModel(1, "A");
+ var soilModel = new StochasticSoilModel("A");
soilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs (.../PipingInputContextPropertiesTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs (.../PipingInputContextPropertiesTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -466,7 +466,7 @@
}
}, SoilProfileType.SoilProfile1D, 0)
};
- var stochasticSoilModel = new StochasticSoilModel(0, "StochasticSoilModelName");
+ var stochasticSoilModel = new StochasticSoilModel("StochasticSoilModelName");
stochasticSoilModel.StochasticSoilProfiles.Add(stochasticSoilProfile);
HydraulicBoundaryLocation testHydraulicBoundaryLocation = TestHydraulicBoundaryLocation.CreateDesignWaterLevelCalculated(0.0);
@@ -1279,7 +1279,7 @@
{
SoilProfile = new TestPipingSoilProfile()
};
- var stochasticSoilModel = new StochasticSoilModel(0, "StochasticSoilModelName");
+ var stochasticSoilModel = new StochasticSoilModel("StochasticSoilModelName");
stochasticSoilModel.StochasticSoilProfiles.Add(stochasticSoilProfile);
var calculationItem = new PipingCalculationScenario(new GeneralPipingInput());
@@ -1324,7 +1324,7 @@
{
SoilProfile = new TestPipingSoilProfile()
};
- var stochasticSoilModel = new StochasticSoilModel(0, "StochasticSoilModelName");
+ var stochasticSoilModel = new StochasticSoilModel("StochasticSoilModelName");
stochasticSoilModel.StochasticSoilProfiles.Add(testPipingSoilProfile);
var calculationItem = new PipingCalculationScenario(new GeneralPipingInput())
{
@@ -1379,14 +1379,14 @@
{
SoilProfile = new TestPipingSoilProfile()
};
- var stochasticSoilModel1 = new StochasticSoilModel(0, "StochasticSoilModel1Name");
+ var stochasticSoilModel1 = new StochasticSoilModel("StochasticSoilModel1Name");
stochasticSoilModel1.StochasticSoilProfiles.Add(stochasticSoilProfile1);
var stochasticSoilProfile2 = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0)
{
SoilProfile = new TestPipingSoilProfile()
};
- var stochasticSoilModel2 = new StochasticSoilModel(0, "StochasticSoilModel2Name");
+ var stochasticSoilModel2 = new StochasticSoilModel("StochasticSoilModel2Name");
stochasticSoilModel1.StochasticSoilProfiles.Add(stochasticSoilProfile2);
var inputParameters = new PipingInput(new GeneralPipingInput())
@@ -1532,7 +1532,7 @@
var failureMechanism = new PipingFailureMechanism();
var soilModels = new[]
{
- new StochasticSoilModel(1, "A")
+ new StochasticSoilModel("A")
{
Geometry =
{
@@ -1544,7 +1544,7 @@
new StochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 1)
}
},
- new StochasticSoilModel(2, "C")
+ new StochasticSoilModel("C")
{
Geometry =
{
@@ -1556,7 +1556,7 @@
new StochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 2)
}
},
- new StochasticSoilModel(3, "E")
+ new StochasticSoilModel("E")
{
Geometry =
{
@@ -1634,7 +1634,7 @@
mocks.ReplayAll();
var failureMechanism = new PipingFailureMechanism();
- var model = new StochasticSoilModel(1, "A")
+ var model = new StochasticSoilModel("A")
{
StochasticSoilProfiles =
{
@@ -2070,7 +2070,7 @@
private static StochasticSoilModel ValidStochasticSoilModel(double xMin, double xMax)
{
- var stochasticSoilModel = new StochasticSoilModel(0, "StochasticSoilModelName");
+ var stochasticSoilModel = new StochasticSoilModel("StochasticSoilModelName");
stochasticSoilModel.StochasticSoilProfiles.Add(new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 1234)
{
SoilProfile = new TestPipingSoilProfile()
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/StochasticSoilModelPropertiesTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/StochasticSoilModelPropertiesTest.cs (.../StochasticSoilModelPropertiesTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/StochasticSoilModelPropertiesTest.cs (.../StochasticSoilModelPropertiesTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -53,7 +53,7 @@
public void GetProperties_WithData_ReturnExpectedValues()
{
// Setup
- var stochasticSoilModel = new StochasticSoilModel(1324, "Name");
+ var stochasticSoilModel = new StochasticSoilModel("Name");
stochasticSoilModel.Geometry.Add(new Point2D(1.0, 2.0));
var pipingSoilProfile = new PipingSoilProfile("PipingSoilProfile", 0, new List
{
@@ -83,7 +83,7 @@
public void Constructor_Always_PropertiesHaveExpectedAttributesValues()
{
// Setup
- var stochasticSoilModel = new StochasticSoilModel(1324, "Name");
+ var stochasticSoilModel = new StochasticSoilModel("Name");
stochasticSoilModel.Geometry.Add(new Point2D(1.0, 2.0));
var pipingSoilProfile = new PipingSoilProfile("PipingSoilProfile", 0, new List
{
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextStochasticSoilModelSelectionEditorTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextStochasticSoilModelSelectionEditorTest.cs (.../PipingInputContextStochasticSoilModelSelectionEditorTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextStochasticSoilModelSelectionEditorTest.cs (.../PipingInputContextStochasticSoilModelSelectionEditorTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -58,7 +58,7 @@
var pipingInput = new PipingInput(new GeneralPipingInput())
{
- StochasticSoilModel = new StochasticSoilModel(0, "StochasticSoilModelName")
+ StochasticSoilModel = new StochasticSoilModel("StochasticSoilModelName")
};
var pipingInputContext = new PipingInputContext(pipingInput,
calculationItem,
@@ -106,7 +106,7 @@
{
SoilProfile = new TestPipingSoilProfile()
};
- var stochasticSoilModel = new StochasticSoilModel(0, "Model")
+ var stochasticSoilModel = new StochasticSoilModel("Model")
{
Geometry =
{
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextStochasticSoilProfileSelectionEditorTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextStochasticSoilProfileSelectionEditorTest.cs (.../PipingInputContextStochasticSoilProfileSelectionEditorTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextStochasticSoilProfileSelectionEditorTest.cs (.../PipingInputContextStochasticSoilProfileSelectionEditorTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -109,7 +109,7 @@
{
SoilProfile = new TestPipingSoilProfile()
};
- var stochasticSoilModel = new StochasticSoilModel(0, "Model")
+ var stochasticSoilModel = new StochasticSoilModel("Model")
{
Geometry =
{
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingCalculationRowTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingCalculationRowTest.cs (.../PipingCalculationRowTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingCalculationRowTest.cs (.../PipingCalculationRowTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -148,7 +148,7 @@
public void StochasticSoilModel_AlwaysOnChange_NotifyObserverCalculationPropertyChangedOutputCleared()
{
// Setup
- var newModel = new StochasticSoilModel(0, "test");
+ var newModel = new StochasticSoilModel("test");
var newValue = new DataGridViewComboBoxItemWrapper(newModel);
var calculation = new PipingCalculationScenario(new GeneralPipingInput());
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingCalculationsViewTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingCalculationsViewTest.cs (.../PipingCalculationsViewTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingCalculationsViewTest.cs (.../PipingCalculationsViewTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -1637,7 +1637,7 @@
}, SoilProfileType.SoilProfile1D, 1)
};
- var stochasticSoilModelA = new StochasticSoilModel(1, "Model A")
+ var stochasticSoilModelA = new StochasticSoilModel("Model A")
{
Geometry =
{
@@ -1668,7 +1668,7 @@
}, SoilProfileType.SoilProfile1D, 1)
};
- var stochasticSoilModelE = new StochasticSoilModel(1, "Model E")
+ var stochasticSoilModelE = new StochasticSoilModel("Model E")
{
Geometry =
{
@@ -1683,7 +1683,7 @@
pipingFailureMechanism.StochasticSoilModels.AddRange(new[]
{
stochasticSoilModelA,
- new StochasticSoilModel(1, "Model C")
+ new StochasticSoilModel("Model C")
{
Geometry =
{
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingFailureMechanismViewTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingFailureMechanismViewTest.cs (.../PipingFailureMechanismViewTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingFailureMechanismViewTest.cs (.../PipingFailureMechanismViewTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -254,13 +254,13 @@
ReferenceLine = referenceLine
};
- var stochasticSoilModel1 = new StochasticSoilModel(0, "name1");
+ var stochasticSoilModel1 = new StochasticSoilModel("name1");
stochasticSoilModel1.Geometry.AddRange(new[]
{
new Point2D(1.0, 2.0),
new Point2D(1.1, 2.2)
});
- var stochasticSoilModel2 = new StochasticSoilModel(0, "name2");
+ var stochasticSoilModel2 = new StochasticSoilModel("name2");
stochasticSoilModel2.Geometry.AddRange(new[]
{
new Point2D(3.0, 4.0),
@@ -684,7 +684,7 @@
var failureMechanism = new PipingFailureMechanism();
var failureMechanismContext = new PipingFailureMechanismContext(failureMechanism, new ObservableTestAssessmentSectionStub());
- var stochasticSoilModel = new StochasticSoilModel(0, "");
+ var stochasticSoilModel = new StochasticSoilModel("");
stochasticSoilModel.Geometry.AddRange(new[]
{
Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/Configurations/PipingCalculationConfigurationExporterTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/Configurations/PipingCalculationConfigurationExporterTest.cs (.../PipingCalculationConfigurationExporterTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/Configurations/PipingCalculationConfigurationExporterTest.cs (.../PipingCalculationConfigurationExporterTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -84,7 +84,7 @@
calculation2.InputParameters.SurfaceLine.Name = "PK001_0002";
calculation2.InputParameters.EntryPointL = (RoundedDouble) 0.3;
calculation2.InputParameters.ExitPointL = (RoundedDouble) 0.4;
- calculation2.InputParameters.StochasticSoilModel = new StochasticSoilModel(1, "PK001_0002_Piping");
+ calculation2.InputParameters.StochasticSoilModel = new StochasticSoilModel("PK001_0002_Piping");
calculation2.InputParameters.StochasticSoilProfile = new StochasticSoilProfile(0, SoilProfileType.SoilProfile1D, 0)
{
SoilProfile = new PipingSoilProfile("W1-6_4_1D1", 0, new[]
Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/Configurations/PipingCalculationConfigurationImporterTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/Configurations/PipingCalculationConfigurationImporterTest.cs (.../PipingCalculationConfigurationImporterTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/Configurations/PipingCalculationConfigurationImporterTest.cs (.../PipingCalculationConfigurationImporterTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -226,7 +226,7 @@
new Point3D(2.5, 1.0, 1.0),
new Point3D(5.0, 1.0, 0.0)
});
- var stochasticSoilModel = new StochasticSoilModel(1, "Ondergrondmodel");
+ var stochasticSoilModel = new StochasticSoilModel("Ondergrondmodel");
stochasticSoilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
@@ -276,7 +276,7 @@
new Point3D(3.0, 0.0, 1.0),
new Point3D(3.0, -5.0, 0.0)
});
- var stochasticSoilModel = new StochasticSoilModel(1, "Ondergrondmodel");
+ var stochasticSoilModel = new StochasticSoilModel("Ondergrondmodel");
stochasticSoilModel.Geometry.AddRange(new[]
{
new Point2D(1.0, 0.0),
@@ -500,7 +500,7 @@
}, SoilProfileType.SoilProfile1D, 0)
};
- var stochasticSoilModel = new StochasticSoilModel(1, "Ondergrondmodel");
+ var stochasticSoilModel = new StochasticSoilModel("Ondergrondmodel");
stochasticSoilModel.StochasticSoilProfiles.Add(stochasticSoilProfile);
stochasticSoilModel.Geometry.AddRange(new[]
{
Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfile/StochasticSoilModelReaderTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfile/StochasticSoilModelReaderTest.cs (.../StochasticSoilModelReaderTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfile/StochasticSoilModelReaderTest.cs (.../StochasticSoilModelReaderTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -315,7 +315,6 @@
Assert.AreEqual(expectedNrOfModels, nrOfModels);
CollectionAssert.AreEqual(expectedSegmentAndModelNames, readModels.Select(m => m.Name));
- CollectionAssert.AreEqual(expectedModelIds, readModels.Select(m => m.Id));
CollectionAssert.AreEqual(expectedSegmentPointCount, readModels.Select(m => m.Geometry.Count));
CollectionAssert.AreEqual(expectedProfileCount, readModels.Select(m => m.StochasticSoilProfiles.Count));
@@ -371,7 +370,6 @@
Assert.AreEqual(expectedNrOfModels, nrOfModels);
CollectionAssert.AreEqual(expectedSegmentAndModelNames, readModels.Select(m => m.Name));
- CollectionAssert.AreEqual(expectedModelIds, readModels.Select(m => m.Id));
CollectionAssert.AreEqual(expectedSegmentPointCount, readModels.Select(m => m.Geometry.Count));
CollectionAssert.AreEqual(expectedProfileCount, readModels.Select(m => m.StochasticSoilProfiles.Count));
@@ -471,7 +469,6 @@
Assert.AreEqual(2, readModels.Count);
CollectionAssert.AreEqual(expectedSegmentAndModelNames, readModels.Select(m => m.Name));
- CollectionAssert.AreEqual(expectedModelIds, readModels.Select(m => m.Id));
CollectionAssert.AreEqual(expectedSegmentPointCount, readModels.Select(m => m.Geometry.Count));
CollectionAssert.AreEqual(expectedProfileCount, readModels.Select(m => m.StochasticSoilProfiles.Count));
}
Index: Ringtoets/Piping/test/Ringtoets.Piping.Integration.TestUtil.Test/PipingTestDataGeneratorTest.cs
===================================================================
diff -u -r064078c50aa1cba72004f98318c5f7cc2f7ac6f1 -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/test/Ringtoets.Piping.Integration.TestUtil.Test/PipingTestDataGeneratorTest.cs (.../PipingTestDataGeneratorTest.cs) (revision 064078c50aa1cba72004f98318c5f7cc2f7ac6f1)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Integration.TestUtil.Test/PipingTestDataGeneratorTest.cs (.../PipingTestDataGeneratorTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -204,7 +204,6 @@
if (hasSoilModel)
{
- Assert.AreEqual(1, calculation.InputParameters.StochasticSoilModel.Id);
Assert.AreEqual("PK001_0001_Piping", calculation.InputParameters.StochasticSoilModel.Name);
if (hasSoilProfile)
Index: Ringtoets/Piping/test/Ringtoets.Piping.Integration.TestUtil/PipingTestDataGenerator.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/test/Ringtoets.Piping.Integration.TestUtil/PipingTestDataGenerator.cs (.../PipingTestDataGenerator.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Integration.TestUtil/PipingTestDataGenerator.cs (.../PipingTestDataGenerator.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -135,7 +135,7 @@
{
HydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, "PUNT_KAT_18", 0, 0),
SurfaceLine = surfaceline,
- StochasticSoilModel = new StochasticSoilModel(1, "PK001_0001_Piping"),
+ StochasticSoilModel = new StochasticSoilModel("PK001_0001_Piping"),
StochasticSoilProfile = new StochasticSoilProfile(0, SoilProfileType.SoilProfile1D, 0)
{
SoilProfile = new PipingSoilProfile("W1-6_0_1D1", 0, new[]
@@ -252,7 +252,7 @@
surfaceline1,
surfaceline2
}, "some/path/to/surfacelines");
- var stochasticSoilModel1 = new StochasticSoilModel(1, "A")
+ var stochasticSoilModel1 = new StochasticSoilModel("A")
{
Geometry =
{
@@ -264,7 +264,7 @@
new StochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 1)
}
};
- var stochasticSoilModel2 = new StochasticSoilModel(2, "C")
+ var stochasticSoilModel2 = new StochasticSoilModel("C")
{
Geometry =
{
Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/FileImporter/RingtoetsPipingSurfaceLineUpdateDataStrategyTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/FileImporter/RingtoetsPipingSurfaceLineUpdateDataStrategyTest.cs (.../RingtoetsPipingSurfaceLineUpdateDataStrategyTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/FileImporter/RingtoetsPipingSurfaceLineUpdateDataStrategyTest.cs (.../RingtoetsPipingSurfaceLineUpdateDataStrategyTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -728,7 +728,7 @@
var soilModels = new[]
{
- new StochasticSoilModel(1, "A")
+ new StochasticSoilModel("A")
{
Geometry =
{
@@ -740,7 +740,7 @@
new StochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 1)
}
},
- new StochasticSoilModel(2, "C")
+ new StochasticSoilModel("C")
{
Geometry =
{
@@ -797,7 +797,7 @@
// Setup
var soilModels = new[]
{
- new StochasticSoilModel(1, "A")
+ new StochasticSoilModel("A")
{
Geometry =
{
@@ -809,7 +809,7 @@
new StochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 1)
}
},
- new StochasticSoilModel(2, "C")
+ new StochasticSoilModel("C")
{
Geometry =
{
@@ -821,7 +821,7 @@
new StochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 2)
}
},
- new StochasticSoilModel(3, "E")
+ new StochasticSoilModel("E")
{
Geometry =
{
@@ -886,7 +886,7 @@
public void UpdateSurfaceLinesWithImportedData_WithCalculationAssignedToRemovedLine_UpdatesCalculationAndDoesNotRemoveStochasticSoilInputs()
{
// Setup
- var soilModel = new StochasticSoilModel(1, "A")
+ var soilModel = new StochasticSoilModel("A")
{
Geometry =
{
@@ -944,7 +944,7 @@
public void UpdateSurfaceLinesWithImportedData_WithCalculationAssignedToRemovedLine_UpdatesCalculationAndDoesNotRemoveStochasticSoilModelInput()
{
// Setup
- var soilModel = new StochasticSoilModel(1, "A")
+ var soilModel = new StochasticSoilModel("A")
{
Geometry =
{
@@ -1033,7 +1033,7 @@
var soilModels = new[]
{
- new StochasticSoilModel(1, "A")
+ new StochasticSoilModel("A")
{
Geometry =
{
@@ -1045,7 +1045,7 @@
new StochasticSoilProfile(0.2, SoilProfileType.SoilProfile1D, 1)
}
},
- new StochasticSoilModel(2, "C")
+ new StochasticSoilModel("C")
{
Geometry =
{
Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/FileImporter/StochasticSoilModelUpdateDataStrategyTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/FileImporter/StochasticSoilModelUpdateDataStrategyTest.cs (.../StochasticSoilModelUpdateDataStrategyTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/FileImporter/StochasticSoilModelUpdateDataStrategyTest.cs (.../StochasticSoilModelUpdateDataStrategyTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -487,9 +487,9 @@
/// Name of the created model.
/// List of names for the profiles to be added to the model.
/// A new .
- private StochasticSoilModel CreateSimpleModel(string modelName, params string[] profileNames)
+ private static StochasticSoilModel CreateSimpleModel(string modelName, params string[] profileNames)
{
- var model = new StochasticSoilModel(-1, modelName);
+ var model = new StochasticSoilModel(modelName);
foreach (string profileName in profileNames)
{
model.StochasticSoilProfiles.Add(
Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/TreeNodeInfos/StochasticSoilModelCollectionContextTreeNodeInfoTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/TreeNodeInfos/StochasticSoilModelCollectionContextTreeNodeInfoTest.cs (.../StochasticSoilModelCollectionContextTreeNodeInfoTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/TreeNodeInfos/StochasticSoilModelCollectionContextTreeNodeInfoTest.cs (.../StochasticSoilModelCollectionContextTreeNodeInfoTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -159,7 +159,7 @@
var failureMechanism = new PipingFailureMechanism();
failureMechanism.StochasticSoilModels.AddRange(new[]
{
- new StochasticSoilModel(0, "Name")
+ new StochasticSoilModel("Name")
}, "path");
var stochasticSoilModelCollectionContext = new StochasticSoilModelCollectionContext(
@@ -198,7 +198,7 @@
SoilProfile = pipingSoilProfile2
};
- var stochasticSoilModel = new StochasticSoilModel(0, "Name");
+ var stochasticSoilModel = new StochasticSoilModel("Name");
stochasticSoilModel.StochasticSoilProfiles.Add(stochasticSoilProfile1);
stochasticSoilModel.StochasticSoilProfiles.Add(stochasticSoilProfile2);
Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/TreeNodeInfos/StochasticSoilModelTreeNodeInfoTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/TreeNodeInfos/StochasticSoilModelTreeNodeInfoTest.cs (.../StochasticSoilModelTreeNodeInfoTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/TreeNodeInfos/StochasticSoilModelTreeNodeInfoTest.cs (.../StochasticSoilModelTreeNodeInfoTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -82,7 +82,7 @@
{
// Setup
const string name = "test test 123";
- var model = new StochasticSoilModel(1, name);
+ var model = new StochasticSoilModel(name);
// Call
string text = info.Text(model);
@@ -95,7 +95,7 @@
public void Image_Always_ReturnsSetImage()
{
// Setup
- var model = new StochasticSoilModel(1, "A");
+ var model = new StochasticSoilModel("A");
// Call
Image image = info.Image(model);
@@ -123,7 +123,7 @@
}, SoilProfileType.SoilProfile1D, 0)
};
- var stochasticSoilModel = new StochasticSoilModel(0, "Name");
+ var stochasticSoilModel = new StochasticSoilModel("Name");
stochasticSoilModel.StochasticSoilProfiles.Add(stochasticSoilProfile1);
stochasticSoilModel.StochasticSoilProfiles.Add(stochasticSoilProfile2);
@@ -143,7 +143,7 @@
public void ContextMenuStrip_Always_CallsBuilder()
{
// Setup
- var model = new StochasticSoilModel(1, "A");
+ var model = new StochasticSoilModel("A");
var mocks = new MockRepository();
Index: Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingDataSynchronizationServiceTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingDataSynchronizationServiceTest.cs (.../PipingDataSynchronizationServiceTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingDataSynchronizationServiceTest.cs (.../PipingDataSynchronizationServiceTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -353,7 +353,7 @@
{
// Setup
PipingFailureMechanism failureMechanism = null;
- var soilModel = new StochasticSoilModel(1, "A");
+ var soilModel = new StochasticSoilModel("A");
// Call
TestDelegate call = () => PipingDataSynchronizationService.RemoveStochasticSoilModel(failureMechanism, soilModel);
Index: Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingInputServiceTest.cs
===================================================================
diff -u -r94242c0e8dc46889015a0cc34aee3e37786bb30a -r16df8541528639fd1e8d9f2584fae28808b63fad
--- Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingInputServiceTest.cs (.../PipingInputServiceTest.cs) (revision 94242c0e8dc46889015a0cc34aee3e37786bb30a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingInputServiceTest.cs (.../PipingInputServiceTest.cs) (revision 16df8541528639fd1e8d9f2584fae28808b63fad)
@@ -32,7 +32,7 @@
public void SetMatchingStochasticSoilModel_SurfaceLineOverlappingSingleSoilModel_SetsSoilModel()
{
// Setup
- var soilModel = new StochasticSoilModel(1, "A");
+ var soilModel = new StochasticSoilModel("A");
var pipingInput = new PipingInput(new GeneralPipingInput());
// Call
@@ -50,8 +50,8 @@
{
// Setup
var pipingInput = new PipingInput(new GeneralPipingInput());
- var soilModel1 = new StochasticSoilModel(1, "A");
- var soilModel2 = new StochasticSoilModel(2, "C");
+ var soilModel1 = new StochasticSoilModel("A");
+ var soilModel2 = new StochasticSoilModel("C");
// Call
PipingInputService.SetMatchingStochasticSoilModel(pipingInput, new[]
@@ -68,14 +68,14 @@
public void SetMatchingStochasticSoilModel_CurrentSoilModelNotInOverlappingMultipleSoilModels_ClearsModel()
{
// Setup
- var nonOverlappingSoilModel = new StochasticSoilModel(1, "A");
+ var nonOverlappingSoilModel = new StochasticSoilModel("A");
var pipingInput = new PipingInput(new GeneralPipingInput())
{
StochasticSoilModel = nonOverlappingSoilModel
};
- var soilModel1 = new StochasticSoilModel(1, "A");
- var soilModel2 = new StochasticSoilModel(2, "C");
+ var soilModel1 = new StochasticSoilModel("A");
+ var soilModel2 = new StochasticSoilModel("C");
// Call
PipingInputService.SetMatchingStochasticSoilModel(pipingInput, new[]
@@ -94,7 +94,7 @@
// Setup
var soilProfile = new StochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1);
- var soilModel = new StochasticSoilModel(1, "A");
+ var soilModel = new StochasticSoilModel("A");
soilModel.StochasticSoilProfiles.Add(soilProfile);
var pipingInput = new PipingInput(new GeneralPipingInput())
@@ -113,7 +113,7 @@
public void SyncStochasticSoilProfileWithStochasticSoilModel_MultipleStochasticSoilProfilesInStochasticSoilModel_DoesNotSetStochasticSoilProfile()
{
// Setup
- var soilModel = new StochasticSoilModel(1, "A");
+ var soilModel = new StochasticSoilModel("A");
soilModel.StochasticSoilProfiles.AddRange(new[]
{
new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 1),
@@ -137,7 +137,7 @@
// Setup
var soilProfile = new StochasticSoilProfile(0.3, SoilProfileType.SoilProfile1D, 1);
- var soilModel = new StochasticSoilModel(1, "A");
+ var soilModel = new StochasticSoilModel("A");
soilModel.StochasticSoilProfiles.Add(soilProfile);
var pipingInput = new PipingInput(new GeneralPipingInput())