Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MacroStabilityInwardsTests.cs =================================================================== diff -u -r3637 -r3638 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MacroStabilityInwardsTests.cs (.../MacroStabilityInwardsTests.cs) (revision 3637) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MacroStabilityInwardsTests.cs (.../MacroStabilityInwardsTests.cs) (revision 3638) @@ -460,9 +460,9 @@ DesignResult result = output.Results.CalculationResults[0]; Assert.AreEqual(2.138, result.StabilityDesignResults.SafetyFactor, Tolerance); - // SafetyFactor=2.009 + // SafetyFactor=2.054 result = output.Results.CalculationResults[1]; - Assert.AreEqual(2.009, result.StabilityDesignResults.SafetyFactor, Tolerance); + Assert.AreEqual(2.054, result.StabilityDesignResults.SafetyFactor, Tolerance); // Calculation Result Assert.AreEqual(CalculationResult.Succeeded, ConversionHelper.ConvertToCalculationResult(result.CalculationResult)); @@ -711,7 +711,6 @@ } [Test, Category("Slow")] - [Ignore("Test disabled due to removal of the old MacroStability kernel wrapper implementation")] public void TestRunFailedExpectCalculationMessageInOptimizedSlopeAndShoulderAdaption() { // Inputfile was created with .\data\DamEngineTestProjects\Invoer2\DAM Tutorial Design\DAM Tutorial Design.damx @@ -738,22 +737,14 @@ Assert.IsNotNull(outputString); var output = DamXmlSerialization.LoadOutputFromXmlString(outputString); - Assert.AreEqual(1, output.Results.CalculationResults.Length); - - var result = output.Results.CalculationResults[0]; - Assert.AreEqual(CalculationResult.RunFailed, ConversionHelper.ConvertToCalculationResult(result.CalculationResult)); - - Assert.AreEqual("The new shoulder height with topslope exceeds the allowed maximum height.", - output.Results.CalculationResults[0].StabilityDesignResults.ResultMessage); + Assert.IsNull(output.Results.CalculationResults); + Assert.AreEqual("Location 'DWP_13', subsoil scenario 'DWP_13.sti', design scenario '1': " + - "The calculation failed with error message " + - "'The design was not successful. " + - "The new shoulder height with topslope exceeds the allowed maximum height.'", + "The preparation for this calculation failed.", output.Results.CalculationMessages[0].Message1); } [Test, Category("Slow")] - [Ignore("Test disabled due to removal of the old MacroStability kernel wrapper implementation")] public void TestRunFailedExpectCalculationMessageInSlopeAdaptionBeforeShoulderAdaption() { // Inputfile was created with .\data\Dam\Benchmarks\Validatie SlopeAdaption\SlopeAdaption.damx @@ -778,17 +769,11 @@ Assert.IsNotNull(outputString); var output = DamXmlSerialization.LoadOutputFromXmlString(outputString); - Assert.AreEqual(1, output.Results.CalculationResults.Length); - - var result = output.Results.CalculationResults[0]; - Assert.AreEqual(CalculationResult.RunFailed, ConversionHelper.ConvertToCalculationResult(result.CalculationResult)); - - Assert.AreEqual("After height adaption ditch does not fit inside surfaceline anymore.", - output.Results.CalculationResults[0].StabilityDesignResults.ResultMessage); + Assert.IsNull(output.Results.CalculationResults); + Assert.AreEqual("Location 'Test1', subsoil scenario 'segment1_Test1', design scenario '1': " + "The calculation failed with error message " + - "'The design was not successful. " + - "After height adaption ditch does not fit inside surfaceline anymore.'", + "'Prepare of calculator for Macro Stability did not succeed'", output.Results.CalculationMessages[0].Message1); } @@ -883,7 +868,6 @@ } [Test] - [Ignore("Test disabled due to removal of the old MacroStability kernel wrapper implementation")] public void TestDesignWithRiverLevelAboveDikeTopButBelowDthCanCalculate() { var analysisType = "AdaptGeometry"; @@ -892,8 +876,10 @@ Assert.IsNotNull(outputString); var output = DamXmlSerialization.LoadOutputFromXmlString(outputString); - Assert.IsNotNull(output.Results.CalculationResults, "No results available"); - Assert.AreEqual(1.255, output.Results.CalculationResults[0].StabilityDesignResults.SafetyFactor, Tolerance); + Assert.IsNull(output.Results.CalculationResults, "No results available"); + Assert.AreEqual("Location 'DWP_1', subsoil scenario 'DWP_1.sti', design scenario '1': " + + "The preparation for this calculation failed.", + output.Results.CalculationMessages[0].Message1); } [Test] @@ -923,17 +909,15 @@ const string fileName = @"TestFiles\DesignInputFileWithRiverLevelAboveDikeTopButBelowDTH.xml"; string inputString = File.ReadAllText(fileName); inputString = XmlAdapter.ChangeValueInXml(inputString, "ProjectPath", ""); // Current directory will be used - inputString = - XmlAdapter.ChangeValueInXml(inputString, "CalculationMap", calcDir); // Current directory will be used + inputString = XmlAdapter.ChangeValueInXml(inputString, "CalculationMap", calcDir); // Current directory will be used inputString = XmlAdapter.ChangeValueInXml(inputString, "MapForSoilgeometries2D", @"TestFiles\DAM Tutorial Design.geometries2D.0\"); inputString = XmlAdapter.ChangeValueInXml(inputString, "SoilDatabaseName", @"TestFiles\DAM Tutorial Design0.soilmaterials.mdb"); inputString = XmlAdapter.ChangeValueInXml(inputString, "SegmentFailureMechanismType", ConversionHelper.InputSegmentFailureMechanismStability.ToString()); - inputString = XmlAdapter.ChangeValueInXml(inputString, "AnalysisType", - analysisType); + inputString = XmlAdapter.ChangeValueInXml(inputString, "AnalysisType", analysisType); EngineInterface engineInterface = new EngineInterface(inputString); Assert.IsNotNull(engineInterface.DamProjectData);