Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Dike.cs
===================================================================
diff -u -r4181 -r4189
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Dike.cs (.../Dike.cs) (revision 4181)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Dike.cs (.../Dike.cs) (revision 4189)
@@ -228,7 +228,7 @@
{
geoDatabase.ReUseSoils = true;
SoilList newSoilList = geoDatabase.ReadSoils(soilList.Soils);
- DatabaseSoils = newSoilList.Soils;
+ ImportedCsvSoils = newSoilList.Soils;
}
}
@@ -247,7 +247,7 @@
if (soilList.Soils.Count == 0)
{
FillDataBaseSoilListFromSoilBase();
- soilList.Soils.AddRange(DatabaseSoils);
+ soilList.Soils.AddRange(ImportedCsvSoils);
}
if (soilList.Soils.Count == 0)
@@ -264,9 +264,9 @@
}
///
- /// Add to soil data as read from the csv-file to the dike database
+ /// Add to soil data as read from the csv-file to the dike soils
///
- public void FillDataBaseSoilListFromCsvFile(IEnumerable soilRecords)
+ public void FillImportedCsvSoilsFromCsvFile(IEnumerable soilRecords)
{
if (soilRecords == null)
{
@@ -284,7 +284,7 @@
{
soil.AbovePhreaticLevel = soilRecord.UnsaturatedUnitWeight.Value;
}
-
+
if (soilRecord.SaturatedUnitWeight.HasValue)
{
soil.BelowPhreaticLevel = soilRecord.SaturatedUnitWeight.Value;
@@ -328,7 +328,7 @@
soil.POP = soilRecord.Pop.Value;
}
- DatabaseSoils.Add(soil);
+ ImportedCsvSoils.Add(soil);
}
}
@@ -408,7 +408,7 @@
}
}
- internal List DatabaseSoils { get; private set; } = new();
+ internal List ImportedCsvSoils { get; private set; } = new();
///
/// Tries to make the soil data as read for 1D profiles consistent with the data in the soil database.
@@ -424,7 +424,7 @@
// 1D profiles) but that are not found in the soil database because that are errors
foreach (Soil soil in soilList.Soils)
{
- Soil fs = DatabaseSoils.Find(t => string.Equals(t.Name, soil.Name, StringComparison.CurrentCultureIgnoreCase));
+ Soil fs = ImportedCsvSoils.Find(t => string.Equals(t.Name, soil.Name, StringComparison.CurrentCultureIgnoreCase));
if (fs == null)
{
errorSoils.Add(soil);
@@ -439,7 +439,7 @@
// Get the parameters for every soil in the now proper soil list from the database. Add soils
// that are in the database but not yet in the soil list.
- foreach (Soil soil in DatabaseSoils)
+ foreach (Soil soil in ImportedCsvSoils)
{
Soil existingSoil = soilList.GetSoilByName(soil.Name);
if (existingSoil == null)
Index: DamClients/DamUI/trunk/src/Dam/Deltares.Dam.Tests/DikeTest.cs
===================================================================
diff -u -r4181 -r4189
--- DamClients/DamUI/trunk/src/Dam/Deltares.Dam.Tests/DikeTest.cs (.../DikeTest.cs) (revision 4181)
+++ DamClients/DamUI/trunk/src/Dam/Deltares.Dam.Tests/DikeTest.cs (.../DikeTest.cs) (revision 4189)
@@ -221,12 +221,12 @@
public void TestFillDataBaseSoilListFromCsvFileWithoutSoilRecords_ThenNoDataBaseSoilsArePresent()
{
var newDike = new Dike();
- newDike.FillDataBaseSoilListFromCsvFile(new List());
- Assert.That(newDike.DatabaseSoils.Count, Is.Zero);
+ newDike.FillImportedCsvSoilsFromCsvFile(new List());
+ Assert.That(newDike.ImportedCsvSoils.Count, Is.Zero);
}
[Test]
- public void TestFillDataBaseSoilListFromCsvFileWithoutSoilRecords_ThenDataBaseSoilsAreFilled()
+ public void TestFillDataBaseSoilListFromCsvFileWithSoilRecords_ThenDataBaseSoilsAreFilled()
{
var newDike = new Dike();
@@ -269,12 +269,12 @@
}
};
- newDike.FillDataBaseSoilListFromCsvFile(soilRecords);
- Assert.That(newDike.DatabaseSoils.Count, Is.EqualTo(2));
+ newDike.FillImportedCsvSoilsFromCsvFile(soilRecords);
+ Assert.That(newDike.ImportedCsvSoils.Count, Is.EqualTo(2));
- for (var i = 0; i < newDike.DatabaseSoils.Count; i++)
+ for (var i = 0; i < newDike.ImportedCsvSoils.Count; i++)
{
- Soil soil = newDike.DatabaseSoils[i];
+ Soil soil = newDike.ImportedCsvSoils[i];
CsvImporterSoils.SoilRecord soilRecord = soilRecords[i];
Assert.That(soil.Name, Is.EqualTo(soilRecord.SoilName));
Assert.That(soil.Color, Is.EqualTo(soilRecord.SoilColor));