Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/PipingBlighTests.cs =================================================================== diff -u -r6196 -r6237 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/PipingBlighTests.cs (.../PipingBlighTests.cs) (revision 6196) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/PipingBlighTests.cs (.../PipingBlighTests.cs) (revision 6237) @@ -39,6 +39,12 @@ { private const double tolerance = 0.0005; private const string workingDir = @"TestFiles\"; + private const string fileNamePipingAll = @"InputPipingAll.xml"; + // NOTE: The PipingVoorbeeld1 tests are now read from the file "InputPipingAll.xml" + // The file is created with DAM UI project .\data\Tutorials\DAMDesign\Piping\PipingAll\PipingAll.damx + // SVN rev.6179 + // The first location "Profiel 1" is used for the PipingVoorbeeld1 tests + private const string pipingModelBligh = "Bligh"; private string oldWorkingDir; [SetUp] @@ -64,8 +70,11 @@ // Based on ".\data\DamEngineTestProjects\PipingVoorbeeld1\PipingVoorbeeld1.damx" // Select Failure mechanism Piping and model Bligh // Set Analysis type to "No Adaption" - const string fileName = @"PipingVoorbeeld1_BlighInputFile.xml"; - string inputString = File.ReadAllText(fileName); + string inputString = File.ReadAllText(fileNamePipingAll); + string[] locations = ["Profiel 1"]; + inputString = XmlAdapter.SelectLocations(inputString, locations); + inputString = XmlAdapter.ChangeValueInXml(inputString, "PipingModelType", pipingModelBligh); + inputString = XmlAdapter.ChangeValueInXml(inputString, "AnalysisType", "NoAdaption"); inputString = XmlAdapter.ChangeValueInXml(inputString, "SegmentFailureMechanismType", segmentFailureMechanismType.ToString()); // Factor piping = 0.521 // Kritische hoogte = 1.667 @@ -134,8 +143,11 @@ // Based on ".\data\DamEngineTestProjects\PipingVoorbeeld1\PipingVoorbeeld1.damx" // Select Failure mechanism Piping and model Bligh // Set Analysis type to "Adapt geometry" - const string fileName = @"PipingVoorbeeld1_BlighDesignInputFile.xml"; - string inputString = File.ReadAllText(fileName); + string inputString = File.ReadAllText(fileNamePipingAll); + string[] locations = ["Profiel 1"]; + inputString = XmlAdapter.SelectLocations(inputString, locations); + inputString = XmlAdapter.ChangeValueInXml(inputString, "PipingModelType", pipingModelBligh); + inputString = XmlAdapter.ChangeValueInXml(inputString, "AnalysisType", "AdaptGeometry"); Output output = GeneralHelper.RunAfterInputValidation(inputString); @@ -254,7 +266,7 @@ [Test] [TestCase(1)] [TestCase(4)] - public void TestPipingBlightWithoutUplift(int maxCores) + public void CanPerformPipingBlightWithoutUplift(int maxCores) { Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; const string fileName = @"PipingBlighWithoutUplift.xml"; @@ -292,7 +304,7 @@ } [Test] - public void TestRunPipingBlighWithGeometry2DIsNotPossible() + public void CanHandleRunPipingBlighWithGeometry2DIsNotPossible() { // Based on DAM Tutorial Design.damx // Except for the following changes: