Index: DamClients/DamUI/trunk/src/Dam/Deltares.Dam.BenchmarkTests/DamPipingBenchmarkTest.cs =================================================================== diff -u -r4091 -r4258 --- DamClients/DamUI/trunk/src/Dam/Deltares.Dam.BenchmarkTests/DamPipingBenchmarkTest.cs (.../DamPipingBenchmarkTest.cs) (revision 4091) +++ DamClients/DamUI/trunk/src/Dam/Deltares.Dam.BenchmarkTests/DamPipingBenchmarkTest.cs (.../DamPipingBenchmarkTest.cs) (revision 4258) @@ -27,6 +27,7 @@ using Deltares.DamEngine.Io; using Deltares.DamEngine.Io.XmlInput; using Deltares.DamEngine.Io.XmlOutput; +using Deltares.Standard.Logging; using NUnit.Framework; namespace Deltares.Dam.BenchmarkTests; @@ -45,29 +46,26 @@ const string projectFilename = @"..\..\..\..\..\data\Dam\Benchmarks\Piping\Test 1\Integratietest piping 1.damx"; List allCalculationresults = ComputeProject(projectFilename, PipingModelType.Sellmeijer4Forces, 0); - var expectedPipingFactor = 0.506; // This is calculated according to spreadsheet - var expectedHCritical = 1.618839023; // This is calculated according to spreadsheet double expectedLocalPipingExitPointX = 35; // This is just taken from the calculation result itself var expectedPl3HeadAdjusted = 0.0; // For Piping, this must always be 0 var expectedPl4HeadAdjusted = 0.0; // For Piping, this must always be 0 - Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].Sellmeijer4ForcesPipingFactor.Value, cTolerance); - Assert.AreEqual(expectedHCritical, allCalculationresults[0].Sellmeijer4ForcesHCritical.Value, cTolerance); + Assert.AreEqual(3, LogManager.Messages.Count); Assert.AreEqual(true, allCalculationresults[0].IsUplift.Value); Assert.AreEqual(expectedLocalPipingExitPointX, allCalculationresults[0].LocalPipingExitPointX.Value, cTolerance); Assert.AreEqual(expectedPl3HeadAdjusted, allCalculationresults[0].Pl3HeadAdjusted.Value, cTolerance); Assert.AreEqual(expectedPl4HeadAdjusted, allCalculationresults[0].Pl4HeadAdjusted.Value, cTolerance); allCalculationresults.Clear(); allCalculationresults = ComputeProject(projectFilename, PipingModelType.Bligh, 0); - expectedPipingFactor = 0.5208; // This is just taken from the calculation result itself + var expectedPipingFactor = 0.5208; // This is just taken from the calculation result itself Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].BlighPipingFactor.Value, cTolerance); // Wti2017 allCalculationresults.Clear(); allCalculationresults = ComputeProject(projectFilename, PipingModelType.Wti2017, 0); expectedPipingFactor = 0.43219776821374467; // This is just taken from the calculation result itself - expectedHCritical = 1.9830328582839827; // This is just taken from the calculation result itself + var expectedHCritical = 1.9830328582839827; // This is just taken from the calculation result itself expectedLocalPipingExitPointX = 35; // This is just taken from the calculation result itself expectedPl3HeadAdjusted = 0.0; // This is just taken from the calculation result itself expectedPl4HeadAdjusted = 0.0; // This is just taken from the calculation result itself @@ -112,12 +110,11 @@ var projectFilename = @"..\..\..\..\..\data\Dam\Benchmarks\Piping\Test 2\Integratietest piping 2.damx"; List allCalculationresults = ComputeProject(projectFilename, PipingModelType.Sellmeijer4Forces, 0); - var expectedPipingFactor = 0.489; // This is calculated according to spreadsheet - Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].Sellmeijer4ForcesPipingFactor.Value, cTolerance); + Assert.AreEqual(3, LogManager.Messages.Count); allCalculationresults.Clear(); allCalculationresults = ComputeProject(projectFilename, PipingModelType.Bligh, 0); - expectedPipingFactor = 0.5208; // This is just taken from the calculation result itself + var expectedPipingFactor = 0.5208; // This is just taken from the calculation result itself Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].BlighPipingFactor.Value, cTolerance); // Wti2017 @@ -136,12 +133,11 @@ var projectFilename = @"..\..\..\..\..\data\Dam\Benchmarks\Piping\Test 3\Integratietest piping 3.damx"; List allCalculationresults = ComputeProject(projectFilename, PipingModelType.Sellmeijer4Forces, 0); - var expectedPipingFactor = 0.494; // This is calculated according to spreadsheet - Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].Sellmeijer4ForcesPipingFactor.Value, cTolerance); + Assert.AreEqual(3, LogManager.Messages.Count); allCalculationresults.Clear(); allCalculationresults = ComputeProject(projectFilename, PipingModelType.Bligh, 0); - expectedPipingFactor = 0.5208; // This is just taken from the calculation result itself + var expectedPipingFactor = 0.5208; // This is just taken from the calculation result itself Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].BlighPipingFactor.Value, cTolerance); // Wti2017 @@ -160,12 +156,11 @@ var projectFilename = @"..\..\..\..\..\data\Dam\Benchmarks\Piping\Test 4\Integratietest piping 4.damx"; List allCalculationresults = ComputeProject(projectFilename, PipingModelType.Sellmeijer4Forces, 0); - var expectedPipingFactor = 0.608; // This is calculated according to spreadsheet - Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].Sellmeijer4ForcesPipingFactor.Value, cTolerance); + Assert.AreEqual(3, LogManager.Messages.Count); allCalculationresults.Clear(); allCalculationresults = ComputeProject(projectFilename, PipingModelType.Bligh, 0); - expectedPipingFactor = 0.5208; // This is just taken from the calculation result itself + var expectedPipingFactor = 0.5208; // This is just taken from the calculation result itself Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].BlighPipingFactor.Value, cTolerance); // Wti2017 is not supported for now @@ -184,12 +179,11 @@ var projectFilename = @"..\..\..\..\..\data\Dam\Benchmarks\Piping\Test 5\Integratietest piping 5.damx"; List allCalculationresults = ComputeProject(projectFilename, PipingModelType.Sellmeijer4Forces, 0); - var expectedPipingFactor = 0.618; // This is calculated according to spreadsheet - Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].Sellmeijer4ForcesPipingFactor.Value, cTolerance); + Assert.AreEqual(3, LogManager.Messages.Count); allCalculationresults.Clear(); allCalculationresults = ComputeProject(projectFilename, PipingModelType.Bligh, 0); - expectedPipingFactor = 0.5208; // This is just taken from the calculation result itself + var expectedPipingFactor = 0.5208; // This is just taken from the calculation result itself Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].BlighPipingFactor.Value, cTolerance); // Wti2017 is not supported for now @@ -268,12 +262,11 @@ var projectFilename = @"..\..\..\..\..\data\Dam\Benchmarks\Piping\Test 5\Integratietest piping 5.damx"; List allCalculationresults = ComputeProject(projectFilename, PipingModelType.Sellmeijer4Forces, distanceToEntryPoint); - var expectedPipingFactor = 0.618; // This is calculated according to spreadsheet - Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].Sellmeijer4ForcesPipingFactor.Value, cTolerance); + Assert.AreEqual(3, LogManager.Messages.Count); allCalculationresults.Clear(); allCalculationresults = ComputeProject(projectFilename, PipingModelType.Bligh, distanceToEntryPoint); - expectedPipingFactor = 0.5208; // This is just taken from the calculation result itself + var expectedPipingFactor = 0.5208; // This is just taken from the calculation result itself Assert.AreEqual(expectedPipingFactor, allCalculationresults[0].BlighPipingFactor.Value, cTolerance); // Wti2017 is not supported for now