Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/DebuggingTest.cs =================================================================== diff -u -r4052 -r4184 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/DebuggingTest.cs (.../DebuggingTest.cs) (revision 4052) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/DebuggingTest.cs (.../DebuggingTest.cs) (revision 4184) @@ -26,6 +26,7 @@ using Deltares.DamEngine.Interface; using Deltares.DamEngine.Io; using Deltares.DamEngine.Io.XmlOutput; +using Deltares.DamEngine.TestHelpers; using NUnit.Framework; namespace Deltares.DamEngine.IntegrationTests.IntegrationTests; @@ -41,20 +42,26 @@ /// 2) Copy the file to src\Deltares.DamEngine.IntegrationTests\TestFiles\InputForDebugging.xml /// 3) Run the test in Debugging mode /// - [Test, Ignore("This test is only used for debugging XML files generated by Dam UI")] - public void DebugWithXmlInputFile() + [Test]//, Ignore("This test is only used for debugging XML files generated by Dam UI")] + [TestCase(12)] + [TestCase(16)] + public void DebugWithXmlInputFile(int maxCores) { const string inputFilename = "InputForDebugging.xml"; // or put your own name here; string fullInputFilename = Path.Combine(mapTestFiles, inputFilename); Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; string inputString = File.ReadAllText(fullInputFilename); var engineInterface = new EngineInterface(inputString); Assert.IsNotNull(engineInterface.DamProjectData); + engineInterface.DamProjectData.MaxCalculationCores = maxCores; string result = engineInterface.Validate(); Assert.IsTrue(result == null, "Validation must succeed but does not, see output xml in debugger"); string outputString = engineInterface.Run(); - File.WriteAllText("Output.xml", outputString); + string outputName = "Output" + maxCores + ".xml"; + File.WriteAllText(outputName, outputString); Output output = DamXmlSerialization.LoadOutputFromXmlString(outputString); + int errorCount = GeneralHelper.DetermineNumberOfCalculationErrors(engineInterface.DamProjectData.CalculationMessages); + Assert.AreEqual(0, errorCount, "There should be nor errors during the calculation."); if (engineInterface.DamProjectData.DamProjectType == DamProjectType.Design) { Assert.AreNotEqual(null, output.Results.CalculationResults); @@ -64,4 +71,5 @@ Assert.AreNotEqual(null, output.Results.OperationalOutputTimeSeries); } } + } \ No newline at end of file