Index: DamClients/DamUI/trunk/src/Dam/Deltares.Dam.TestHelper/ComputeHelper.cs
===================================================================
diff -u -r5167 -r5972
--- DamClients/DamUI/trunk/src/Dam/Deltares.Dam.TestHelper/ComputeHelper.cs (.../ComputeHelper.cs) (revision 5167)
+++ DamClients/DamUI/trunk/src/Dam/Deltares.Dam.TestHelper/ComputeHelper.cs (.../ComputeHelper.cs) (revision 5972)
@@ -43,7 +43,7 @@
///
///
///
- public static List ComputeStabilityProject(string projectFilename, MStabModelType modelType, bool isStabilityInside,
+ public static List ComputeStabilityProject(string projectFilename, string testName, MStabModelType modelType, bool isStabilityInside,
int expectedLocations, int maxCores, out List logMessages)
{
using DamProjectData damProjectData = ProjectLoader.LoadProjectData(projectFilename);
@@ -75,18 +75,19 @@
string inputXml = DamXmlSerialization.SaveInputAsXmlString(input);
// Enable next line for debugging
- //DamXmlSerialization.SaveInputAsXmlFile("InputForDebugging.xml", input);
+ DamXmlSerialization.SaveInputAsXmlFile(testName + "Input.xml", input);
var damEngineInterface = new EngineInterface(inputXml);
string validationMessages = damEngineInterface.Validate();
+ Assert.That(validationMessages, Is.Null);
if (string.IsNullOrEmpty(validationMessages))
{
// only if validation is ok, then
string outputXml = damEngineInterface.Run();
Output output = DamXmlSerialization.LoadOutputFromXmlString(outputXml);
// Enable next line for debugging
- // DamXmlSerialization.SaveOutputAsXmlFile("OutputForDebugging.xml", output);
+ DamXmlSerialization.SaveOutputAsXmlFile(testName + "Output.xml", output);
FillDamUiFromXmlOutput.AddOutputToDamProjectData(damProjectData, output);
}
Index: DamClients/DamUI/trunk/src/Dam/Deltares.Dam.IntegrationTests/FailureMechanismTests.cs
===================================================================
diff -u -r5771 -r5972
--- DamClients/DamUI/trunk/src/Dam/Deltares.Dam.IntegrationTests/FailureMechanismTests.cs (.../FailureMechanismTests.cs) (revision 5771)
+++ DamClients/DamUI/trunk/src/Dam/Deltares.Dam.IntegrationTests/FailureMechanismTests.cs (.../FailureMechanismTests.cs) (revision 5972)
@@ -39,10 +39,19 @@
{
string projectFilename = Path.Combine(Directory.GetCurrentDirectory(), @"TestData\StabilityOutside2DFromStixTest\BishopOutside.damx");
- List allCalculationResults = ComputeStabilityOutsideProject(projectFilename, 1);
- Assert.That(allCalculationResults.Count, Is.EqualTo(1));
+ List logMessages = new List();
+ List allCalculationResults = ComputeStabilityOutsideProject(projectFilename, 1, "TestStabilityOutsideWith2DstixFiles", out logMessages);
Assert.Multiple(() =>
{
+ //Assert.That(logMessages, Has.Count.EqualTo(2));
+ Assert.That(logMessages[0].Message, Is.EqualTo("Loc(DWP_1)_Sce(1)_Pro(DWP_1_stix): 227 sliding curves were not calculated, because they do not intersect with the subsoil"));
+ Assert.That(logMessages[1].Message, Is.EqualTo("Loc(DWP_1)_Sce(1)_Pro(DWP_1_stix): 245 sliding curves were not calculated, because they are not deep enough"));
+ Assert.That(allCalculationResults, Has.Count.EqualTo(1));
+
+
+ });
+ Assert.Multiple(() =>
+ {
Assert.That(allCalculationResults[0].LocationName, Is.EqualTo("DWP_1"));
Assert.That(allCalculationResults[0].CalculationResult, Is.EqualTo(CalculationResult.Succeeded));
Assert.That(allCalculationResults[0].X, Is.EqualTo(99718.000));
@@ -100,10 +109,16 @@
{
string projectFilename = Path.Combine(Directory.GetCurrentDirectory(), @"TestData\StabilityOutside1DProfileTest\Actualisatie.damx");
- List allCalculationResults = ComputeStabilityOutsideProject(projectFilename, 59);
- Assert.That(allCalculationResults, Has.Count.EqualTo(36));
+ List logMessages = new List();
+ List allCalculationResults = ComputeStabilityOutsideProject(projectFilename, 59, "TestStabilityOutsideWith1DProfiles", out logMessages);
Assert.Multiple(() =>
{
+ //Assert.That(logMessages, Has.Count.EqualTo(2));
+ Assert.That(logMessages[0].Message, Is.EqualTo("Loc(RK210-560)_Sce(1)_Pro(Segment_1_1D1): The maximum number of iterations (5) for the determination of the normal stress from the Sigma-Tau table is reached for slip plane (9.798, -0.889) / -8.460 for at least one slice."));
+ Assert.That(allCalculationResults, Has.Count.EqualTo(36));
+ });
+ Assert.Multiple(() =>
+ {
Assert.That(allCalculationResults[1].LocationName, Is.EqualTo("RK210-560"));
Assert.That(allCalculationResults[1].CalculationResult, Is.EqualTo(CalculationResult.Succeeded));
Assert.That(allCalculationResults[1].X, Is.EqualTo(88218.047).Within(tolerance3Decimals));
@@ -171,9 +186,9 @@
///
///
///
- private static List ComputeStabilityOutsideProject(string projectFilename, int expectedLocations)
+ private static List ComputeStabilityOutsideProject(string projectFilename, int expectedLocations, string testName, out List logMessages)
{
- return ComputeHelper.ComputeStabilityProject(projectFilename, MStabModelType.Bishop, false, expectedLocations, 1, out List _);
+ return ComputeHelper.ComputeStabilityProject(projectFilename, testName, MStabModelType.Bishop, false, expectedLocations, 1, out logMessages);
}
}
}
\ No newline at end of file