Index: src/Deltares.DSoilModel.Data.Tests/DSoilModelIOTest.cs
===================================================================
diff -u -r348 -r368
--- src/Deltares.DSoilModel.Data.Tests/DSoilModelIOTest.cs (.../DSoilModelIOTest.cs) (revision 348)
+++ src/Deltares.DSoilModel.Data.Tests/DSoilModelIOTest.cs (.../DSoilModelIOTest.cs) (revision 368)
@@ -36,6 +36,29 @@
Directory.Delete("TempFiles", true);
}
+ [TestCase("Groot Salland.mdb", 65, 5, 1, 3, 2)]
+ [TestCase("Groot Salland.gdb", 65, 5, 1, 3, 2)]
+ [TestCase("FileNotFound", 0, 0, 0, 0, 0)]
+ public void TestAddOldProjectDataBaseToProject(string fileName, int soils, int profiles1D, int profiles2D, int cpts, int borings)
+ {
+ var project = new DSoilModelProject();
+ string filePath = Path.Combine(GetTestFilesPath(), fileName);
+ LogManager.Clear();
+ DSoilModelIO.AddOldProjectDataBaseToProject(filePath, project);
+ if (File.Exists(filePath))
+ {
+ Assert.AreEqual(soils, project.Soils.Soils.Count);
+ Assert.AreEqual(profiles1D, project.SoilProfiles1D.Count);
+ Assert.AreEqual(profiles2D, project.SoilProfiles2D.Count);
+ Assert.AreEqual(cpts, project.CPTs.Count);
+ Assert.AreEqual(borings, project.Borings.Count);
+ }
+ else
+ {
+ LogManager.Messages.Any(m => m.MessageType == LogMessageType.Error);
+ }
+ }
+
[Test]
public void ImportOfEmptyCsvFilesResultsInWarninLogMessage()
{
Index: src/Deltares.DSoilModel.Data.Tests/Deltares.DSoilModel.Data.Tests.csproj
===================================================================
diff -u -r346 -r368
--- src/Deltares.DSoilModel.Data.Tests/Deltares.DSoilModel.Data.Tests.csproj (.../Deltares.DSoilModel.Data.Tests.csproj) (revision 346)
+++ src/Deltares.DSoilModel.Data.Tests/Deltares.DSoilModel.Data.Tests.csproj (.../Deltares.DSoilModel.Data.Tests.csproj) (revision 368)
@@ -134,6 +134,7 @@
+
@@ -153,10 +154,10 @@
-
-
+
+
-
+
Index: src/Deltares.DSoilModel.Data.Tests/TestFiles/Groot Salland.gdb
===================================================================
diff -u -r25 -r368
Binary files differ
Index: data/D-Soil Model/SOS-data/SOSDatabase.soil
===================================================================
diff -u -r361 -r368
Binary files differ