Index: DamClients/DamUI/trunk/src/Dam/Deltares.Dam.BenchmarkTests/DamCalculationBenchmarkTest.cs =================================================================== diff -u -r4889 -r4918 --- DamClients/DamUI/trunk/src/Dam/Deltares.Dam.BenchmarkTests/DamCalculationBenchmarkTest.cs (.../DamCalculationBenchmarkTest.cs) (revision 4889) +++ DamClients/DamUI/trunk/src/Dam/Deltares.Dam.BenchmarkTests/DamCalculationBenchmarkTest.cs (.../DamCalculationBenchmarkTest.cs) (revision 4918) @@ -71,10 +71,13 @@ RemoveCalculationDirectoriesForProject(cFolderName); List allCalculationResults = ComputeStabilityInsideProject(cFolderName, MStabModelType.UpliftVan, 1); - Assert.That(allCalculationResults[0].IsUplift.Value, Is.True); - Assert.That(allCalculationResults[0].Pl3MinUplift.Value, Is.EqualTo(1.024).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[0].Pl3LocalLocationXMinUplift.Value, - Is.EqualTo(49.100).Within(tolerance3Decimals)); + Assert.Multiple(() => + { + Assert.That(allCalculationResults[0].IsUplift.Value, Is.True); + Assert.That(allCalculationResults[0].Pl3MinUplift.Value, Is.EqualTo(1.024).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[0].Pl3LocalLocationXMinUplift.Value, + Is.EqualTo(49.100).Within(tolerance3Decimals)); + }); } /// @@ -89,10 +92,14 @@ RemoveCalculationDirectoriesForProject(cFolderName); List allCalculationResults = ComputeStabilityInsideProject(cFolderName, MStabModelType.UpliftVan, 1); - Assert.That(allCalculationResults[0].IsUplift.Value, Is.True); - Assert.That(allCalculationResults[0].Pl3MinUplift.Value, Is.EqualTo(0.906).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[0].Pl3HeadAdjusted.Value, Is.EqualTo(-1.289).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[0].Pl3LocalLocationXMinUplift.Value, Is.EqualTo(49.100).Within(tolerance3Decimals)); } + Assert.Multiple(() => + { + Assert.That(allCalculationResults[0].IsUplift.Value, Is.True); + Assert.That(allCalculationResults[0].Pl3MinUplift.Value, Is.EqualTo(0.906).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[0].Pl3HeadAdjusted.Value, Is.EqualTo(-1.289).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[0].Pl3LocalLocationXMinUplift.Value, Is.EqualTo(49.100).Within(tolerance3Decimals)); + }); + } /// /// Performs test BM04Opdrijven03 situation with a labile equilibirum 1D @@ -106,10 +113,13 @@ RemoveCalculationDirectoriesForProject(cFolderName); List allCalculationResults = ComputeStabilityInsideProject(cFolderName, MStabModelType.UpliftVan, 1); - Assert.That(allCalculationResults[0].IsUplift.Value, Is.True); - Assert.That(allCalculationResults[0].Pl3MinUplift.Value, Is.EqualTo(1.000).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[0].Pl3HeadAdjusted.Value, Is.EqualTo(-1.289).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[0].Pl3LocalLocationXMinUplift.Value, Is.EqualTo(49.100).Within(tolerance3Decimals)); + Assert.Multiple(() => + { + Assert.That(allCalculationResults[0].IsUplift.Value, Is.True); + Assert.That(allCalculationResults[0].Pl3MinUplift.Value, Is.EqualTo(1.000).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[0].Pl3HeadAdjusted.Value, Is.EqualTo(-1.289).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[0].Pl3LocalLocationXMinUplift.Value, Is.EqualTo(49.100).Within(tolerance3Decimals)); + }); } /// @@ -124,10 +134,13 @@ RemoveCalculationDirectoriesForProject(cFolderName); List allCalculationResults = ComputeStabilityInsideProject(cFolderName, MStabModelType.UpliftVan, 1); - Assert.That(allCalculationResults[0].IsUplift.Value, Is.True); - Assert.That(allCalculationResults[0].Pl3MinUplift.Value, Is.EqualTo(0.969).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[0].Pl3HeadAdjusted.Value, Is.EqualTo(-1.638).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[0].Pl3LocalLocationXMinUplift.Value, Is.EqualTo(49.100).Within(tolerance3Decimals)); + Assert.Multiple(() => + { + Assert.That(allCalculationResults[0].IsUplift.Value, Is.True); + Assert.That(allCalculationResults[0].Pl3MinUplift.Value, Is.EqualTo(0.969).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[0].Pl3HeadAdjusted.Value, Is.EqualTo(-1.638).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[0].Pl3LocalLocationXMinUplift.Value, Is.EqualTo(49.100).Within(tolerance3Decimals)); + }); } /// @@ -143,9 +156,12 @@ List allCalculationResults = ComputeStabilityInsideProject(cFolderName, MStabModelType.Bishop, 1); bool? isUplift = allCalculationResults[0].IsUplift; - Assert.That(isUplift, Is.False); - Assert.That(allCalculationResults[0].Pl3MinUplift, Is.EqualTo(null)); - Assert.That(allCalculationResults[0].Pl3LocalLocationXMinUplift, Is.EqualTo(null)); + Assert.Multiple(() => + { + Assert.That(isUplift, Is.False); + Assert.That(allCalculationResults[0].Pl3MinUplift, Is.EqualTo(null)); + Assert.That(allCalculationResults[0].Pl3LocalLocationXMinUplift, Is.EqualTo(null)); + }); } /// @@ -160,11 +176,14 @@ RemoveCalculationDirectoriesForProject(cFolderName); List allCalculationResults = ComputeStabilityInsideProject(cFolderName, MStabModelType.UpliftVan, 1); - Assert.That(allCalculationResults[0].IsUplift.Value, Is.True); - // Values at bottom ditch dikeside - Assert.That(allCalculationResults[0].Pl3MinUplift.Value, Is.EqualTo(0.820).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[0].Pl3HeadAdjusted.Value, Is.EqualTo(-1.289).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[0].Pl3LocalLocationXMinUplift.Value, Is.EqualTo(49.100).Within(tolerance3Decimals)); + Assert.Multiple(() => + { + Assert.That(allCalculationResults[0].IsUplift.Value, Is.True); + // Values at bottom ditch dikeside + Assert.That(allCalculationResults[0].Pl3MinUplift.Value, Is.EqualTo(0.820).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[0].Pl3HeadAdjusted.Value, Is.EqualTo(-1.289).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[0].Pl3LocalLocationXMinUplift.Value, Is.EqualTo(49.100).Within(tolerance3Decimals)); + }); } /// @@ -180,10 +199,13 @@ RemoveCalculationDirectoriesForProject(cDikeFolder); List allCalculationResults = ComputeStabilityInsideProject(cDikeFolder, MStabModelType.Bishop, 1, maxCores); - // Following values are just taken from the Geo Stability calculation and not manually calculated - Assert.That(allCalculationResults[0].StabilitySafetyFactor.Value, Is.EqualTo(0.785).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[1].StabilitySafetyFactor.Value, Is.EqualTo(0.998).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[2].StabilitySafetyFactor.Value, Is.EqualTo(0.792).Within(tolerance3Decimals)); + Assert.Multiple(() => + { + // Following values are just taken from the Geo Stability calculation and not manually calculated + Assert.That(allCalculationResults[0].StabilitySafetyFactor.Value, Is.EqualTo(0.845).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[1].StabilitySafetyFactor.Value, Is.EqualTo(1.052).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[2].StabilitySafetyFactor.Value, Is.EqualTo(1.156).Within(tolerance3Decimals)); + }); } /// @@ -199,10 +221,13 @@ RemoveCalculationDirectoriesForProject(cDikeFolder); List allCalculationResults = ComputeStabilityInsideProject(cDikeFolder, MStabModelType.UpliftVan, 1, maxCores); - // Following values are just taken from the Geo Stability calculation and not manually calculated - Assert.That(allCalculationResults[0].StabilitySafetyFactor.Value, Is.EqualTo(0.696).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[1].StabilitySafetyFactor.Value, Is.EqualTo(0.964).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[2].StabilitySafetyFactor.Value, Is.EqualTo(0.738).Within(tolerance3Decimals)); + Assert.Multiple(() => + { + // Following values are just taken from the Geo Stability calculation and not manually calculated + Assert.That(allCalculationResults[0].StabilitySafetyFactor.Value, Is.EqualTo(0.730).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[1].StabilitySafetyFactor.Value, Is.EqualTo(1.006).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[2].StabilitySafetyFactor.Value, Is.EqualTo(1.102).Within(tolerance3Decimals)); + }); } /// @@ -220,37 +245,40 @@ List allCalculationResults = ComputeStabilityInsideProject(cDikeFolder, MStabModelType.UpliftVan, 10, maxCores); // Following values are just taken from the Geo Stability calculation and not manually calculated - Assert.That(allCalculationResults.Count, Is.EqualTo(30)); - Assert.That(allCalculationResults[0].StabilitySafetyFactor.Value, Is.EqualTo(0.696).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[1].StabilitySafetyFactor.Value, Is.EqualTo(0.964).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[2].StabilitySafetyFactor.Value, Is.EqualTo(0.738).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[3].StabilitySafetyFactor.Value, Is.EqualTo(0.695).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[4].StabilitySafetyFactor.Value, Is.EqualTo(0.962).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[5].StabilitySafetyFactor.Value, Is.EqualTo(0.737).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[6].StabilitySafetyFactor.Value, Is.EqualTo(0.694).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[7].StabilitySafetyFactor.Value, Is.EqualTo(0.961).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[8].StabilitySafetyFactor.Value, Is.EqualTo(0.734).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[9].StabilitySafetyFactor.Value, Is.EqualTo(0.693).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[10].StabilitySafetyFactor.Value, Is.EqualTo(0.960).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[11].StabilitySafetyFactor.Value, Is.EqualTo(0.732).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[12].StabilitySafetyFactor.Value, Is.EqualTo(0.692).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[13].StabilitySafetyFactor.Value, Is.EqualTo(0.959).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[14].StabilitySafetyFactor.Value, Is.EqualTo(0.732).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[15].StabilitySafetyFactor.Value, Is.EqualTo(0.692).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[16].StabilitySafetyFactor.Value, Is.EqualTo(0.959).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[17].StabilitySafetyFactor.Value, Is.EqualTo(0.731).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[18].StabilitySafetyFactor.Value, Is.EqualTo(0.690).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[19].StabilitySafetyFactor.Value, Is.EqualTo(0.957).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[20].StabilitySafetyFactor.Value, Is.EqualTo(0.729).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[21].StabilitySafetyFactor.Value, Is.EqualTo(0.689).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[22].StabilitySafetyFactor.Value, Is.EqualTo(0.957).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[23].StabilitySafetyFactor.Value, Is.EqualTo(0.728).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[24].StabilitySafetyFactor.Value, Is.EqualTo(0.688).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[25].StabilitySafetyFactor.Value, Is.EqualTo(0.956).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[26].StabilitySafetyFactor.Value, Is.EqualTo(0.726).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[27].StabilitySafetyFactor.Value, Is.EqualTo(0.687).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[28].StabilitySafetyFactor.Value, Is.EqualTo(0.954).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[29].StabilitySafetyFactor.Value, Is.EqualTo(0.725).Within(tolerance3Decimals)); + Assert.That(allCalculationResults, Has.Count.EqualTo(30)); + Assert.Multiple(() => + { + Assert.That(allCalculationResults[0].StabilitySafetyFactor.Value, Is.EqualTo(0.730).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[1].StabilitySafetyFactor.Value, Is.EqualTo(1.006).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[2].StabilitySafetyFactor.Value, Is.EqualTo(1.102).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[3].StabilitySafetyFactor.Value, Is.EqualTo(0.728).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[4].StabilitySafetyFactor.Value, Is.EqualTo(1.005).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[5].StabilitySafetyFactor.Value, Is.EqualTo(1.100).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[6].StabilitySafetyFactor.Value, Is.EqualTo(0.727).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[7].StabilitySafetyFactor.Value, Is.EqualTo(1.003).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[8].StabilitySafetyFactor.Value, Is.EqualTo(1.098).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[9].StabilitySafetyFactor.Value, Is.EqualTo(0.725).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[10].StabilitySafetyFactor.Value, Is.EqualTo(1.002).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[11].StabilitySafetyFactor.Value, Is.EqualTo(1.097).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[12].StabilitySafetyFactor.Value, Is.EqualTo(0.725).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[13].StabilitySafetyFactor.Value, Is.EqualTo(1.001).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[14].StabilitySafetyFactor.Value, Is.EqualTo(1.096).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[15].StabilitySafetyFactor.Value, Is.EqualTo(0.724).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[16].StabilitySafetyFactor.Value, Is.EqualTo(1.000).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[17].StabilitySafetyFactor.Value, Is.EqualTo(1.095).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[18].StabilitySafetyFactor.Value, Is.EqualTo(0.722).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[19].StabilitySafetyFactor.Value, Is.EqualTo(0.999).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[20].StabilitySafetyFactor.Value, Is.EqualTo(1.094).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[21].StabilitySafetyFactor.Value, Is.EqualTo(0.721).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[22].StabilitySafetyFactor.Value, Is.EqualTo(1.001).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[23].StabilitySafetyFactor.Value, Is.EqualTo(1.093).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[24].StabilitySafetyFactor.Value, Is.EqualTo(0.719).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[25].StabilitySafetyFactor.Value, Is.EqualTo(0.996).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[26].StabilitySafetyFactor.Value, Is.EqualTo(1.091).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[27].StabilitySafetyFactor.Value, Is.EqualTo(0.718).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[28].StabilitySafetyFactor.Value, Is.EqualTo(0.995).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[29].StabilitySafetyFactor.Value, Is.EqualTo(1.089).Within(tolerance3Decimals)); + }); } /// @@ -265,8 +293,11 @@ List allCalculationResults = ComputeStabilityInsideProject(cFolderName, MStabModelType.UpliftVan, 1); RemoveCalculationDirectoriesForProject(cFolderName); - Assert.That(allCalculationResults[0].IsUplift.Value, Is.True); - Assert.That(allCalculationResults[0].StabilitySafetyFactor.Value, Is.EqualTo(0.767).Within(tolerance3Decimals)); + Assert.Multiple(() => + { + Assert.That(allCalculationResults[0].IsUplift.Value, Is.True); + Assert.That(allCalculationResults[0].StabilitySafetyFactor.Value, Is.EqualTo(0.769).Within(tolerance3Decimals)); + }); } #endregion Uplift