Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/Operational/Profile1DTests/CalculateStabilityInsideBishopGrid1_UseLocationDataOutputFile.xml =================================================================== diff -u -r5767 -r5915 Binary files differ Index: DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/XmlAdapter.cs =================================================================== diff -u -r5653 -r5915 --- DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/XmlAdapter.cs (.../XmlAdapter.cs) (revision 5653) +++ DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/XmlAdapter.cs (.../XmlAdapter.cs) (revision 5915) @@ -32,14 +32,15 @@ { /// /// Changes in an XML the value of all elements with the specified key to the specified value. + /// The key will be found only if it is a whole word. /// /// The input. /// The key. /// The value. /// The modified input public static string ChangeValueInXml(string input, string key, string value) { - string searchString = key + "=" + "\"([^\"]*)\""; // This means match any pattern which matches ="" + string searchString = "\\b" + key + "=" + "\"([^\"]*)\""; // This means match any pattern which matches ="" string replacement = key + "=\"" + value + "\""; // Replace with ="" string result = Regex.Replace(input, searchString, replacement, RegexOptions.IgnorePatternWhitespace); return result; Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/OperationalStabilityProfile1DTests.cs =================================================================== diff -u -r5899 -r5915 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/OperationalStabilityProfile1DTests.cs (.../OperationalStabilityProfile1DTests.cs) (revision 5899) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/OperationalStabilityProfile1DTests.cs (.../OperationalStabilityProfile1DTests.cs) (revision 5915) @@ -43,11 +43,14 @@ // "Deltares.DamLive.Tests\TestData\IntegrationTests\StabilityInsideBishopGrid\DAMLive.damx" // with DamLive rev.4860 [TestCase("CalculateStabilityInsideBishopGrid1")] + // Following testcase based on the DamLive test Deltares.DamLive.Tests.StabilityInsideBishopGridTest + // "Deltares.DamLive.Tests\TestData\IntegrationTests\StabilityInsideBishopGrid\DAMLive.damx" + // with DamLive rev.4860 // This tests if the sensor location data is used in the calculation by changing the source type of Pl1 offset below diketop to - // use the specified location data + // use the specified location data (which will be set to 1.1). // Expected X-value is location of DikeTopAtPolder = 22.562 - // Expected Z-value is WaterLevelOutside - PlLineOffsetBelowDikeTopAtPolder = -0.2 - 1.0 = -1.2 - [TestCase("CalculateStabilityInsideBishopGrid1", true, 22.562, -1.2)] + // Expected Z-value is WaterLevelOutside - PlLineOffsetBelowDikeTopAtPolder = -0.2 - 1.1 = -1.3 + [TestCase("CalculateStabilityInsideBishopGrid1", true, 22.562, -1.3)] // Following testcase based on the DamLive test Deltares.DamLive.Tests.StabilityInsideUpliftVanBeeSwarmTest // "Deltares.DamLive.Tests\TestData\IntegrationTests\StabilityInsideUpliftVanBeeSwarm\DAMLive.damx" // with DamLive rev.4860 @@ -90,7 +93,8 @@ if (isUseSensorLocationData) { // Change the source type of Pl1 offset below diketop location data (=1) - inputString = XmlAdapter.ChangeValueInXml(inputString, "PlLineOffsetBelowDikeTopAtPolder", "1"); + inputString = XmlAdapter.ChangeValueInXml(inputString, "SourceTypePl1PlLineOffsetBelowDikeTopAtPolder", "1"); + inputString = XmlAdapter.ChangeValueInXml(inputString, "PlLineOffsetBelowDikeTopAtPolder", "1.1"); } // When // Run calculation