Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MacroStabilityInwardsTests.cs =================================================================== diff -u -r5911 -r5921 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MacroStabilityInwardsTests.cs (.../MacroStabilityInwardsTests.cs) (revision 5911) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MacroStabilityInwardsTests.cs (.../MacroStabilityInwardsTests.cs) (revision 5921) @@ -940,29 +940,27 @@ } [Test, Category(Categories.WorkInProgress)] - [TestCase("DWP_1", "SlopeAdaptionBeforeShoulderAdaption", CalculationResult.Succeeded, 1.4, 1.456, 5)] - [TestCase("DWP_1", "OptimizedSlopeAndShoulderAdaption", CalculationResult.Succeeded, 1.4, 1.520, 4)] - [TestCase("DWP_2", "SlopeAdaptionBeforeShoulderAdaption", CalculationResult.RunFailed, 1.5, 1.348, 14, "After height adaption ditch does not fit inside surfaceline anymore.")] - [TestCase("DWP_2", "OptimizedSlopeAndShoulderAdaption", CalculationResult.RunFailed, 1.5, 1.072, 17)] - [TestCase("DWP_13", "OptimizedSlopeAndShoulderAdaption", CalculationResult.RunFailed, 1.5, 0.943, 23, "The characteristic points of the surfaceline are not ascending in X-direction.")] - [TestCase("DWP_10", "OptimizedSlopeAndShoulderAdaption", CalculationResult.RunFailed, 1.5, 0.0, 7, "Location 'DWP_10', subsoil scenario 'DWP_10.stix', design scenario '3': The calculation failed with error message 'The design was not successful. The design was not successful. Stability calculation failed.'", "The design was not successful. Stability calculation failed.")] - public void GivenTutorialDesign_WhenSpecifiedLocationRunWithGeometryAdaption_ThenGivesExpectedResults(string locationId, string designMethod, + [TestCase("DWP_1", InputStabilityModelType.Bishop, "SlopeAdaptionBeforeShoulderAdaption", CalculationResult.Succeeded, 1.4, 1.456, 5)] + [TestCase("DWP_1", InputStabilityModelType.Bishop, "OptimizedSlopeAndShoulderAdaption", CalculationResult.Succeeded, 1.4, 1.520, 4)] + [TestCase("DWP_2", InputStabilityModelType.Bishop, "SlopeAdaptionBeforeShoulderAdaption", CalculationResult.RunFailed, 1.5, 1.348, 14, "After height adaption ditch does not fit inside surfaceline anymore.")] + [TestCase("DWP_2", InputStabilityModelType.Bishop, "OptimizedSlopeAndShoulderAdaption", CalculationResult.RunFailed, 1.5, 1.072, 17)] + [TestCase("DWP_13", InputStabilityModelType.Bishop, "OptimizedSlopeAndShoulderAdaption", CalculationResult.RunFailed, 1.5, 0.943, 23, "The characteristic points of the surfaceline are not ascending in X-direction.")] + [TestCase("DWP_10", InputStabilityModelType.Bishop, "OptimizedSlopeAndShoulderAdaption", CalculationResult.RunFailed, 1.5, 0.0, 7, "Location 'DWP_10', subsoil scenario 'DWP_10.stix', design scenario '3': The calculation failed with error message 'The design was not successful. The design was not successful. Stability calculation failed.'", "The design was not successful. Stability calculation failed.")] + [TestCase("DWP_1", InputStabilityModelType.BishopUpliftVan, "SlopeAdaptionBeforeShoulderAdaption", CalculationResult.Succeeded, 1.4, 1.456, 5)] + public void GivenTutorialDesign_WhenSpecifiedLocationRunWithGeometryAdaption_ThenGivesExpectedResults(string locationId, InputStabilityModelType stabilityModelType, string designMethod, CalculationResult calculationResult, double requiredSafetyFactor, double actualSafetyFactor, int iterationCount, string errorMessage = "", string firstStabilityMessage = "") { - // Create xml with Tutorial project - // Select location DWP_1 - // Calculation options: Stability Inside - Bishop - var calcDir = $"TestStabInwardsBishop_AdaptGeometry_{locationId}_{designMethod}_{requiredSafetyFactor.ToString(CultureInfo.InvariantCulture)}"; + // Use XML of general Tutorial Design project + var calcDir = $"TestStabInwards{stabilityModelType.ToString()}_AdaptGeometry_{locationId}_{designMethod}_{requiredSafetyFactor.ToString(CultureInfo.InvariantCulture)}"; if (Directory.Exists(calcDir)) { Directory.Delete(calcDir, true); // delete previous results } - // calcDir = Path.GetFullPath(calcDir); - // Directory.CreateDirectory(calcDir); string inputString = File.ReadAllText(tutorialStability2D); string[] locations = [locationId]; inputString = XmlAdapter.SelectLocations(inputString, locations); + inputString = XmlAdapter.ChangeStabilityInputModel(inputString, stabilityModelType); inputString = XmlAdapter.ChangeValueInXml(inputString, "FailureMechanismSystemType", ConversionHelper.ConvertToInputFailureMechanismSystemType( FailureMechanismSystemType.StabilityInside).ToString()); inputString = XmlAdapter.ChangeValueInXml(inputString, "ProjectPath", ""); // Current directory will be used