Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.resx =================================================================== diff -u -r6679 -r6716 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.resx (.../Resources.resx) (revision 6679) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.resx (.../Resources.resx) (revision 6716) @@ -310,4 +310,7 @@ Location {0} Profile {1} Scenario {2} is not calculated because there is no uplift at using stability UpliftVan. + + No uplift + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MacroStabilityInwardsTests.cs =================================================================== diff -u -r6697 -r6716 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MacroStabilityInwardsTests.cs (.../MacroStabilityInwardsTests.cs) (revision 6697) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MacroStabilityInwardsTests.cs (.../MacroStabilityInwardsTests.cs) (revision 6716) @@ -45,7 +45,7 @@ private const double tolerance = 0.00051; private const string tutorialStability2D = @"TestFiles\InputTutorialStability2D.xml"; - [Test, Category(Categories.Slow)] + [Test] public void TestRunMacroStabilityTutorialDesignUpliftVan() { // Based on DAM UI tutorial for stability, for location DWP_1 @@ -105,7 +105,7 @@ }); } - [Test, Category(Categories.Slow)] + [Test] public void TestRunMacroStabilityTutorialDesignUpliftVan_NoUplift() { // Based on DAM UI tutorial for stability, for location DWP_18 @@ -130,9 +130,30 @@ Assert.That(output.Results.CalculationResults, Has.Length.EqualTo(1)); Assert.That(output.Results.CalculationMessages, Has.Length.EqualTo(1)); }); + DesignResult result = output.Results.CalculationResults[0]; + Assert.Multiple(() => + { + Assert.That(result.StabilityDesignResults.SafetyFactorSpecified, Is.False); + // ResultMessage "No uplift" + Assert.That(result.StabilityDesignResults.ResultMessage, Is.EqualTo("No uplift")); + // Check that a line is specified + Assert.That(result.StabilityDesignResults.RedesignedSurfaceLine, Is.Not.Null); + // Profile name = DWP_18.stix + Assert.That(result.ProfileName, Is.EqualTo("DWP_18.stix")); + }); + + // Uplift + UpliftSituation upliftSituation = result.StabilityDesignResults.UpliftSituation; + Assert.That(upliftSituation, Is.Not.Null); + Assert.Multiple(() => + { + Assert.That(upliftSituation.IsUplift, Is.EqualTo(false)); + // Calculation Result + Assert.That(ConversionHelper.ConvertToCalculationResult(result.CalculationResult), Is.EqualTo(CalculationResult.NoRun)); + }); } - [Test, Category(Categories.Slow)] + [Test] public void TestRunMacroStabilityTutorialDesignBishopUpliftVan_UpliftVanLowest() { // Based on DAM UI tutorial for stability, for location DWP_1 @@ -198,7 +219,7 @@ }); } - [Test, Category(Categories.Slow)] + [Test] public void TestRunMacroStabilityTutorialDesignBishopUpliftVan_BishopLowest() { // Based on DAM UI tutorial for stability, for location DWP_22 @@ -261,7 +282,7 @@ }); } - [Test, Category(Categories.Slow)] + [Test] public void TestRunMacroStabilityTutorialDesignBishopUpliftVan_NoUplift() { // Based on DAM UI tutorial for stability, for location DWP_18 @@ -292,10 +313,7 @@ { Assert.That(result.SafetyFactorSpecified, Is.True); Assert.That(result.SafetyFactor, Is.EqualTo(1.357).Within(tolerance)); - Assert.That(result.UpliftSituation, Is.Not.Null); - }); - Assert.Multiple(() => - { + Assert.That(result.ResultMessage, Is.EqualTo("")); Assert.That(result.UpliftSituation.IsUplift, Is.False); Assert.That(result.StabilityModelType, Is.EqualTo(DesignResultStabilityDesignResultsStabilityModelType.Bishop)); }); @@ -304,7 +322,8 @@ Assert.Multiple(() => { Assert.That(result.SafetyFactorSpecified, Is.False); - Assert.That(result.UpliftSituation, Is.Not.Null); + Assert.That(result.ResultMessage, Is.EqualTo("No uplift")); + Assert.That(result.UpliftSituation.IsUplift, Is.False); Assert.That(result.StabilityModelType, Is.EqualTo(DesignResultStabilityDesignResultsStabilityModelType.UpliftVan)); }); // Lowest of Bishop and Uplift Van @@ -313,7 +332,8 @@ { Assert.That(result.SafetyFactorSpecified, Is.True); Assert.That(result.SafetyFactor, Is.EqualTo(1.357).Within(tolerance)); - Assert.That(result.UpliftSituation, Is.Not.Null); + Assert.That(result.ResultMessage, Is.EqualTo("")); + Assert.That(result.UpliftSituation.IsUplift, Is.False); Assert.That(result.StabilityModelType, Is.EqualTo(DesignResultStabilityDesignResultsStabilityModelType.BishopUpliftVan)); }); Assert.Multiple(() => Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.Designer.cs =================================================================== diff -u -r6679 -r6716 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 6679) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 6716) @@ -588,5 +588,16 @@ return ResourceManager.GetString("WtiPipingSellmeijerRevisedKernelWrapper_NoOutputObjectDefined", resourceCulture); } } + + /// + /// Looks up a localized string similar to No uplift. + /// + internal static string MacroStabilityInwardsKernelWrapper_AddDesignResultNoRun_No_uplift { + get { + return ResourceManager.GetString("MacroStabilityInwardsKernelWrapper_AddDesignResultNoRun_No_uplift", resourceCulture); + } + } + + } } Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.nl-NL.resx =================================================================== diff -u -r6679 -r6716 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.nl-NL.resx (.../Resources.nl-NL.resx) (revision 6679) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.nl-NL.resx (.../Resources.nl-NL.resx) (revision 6716) @@ -306,4 +306,7 @@ Locatie {0} Profiel {1} Scenario {2} is niet berekend omdat er geen uplift is bij gebruik van UpliftVan. + + Geen opdrijven + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapper.cs =================================================================== diff -u -r6697 -r6716 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapper.cs (.../MacroStabilityInwardsKernelWrapper.cs) (revision 6697) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapper.cs (.../MacroStabilityInwardsKernelWrapper.cs) (revision 6716) @@ -501,6 +501,10 @@ designResultUpliftNoRun.CalculationResult = CalculationResult.NoRun; designResultUpliftNoRun.SafetyFactor = null; designResultUpliftNoRun.StabilityDesignResults.UpliftSituation = macroStabilityOutput.UpliftSituation; + if (!macroStabilityOutput.UpliftSituation.IsUplift) + { + designResultUpliftNoRun.StabilityDesignResults.ResultMessage = Resources.MacroStabilityInwardsKernelWrapper_AddDesignResultNoRun_No_uplift; + } if (designResults.Count > 0 && designResults[0].CalculationSubDir != null) { designResultUpliftNoRun.CalculationSubDir = designResults.Count == 1 ? designResults[0].CalculationSubDir.Replace(StabilityModelType.Bishop.ToString(), StabilityModelType.UpliftVan.ToString()) : "";