Index: src/Deltares.DSoilModel.Data.Tests/DSoilModelIOTest.cs =================================================================== diff -u -r378 -r428 --- src/Deltares.DSoilModel.Data.Tests/DSoilModelIOTest.cs (.../DSoilModelIOTest.cs) (revision 378) +++ src/Deltares.DSoilModel.Data.Tests/DSoilModelIOTest.cs (.../DSoilModelIOTest.cs) (revision 428) @@ -5,9 +5,11 @@ using System.Xml; using Deltares.Geotechnics; using Deltares.Geotechnics.IO.Importers; +using Deltares.Probabilistic; using Deltares.Standard.EventPublisher; using Deltares.Standard.Language; using Deltares.Standard.Logging; +using Deltares.Standard.TestUtils; using NUnit.Framework; namespace Deltares.DSoilModel.Data.Tests @@ -225,6 +227,62 @@ Assert.AreEqual(1, project.Soils.AquiferDictionary.Count(item => item.Value == true)); } + [Test] + [TestCase(1, "1 C-Phi", SoilType.Gravel, 11, 12, ShearStrengthModel.CPhi, 13, 14, true, 15, 16, 0.17, 111, 11, DistributionType.Normal, 11, 1, DistributionType.Deterministic)] + [TestCase(2, "2 Stress table", SoilType.Sand, 21, 22, "", 23, 24, true, 25, 26, 0.27, 222, 22, DistributionType.Normal, 22, 2, DistributionType.Deterministic)] + [TestCase(3, "3 Pseudo values", SoilType.Loam, 31, 32, "", 33, 34, true, 35, 36, 0.37, 333, 33, DistributionType.LogNormal, 33, 3, DistributionType.Normal)] + [TestCase(4, "4 Su measured", SoilType.Clay, 41, 42, "", 43, 44, true, 45, 46, 0.47, 444, 44, DistributionType.LogNormal, 44, 4, DistributionType.Normal)] + [TestCase(5, "5 Su calc with POP", SoilType.Peat, 51, 52, ShearStrengthModel.CuCalculated, 53, 54, true, 55, 56, 0.57, 555, 55, DistributionType.Deterministic, 55, 5, DistributionType.LogNormal)] + [TestCase(6, "6 Su gradient", SoilType.Gravel, 61, 62, "", 63, 64, true, 65, 66, 0.67, 666, 66, DistributionType.Deterministic, 66, 6, DistributionType.LogNormal)] + [TestCase(7, "7 Su calc with yield", SoilType.Sand, 71, 72, ShearStrengthModel.CuCalculated, 73, 74, false, 75, 76, 0.77, 777, 77, DistributionType.Normal, 77, 7, DistributionType.Deterministic)] + [TestCase(8, "8 No type", SoilType.Loam, 81, 82, "", 83, 84, true, 85, 86, 0.87, 888, 88, DistributionType.Normal, 88, 8, DistributionType.Deterministic)] + [Category(Categories.WorkInProgress)] // TODO solve issue DSB-573 + public void ImportMaterialsFromMdbFileMadeWithMSoilBase(int nb, string name, SoilType type, double gammaUnsat, double gammaSat, ShearStrengthModel model, double coh, double phi, + bool usePop, double pop, double ratioS, double expM, double d70MeanInMicroMeter, double d70StdDevInMicroMeter, DistributionType d70Dist, double permMean, double permStdDev, DistributionType permDist) + { + var project = new DSoilModelProject(); + project.ReadSoilsFromDatabase(Path.Combine(GetTestFilesPath(), "MSoilBase.mdb")); + + Assert.AreEqual(8, project.Soils.Soils.Count); + project.Soils.Soils.Sort(); + + // General properties + Assert.AreEqual(name, project.Soils.Soils[nb-1].Name); + Assert.AreEqual(type, project.Soils.Soils[nb-1].SoilType); + + // Filter BM Macrostabiliteit + Assert.AreEqual(gammaUnsat, project.Soils.Soils[nb - 1].AbovePhreaticLevel); + Assert.AreEqual(gammaSat, project.Soils.Soils[nb - 1].BelowPhreaticLevel); + Assert.AreEqual(model, project.Soils.Soils[nb - 1].ShearStrengthModel); + Assert.AreEqual(coh, project.Soils.Soils[nb - 1].Cohesion); + Assert.AreEqual(coh, project.Soils.Soils[nb - 1].CohesionStochast.Mean); + Assert.AreEqual(phi, project.Soils.Soils[nb - 1].FrictionAngle); + Assert.AreEqual(phi, project.Soils.Soils[nb - 1].FrictionAngleStochast.Mean); + Assert.AreEqual(usePop, project.Soils.Soils[nb - 1].UsePop); + Assert.AreEqual(pop, project.Soils.Soils[nb - 1].POP); + Assert.AreEqual(pop, project.Soils.Soils[nb - 1].POPStochast); + Assert.AreEqual(ratioS, project.Soils.Soils[nb - 1].RatioCuPc); + Assert.AreEqual(ratioS, project.Soils.Soils[nb - 1].RatioCuPcStochast.Mean); + Assert.AreEqual(expM, project.Soils.Soils[nb - 1].StrengthIncreaseExponent); + Assert.AreEqual(expM, project.Soils.Soils[nb - 1].StrengthIncreaseExponentStochast.Mean); + + // Filter Piping - Ringtoets + Assert.AreEqual(gammaUnsat, project.Soils.Soils[nb - 1].AbovePhreaticLevelStochast.Mean); + Assert.AreEqual(double.NaN, project.Soils.Soils[nb - 1].AbovePhreaticLevelStochast.Deviation); + Assert.AreEqual(DistributionType.LogNormal, project.Soils.Soils[nb - 1].AbovePhreaticLevelStochast.DistributionType); + Assert.AreEqual(gammaSat, project.Soils.Soils[nb - 1].BelowPhreaticLevelStochast.Mean); + Assert.AreEqual(double.NaN, project.Soils.Soils[nb - 1].BelowPhreaticLevelStochast.Deviation); + Assert.AreEqual(DistributionType.LogNormal, project.Soils.Soils[nb - 1].BelowPhreaticLevelStochast.DistributionType); + Assert.AreEqual(d70MeanInMicroMeter * 1e-6, project.Soils.Soils[nb - 1].DiameterD70); + Assert.AreEqual(d70MeanInMicroMeter * 1e-6, project.Soils.Soils[nb - 1].DiameterD70Stochast.Mean); + Assert.AreEqual(d70StdDevInMicroMeter * 1e-6, project.Soils.Soils[nb - 1].DiameterD70Stochast.Deviation); + Assert.AreEqual(d70Dist, project.Soils.Soils[nb - 1].DiameterD70Stochast.DistributionType); + Assert.AreEqual(permMean, project.Soils.Soils[nb - 1].PermeabKx); + Assert.AreEqual(permMean, project.Soils.Soils[nb - 1].PermeabKxStochast.Mean); + Assert.AreEqual(permStdDev, project.Soils.Soils[nb - 1].PermeabKxStochast.Deviation); + Assert.AreEqual(permDist, project.Soils.Soils[nb - 1].PermeabKxStochast.DistributionType); + } + /// /// Test of the import of surface lines from Csv file /// Index: src/Deltares.DSoilModel.Data.Tests/TestFiles/MSoilBase.mdb =================================================================== diff -u Binary files differ