Index: DamClients/DamUI/trunk/src/Dam/Tests/DataPluginImporterCsvTests.cs =================================================================== diff -u -r3527 -r3822 --- DamClients/DamUI/trunk/src/Dam/Tests/DataPluginImporterCsvTests.cs (.../DataPluginImporterCsvTests.cs) (revision 3527) +++ DamClients/DamUI/trunk/src/Dam/Tests/DataPluginImporterCsvTests.cs (.../DataPluginImporterCsvTests.cs) (revision 3822) @@ -21,7 +21,6 @@ using Deltares.Dam.Data.DataPlugins.Configuration; using Deltares.Geometry; -using Deltares.Standard.TestUtils; using System; using System.Collections.Generic; using System.Linq; @@ -56,7 +55,7 @@ } [Test] - [Category(Categories.Slow)] + [Category("Slow")] public void CanImportDikeData() { IEnumerable dikeList = dataPluginImporter.GetDikeRingIdList(); Index: DamClients/DamUI/trunk/src/Dam/Tests/WaterBoardImporterTests.cs =================================================================== diff -u -r3796 -r3822 --- DamClients/DamUI/trunk/src/Dam/Tests/WaterBoardImporterTests.cs (.../WaterBoardImporterTests.cs) (revision 3796) +++ DamClients/DamUI/trunk/src/Dam/Tests/WaterBoardImporterTests.cs (.../WaterBoardImporterTests.cs) (revision 3822) @@ -26,7 +26,6 @@ using Deltares.Dam.Data.DataPlugins; using Deltares.Dam.Data.DataPlugins.Configuration; using Deltares.Geotechnics.SurfaceLines; -using Deltares.Standard.TestUtils; using NUnit.Framework; namespace Deltares.Dam.Tests @@ -55,7 +54,7 @@ } [Test] - [Category(Categories.Slow)] + [Category("Slow")] public void WaterBoardImportedWithCsvFilesHasValidData() { const string soilKleiDuin = "klei duin"; @@ -132,7 +131,7 @@ } [Test] - [Category(Categories.Slow)] + [Category("Slow")] public void ImportWaterBoardOnlyCsvFiles1D() { const double cTolerance = 0.0001; @@ -177,7 +176,7 @@ } [Test] - [Category(Categories.Slow)] + [Category("Slow")] public void ImportWaterBoardOnlyCsvFiles2D() { //const double cTolerance = 0.0001; @@ -209,7 +208,7 @@ } [Test] - [Category(Categories.Slow)] + [Category("Slow")] public void ImportWaterBoardOnlyWithoutPl3AndPl4CsvFiles() { const string definitionFilename = @".\TestData\CSVData\DataWithoutPl3AndPl4\Import.defx"; @@ -234,7 +233,7 @@ } [Test] - [Category(Categories.Slow)] + [Category("Slow")] public void ImportWaterBoardOnlyCsvFiles1DRelativeSoilProfiles() { const double cTolerance = 0.0001; @@ -319,7 +318,7 @@ } [Test] - [Category(Categories.Slow)] + [Category("Slow")] public void IsZoneDataReadCorrectlyFromCsvFiles() { const double cTolerance = 0.0001; Index: DamClients/DamUI/trunk/src/Dam/Tests/Memoryleaks/DamMemoryLeakTests.cs =================================================================== diff -u -r3527 -r3822 --- DamClients/DamUI/trunk/src/Dam/Tests/Memoryleaks/DamMemoryLeakTests.cs (.../DamMemoryLeakTests.cs) (revision 3527) +++ DamClients/DamUI/trunk/src/Dam/Tests/Memoryleaks/DamMemoryLeakTests.cs (.../DamMemoryLeakTests.cs) (revision 3822) @@ -21,13 +21,13 @@ using System.Collections.Generic; using Deltares.Dam.Data; +using Deltares.Dam.Tests.TestUtils; using Deltares.Geometry; -using Deltares.Geotechnics; using Deltares.Geotechnics.GeotechnicalGeometry; using Deltares.Geotechnics.SurfaceLines; -using Deltares.Standard.TestUtils; using NUnit.Framework; + namespace Deltares.Dam.Tests.Memoryleaks { public class DamMemoryLeakTests : MemoryLeakTestBase Index: DamClients/DamUI/trunk/src/Dam/Tests/Forms/DamSpatialEditorDecoratorTest.cs =================================================================== diff -u -r3527 -r3822 --- DamClients/DamUI/trunk/src/Dam/Tests/Forms/DamSpatialEditorDecoratorTest.cs (.../DamSpatialEditorDecoratorTest.cs) (revision 3527) +++ DamClients/DamUI/trunk/src/Dam/Tests/Forms/DamSpatialEditorDecoratorTest.cs (.../DamSpatialEditorDecoratorTest.cs) (revision 3822) @@ -30,7 +30,6 @@ using Deltares.Geotechnics.GeotechnicalGeometry; using Deltares.Standard.EventPublisher; using Deltares.Standard.Forms; -using Deltares.Standard.TestUtils; using NUnit.Framework; using CharacteristicPoint = Deltares.Geotechnics.SurfaceLines.CharacteristicPoint; using CharacteristicPointSet = Deltares.Geotechnics.SurfaceLines.CharacteristicPointSet; @@ -43,7 +42,7 @@ public class DamSpatialEditorDecoratorTest { [Test, Ignore] - [Category(Categories.WorkInProgress)] + [Category("WorkInProgress")] public void GivenDamSpatialEditorDecorator_WhenCharacteristicPointFiresAfterChangeEvent_ThenLocationUpdated() { const string dikeEmbankmentMaterial = "Material"; Index: DamClients/DamUI/trunk/src/Dam/Tests/DataPluginImporterTests.cs =================================================================== diff -u -r3527 -r3822 --- DamClients/DamUI/trunk/src/Dam/Tests/DataPluginImporterTests.cs (.../DataPluginImporterTests.cs) (revision 3527) +++ DamClients/DamUI/trunk/src/Dam/Tests/DataPluginImporterTests.cs (.../DataPluginImporterTests.cs) (revision 3822) @@ -27,7 +27,6 @@ using Deltares.Dam.Data.DataPlugins.Configuration; using Deltares.Dam.Data.Importers; using Deltares.Standard.Language; -using Deltares.Standard.TestUtils; using NUnit.Framework; @@ -316,7 +315,7 @@ } [Test] - [Category(Categories.Slow)] + [Category("Slow")] public void CanRetrieveWaterboardInfo() { var srcDataSources = new List Index: DamClients/DamUI/trunk/src/Dam/Tests/LoadCompatiblityTest.cs =================================================================== diff -u -r3527 -r3822 --- DamClients/DamUI/trunk/src/Dam/Tests/LoadCompatiblityTest.cs (.../LoadCompatiblityTest.cs) (revision 3527) +++ DamClients/DamUI/trunk/src/Dam/Tests/LoadCompatiblityTest.cs (.../LoadCompatiblityTest.cs) (revision 3822) @@ -23,12 +23,10 @@ using System.Collections.Generic; using System.IO; using System.Linq; - using Deltares.Dam.Data; using Deltares.Dam.TestHelper; using Deltares.Geotechnics.Soils; using Deltares.Geotechnics.SurfaceLines; -using Deltares.Standard.TestUtils; using KellermanSoftware.CompareNetObjects; using NUnit.Framework; @@ -304,8 +302,7 @@ } [Test] -// [Category("Integration")] - [Category(Categories.WorkInProgress)] + [Category("WorkInProgress")] [TestCase(@"HHNK\TPL_Hempolder.damx", @"HHNK\TPL_Hempolder0.soilmaterials.mdb", "TPL_Hempolder_0100")] // [TestCase(@"HHNKRegionalDesign\HHNK HemPolder Regional Design.damx", @"HHNKRegionalDesign\HHNK HemPolder Regional Design0.soilmaterials.mdb", "TPL_Hempolder_0100")] #Bka: this is a Bishop project which is not yet supported for Marcrostability kernel (only UpliftVan) public void CanLoadVersion_15_1_1_3(string projectFilename, string expectedSoilbaseName, string locationName) @@ -349,8 +346,7 @@ /// Expected name of the soilbase. /// Name of the location. [Test] -// [Category("Integration")] - [Category(Categories.WorkInProgress)] + [Category("WorkInProgress")] [TestCase(@"HHNK\TPL_Hempolder.damx", @"HHNK\TPL_Hempolder0.soilmaterials.mdb", "TPL_Hempolder_0100")] // [TestCase(@"HHNKRegionalDesign\HHNK HemPolder Regional Design.damx", @"HHNKRegionalDesign\HHNK HemPolder Regional Design0.soilmaterials.mdb", "TPL_Hempolder_0100")] #Bka: this is a Bishop project which is not yet supported for Marcrostability kernel (only UpliftVan) public void CanLoadVersion_18_1_3(string projectFilename, string expectedSoilbaseName, string locationName) @@ -455,9 +451,9 @@ /// - compare for a specific location if the data is correct /// This test is based on the same data as in CanLoadVersion_15_1_1_3() /// - [Test, Ignore] //#Bka: project uses Bishop which is not yet supported for MacroStability kernel. -// [Category("Integration")] - [Category(Categories.WorkInProgress)] + [Test] + [Category("WorkInProgress")] + [Ignore("project uses Bishop which is not yet supported for MacroStability kernel.")] public void CanSaveAndLoadCurrentVersion() { const string projectFilenameHhnk = @"..\..\..\data\Dam\Versions\V 15.1.1.3\HHNKRegionalDesign\HHNK HemPolder Regional Design.damx"; Index: DamClients/DamUI/trunk/src/Dam/Tests/Deltares.Dam.Tests.csproj =================================================================== diff -u -r3691 -r3822 --- DamClients/DamUI/trunk/src/Dam/Tests/Deltares.Dam.Tests.csproj (.../Deltares.Dam.Tests.csproj) (revision 3691) +++ DamClients/DamUI/trunk/src/Dam/Tests/Deltares.Dam.Tests.csproj (.../Deltares.Dam.Tests.csproj) (revision 3822) @@ -154,6 +154,9 @@ + + + Index: DamClients/DamUI/trunk/src/Dam/Tests/AuthorizationTestBase.cs =================================================================== diff -u -r3527 -r3822 --- DamClients/DamUI/trunk/src/Dam/Tests/AuthorizationTestBase.cs (.../AuthorizationTestBase.cs) (revision 3527) +++ DamClients/DamUI/trunk/src/Dam/Tests/AuthorizationTestBase.cs (.../AuthorizationTestBase.cs) (revision 3822) @@ -24,9 +24,7 @@ using System.Diagnostics; using System.Linq; using System.Reflection; - using Deltares.Authorization; -using Deltares.Standard.TestUtils; using NUnit.Framework; namespace AuthorizationTest @@ -244,7 +242,7 @@ } [Test] - [Category(Categories.Performance)] + [Category("Performance")] public void PerformanceTest() { // average 3 calls per second Index: DamClients/DamUI/trunk/src/Dam/Tests/IO/CombineImportedDataTest.cs =================================================================== diff -u -r3527 -r3822 --- DamClients/DamUI/trunk/src/Dam/Tests/IO/CombineImportedDataTest.cs (.../CombineImportedDataTest.cs) (revision 3527) +++ DamClients/DamUI/trunk/src/Dam/Tests/IO/CombineImportedDataTest.cs (.../CombineImportedDataTest.cs) (revision 3822) @@ -33,7 +33,6 @@ using Deltares.Geotechnics.SurfaceLines; using Deltares.Standard.EventPublisher; using Deltares.Standard.Logging; -using Deltares.Standard.TestUtils; using CharacteristicPointType = Deltares.Geotechnics.SurfaceLines.CharacteristicPointType; using DataAttribute = Deltares.Dam.Data.DataPlugins.Configuration.DataAttribute; @@ -42,7 +41,7 @@ public class CombineImportedDataTest { [Test] - [Category(Categories.Slow)] + [Category("Slow")] public void TestCombiningData() { DataEventPublisher.InvokeWithoutPublishingEvents(() => Index: DamClients/DamUI/trunk/src/Dam/Tests/TestUtils/ObjectLeakMonitor.cs =================================================================== diff -u --- DamClients/DamUI/trunk/src/Dam/Tests/TestUtils/ObjectLeakMonitor.cs (revision 0) +++ DamClients/DamUI/trunk/src/Dam/Tests/TestUtils/ObjectLeakMonitor.cs (revision 3822) @@ -0,0 +1,66 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of the Delta Shell Light Library. +// +// The Delta Shell Light Library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; + +namespace Deltares.Dam.Tests.TestUtils +{ + /// + /// Class used to detecting if an object is alive or not. + /// Used to prevent keeping the object + /// from being garbage collected. + /// + /// http://geekswithblogs.net/HouseOfBilz/archive/2008/11/11/writing-tests-to-catch-memory-leaks-in-.net.aspx + /// + public class ObjectLeakMonitor + { + private readonly WeakReference refereceToObject; + private readonly Type referencedObjectType; + + /// + /// Initializes a new instance of the class, + /// creating a to the monitored object. + /// + /// The object to monitor. + public ObjectLeakMonitor(object objectToMonitor) + { + refereceToObject = new WeakReference(objectToMonitor); + referencedObjectType = objectToMonitor.GetType(); + } + + /// + /// Gets the of the monitored object. + /// + public Type MonitoredObjectType => referencedObjectType; + + /// + /// Performs garbage collection and checks if the object still exists. + /// + /// True if the monitored object exists, false otherwise. + public bool ObjectIsAlive() + { + GC.Collect(); + GC.WaitForPendingFinalizers(); + + return refereceToObject.IsAlive; + } + } +} \ No newline at end of file Index: DamClients/DamUI/trunk/src/Dam/Tests/TestUtils/ObjectLeakMonitorTest.cs =================================================================== diff -u --- DamClients/DamUI/trunk/src/Dam/Tests/TestUtils/ObjectLeakMonitorTest.cs (revision 0) +++ DamClients/DamUI/trunk/src/Dam/Tests/TestUtils/ObjectLeakMonitorTest.cs (revision 3822) @@ -0,0 +1,78 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of the Delta Shell Light Library. +// +// The Delta Shell Light Library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using Deltares.Standard.TestUtils; +using NUnit.Framework; + +namespace Deltares.Dam.Tests.TestUtils +{ + [TestFixture] + public class ObjectLeakMonitorTest + { + [Test] + public void IsAlive_ObjectStillInScope_True() + { + // setup + var objectToMonitor = new object(); + var monitor = new ObjectLeakMonitor(objectToMonitor); + + // call + var isAlive = monitor.ObjectIsAlive(); + + // assert + var text = objectToMonitor.ToString(); // To ensure it stays in scope + Assert.IsTrue(isAlive, text); + } + + [Test] + public void MonitoredObjectType_ShouldBeTypeOfMonitoredObject() + { + // setup + var objectToMonitor = new object(); + var monitor = new ObjectLeakMonitor(objectToMonitor); + + // call + var type = monitor.MonitoredObjectType; + + // assert + Assert.AreEqual(objectToMonitor.GetType(), type); + } + + [Test] + public void ObjectIsAlive_ObjectOutOfScope_False() + { + // setup + var monitor = CreateObjectAndAssignToObjectLeakMonitor(); + + // call + var isAlive = monitor.ObjectIsAlive(); + + // assert + Assert.IsFalse(isAlive); + } + + private ObjectLeakMonitor CreateObjectAndAssignToObjectLeakMonitor() + { + var objectToMonitor = new object(); // This object goes out of scope when the method returns, and will be garbage collectable + return new ObjectLeakMonitor(objectToMonitor); + } + } +} \ No newline at end of file Index: DamClients/DamUI/trunk/src/Dam/Tests/TestUtils/MemoryLeakTestBase.cs =================================================================== diff -u --- DamClients/DamUI/trunk/src/Dam/Tests/TestUtils/MemoryLeakTestBase.cs (revision 0) +++ DamClients/DamUI/trunk/src/Dam/Tests/TestUtils/MemoryLeakTestBase.cs (revision 3822) @@ -0,0 +1,133 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of the Delta Shell Light Library. +// +// The Delta Shell Light Library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.Collections.Generic; +using System.Linq; +using NUnit.Framework; + +namespace Deltares.Dam.Tests.TestUtils +{ + /// + /// A base class providing template methods to be used for performing + /// memory leak tests. + /// + /// This class is working purely on non-GUI level. + [TestFixture] + public abstract class MemoryLeakTestBase + { + [TearDown] + public void TearDown() + { + objectLeakMonitor = null; + directCompositeChildrenLeakMonitors = null; + } + + private ObjectLeakMonitor objectLeakMonitor; + private ObjectLeakMonitor[] directCompositeChildrenLeakMonitors; + + /// + /// Clear all static caches that should be cleared at end of application + /// + protected virtual void ClearStaticCaches() + { + // Clear all static, non-GUI caches here + } + + protected void MonitorMemoryLeakage(Func createMonitoredObject, Func> getMonitoredChildren) where T : class, IDisposable + { + PerformMemoryMeasurements(createMonitoredObject, getMonitoredChildren); + + string report; + var isLeaking = CreateMemoryLeakReport(objectLeakMonitor, directCompositeChildrenLeakMonitors, out report); + if (!isLeaking) + { + Console.WriteLine(report); + } + Assert.IsFalse(isLeaking, report); + } + + protected void MonitorMemoryLeakage(Func> getMonitoredChildren) where T : class, IDisposable, new() + { + PerformMemoryMeasurements(() => new T(), getMonitoredChildren); + + string report; + var isLeaking = CreateMemoryLeakReport(objectLeakMonitor, directCompositeChildrenLeakMonitors, out report); + if (!isLeaking) + { + Console.WriteLine(report); + } + Assert.IsFalse(isLeaking, report); + } + + /// + /// Performs the memory measurements. + /// + /// The object type to be monitored. It's default constructor will be used. + /// The object creation method. + /// The get monitored children. + /// + ///

The creation is performed in a separate method than where the are checked to ensure the objects will be garbage collected.

+ ///
+ private void PerformMemoryMeasurements(Func createMonitoredObject, Func> getMonitoredChildren) where T : class, IDisposable + { + using (var objectToMonitor = createMonitoredObject()) + { + objectLeakMonitor = new ObjectLeakMonitor(objectToMonitor); + directCompositeChildrenLeakMonitors = getMonitoredChildren != null + ? getMonitoredChildren(objectToMonitor) + .Select(mc => new ObjectLeakMonitor(mc)) + .ToArray() + : null; + } + + ClearStaticCaches(); + } + + /// + /// Creates the memory leak report. + /// + /// The monitor for the object under test. + /// The composite children leak monitors. + /// Output: The memory leak report. + /// True if a memory or object leak has been detected; False otherwise. + private bool CreateMemoryLeakReport(ObjectLeakMonitor monitor, ObjectLeakMonitor[] compositeChildrenLeakMonitors, out string report) + { + report = Environment.NewLine + "=================================================================" + Environment.NewLine; + report += "Memory leak report for " + monitor.MonitoredObjectType + Environment.NewLine; + report += "Object garbage collected: " + !monitor.ObjectIsAlive() + Environment.NewLine; + + if (compositeChildrenLeakMonitors != null && compositeChildrenLeakMonitors.Any()) + { + report += "All monitored composite children garbage collected: " + compositeChildrenLeakMonitors.All(c => !c.ObjectIsAlive()) + Environment.NewLine; + + foreach (var compositeChildrenLeakMonitor in compositeChildrenLeakMonitors) + { + report += "\tChild (" + compositeChildrenLeakMonitor.MonitoredObjectType + ") garbage collected: " + !compositeChildrenLeakMonitor.ObjectIsAlive() + Environment.NewLine; + } + } + + report += "================================================================="; + + return monitor.ObjectIsAlive() || (compositeChildrenLeakMonitors != null && compositeChildrenLeakMonitors.Any(c => c.ObjectIsAlive())); + } + } +} \ No newline at end of file Index: DamClients/DamUI/trunk/src/Dam/Tests/DataPluginImporterDataShapeFilesTests.cs =================================================================== diff -u -r3527 -r3822 --- DamClients/DamUI/trunk/src/Dam/Tests/DataPluginImporterDataShapeFilesTests.cs (.../DataPluginImporterDataShapeFilesTests.cs) (revision 3527) +++ DamClients/DamUI/trunk/src/Dam/Tests/DataPluginImporterDataShapeFilesTests.cs (.../DataPluginImporterDataShapeFilesTests.cs) (revision 3822) @@ -22,7 +22,6 @@ using Deltares.Dam.Data; using Deltares.Dam.Data.DataPlugins.Configuration; using Deltares.Dam.Data.Importers; -using Deltares.Standard.TestUtils; namespace Deltares.Dam.Tests { @@ -197,7 +196,7 @@ */ [Test] - [Category(Categories.Slow)] + [Category("Slow")] public void CanRetrievePenetrationLengthFromDataShapeFile() { SetupGrootSalland(); Index: DamClients/DamUI/trunk/src/Dam/Tests/FailureMechanismTests.cs =================================================================== diff -u -r3798 -r3822 --- DamClients/DamUI/trunk/src/Dam/Tests/FailureMechanismTests.cs (.../FailureMechanismTests.cs) (revision 3798) +++ DamClients/DamUI/trunk/src/Dam/Tests/FailureMechanismTests.cs (.../FailureMechanismTests.cs) (revision 3822) @@ -26,8 +26,6 @@ using Deltares.DamEngine.Interface; using Deltares.DamEngine.Io; using Deltares.Standard; -using Deltares.Standard.Logging; -using Deltares.Standard.TestUtils; using NUnit.Framework; namespace Deltares.Dam.Tests @@ -40,7 +38,7 @@ /// /// /// - private static List ComputeStabilityOutsideProjectUsingClassic(string projectFilename, int expectedLocations, out List calculationMessages) + private static List ComputeStabilityOutsideProjectUsingClassic(string projectFilename, int expectedLocations) { // Read dikering using (var damProjectData = ProjectLoader.LoadProjectData(projectFilename)) @@ -68,21 +66,19 @@ // DamXmlSerialization.SaveOutputAsXmlFile("OutputForDebugging.xml", output); FillDamUiFromXmlOutput.AddOutputToDamProjectData(damProjectData, output); } - var allCalculationresults = damProjectData.DesignCalculations; - calculationMessages = damProjectData.CalculationMessages; - return allCalculationresults; + return damProjectData.DesignCalculations; } } - [Test, Ignore] - [Category(Categories.WorkInProgress)] // DamMacroStability kernel is being replaced by Macrostability kernel in DamEngine + [Test] + [Category("WorkInProgress")] + [Ignore("DamMacroStability kernel is being replaced by Macrostability kernel in DamEngine")] public void TestStabilityClassicOutsideWith2DstiFiles() { const double diff = 0.001; string projectFilename = @"..\..\..\data\DamEngineTestProjects\DAM Tutorial Design\DAM Tutorial Design.damx"; - List calculationMessages; - var allCalculationresults = ComputeStabilityOutsideProjectUsingClassic(projectFilename, 19, out calculationMessages); + var allCalculationresults = ComputeStabilityOutsideProjectUsingClassic(projectFilename, 19); Assert.AreEqual(1, allCalculationresults.Count); // Results as found with Dam Classic. These should be reproduced in the first place, however wrong these might be ;-) Assert.AreEqual("DWP_1", allCalculationresults[0].LocationName); @@ -132,15 +128,15 @@ Assert.AreEqual(null, allCalculationresults[0].UpliftFactor); } - [Test, Ignore] - [Category(Categories.WorkInProgress)] // DamMacroStability kernel is being replaced by Macrostability kernel in DamEngine and Stability Outside is not yet implemented. + [Test] + [Category("WorkInProgress")] + [Ignore("DamMacroStability kernel is being replaced by Macrostability kernel in DamEngine and Stability Outside is not yet implemented.")] public void TestStabilityClassicOutsideWith1DProfiles() { const double diff = 0.001; string projectFilename = @"..\..\..\data\DamEngineTestProjects\Actualisatie\Actualisatie.damx"; - List calculationMessages; - var allCalculationresults = ComputeStabilityOutsideProjectUsingClassic(projectFilename, 56, out calculationMessages); + var allCalculationresults = ComputeStabilityOutsideProjectUsingClassic(projectFilename, 56); Assert.AreEqual(36, allCalculationresults.Count); // Results for calc 2 (results[1]) as found with Dam Classic. These should be reproduced in the first place, however wrong these might be ;-) Assert.AreEqual("RK210-560", allCalculationresults[1].LocationName); Index: DamClients/DamUI/trunk/src/Dam/Tests/DamCalculationBenchmarkTest.cs =================================================================== diff -u -r3817 -r3822 --- DamClients/DamUI/trunk/src/Dam/Tests/DamCalculationBenchmarkTest.cs (.../DamCalculationBenchmarkTest.cs) (revision 3817) +++ DamClients/DamUI/trunk/src/Dam/Tests/DamCalculationBenchmarkTest.cs (.../DamCalculationBenchmarkTest.cs) (revision 3822) @@ -24,7 +24,6 @@ using Deltares.DamEngine.Io; using System.Collections.Generic; using Deltares.Dam.Data; -using Deltares.Standard.TestUtils; using NUnit.Framework; using Deltares.Dam.TestHelper; @@ -94,9 +93,10 @@ /// /// Performs test BM04Opdijven01 situation without uplift 1D /// - [Test, Ignore] + [Test] [Category("Slow")] - [Category(Categories.WorkInProgress)] // DamMacroStability kernel is being replaced by Macrostability kernel in DamEngine + [Category("WorkInProgress")] + [Ignore("DamMacroStability kernel is being replaced by Macrostability kernel in DamEngine")] public void BM04Opdrijven01SituatieZonderOpdrijven1D() { string cFolderName = @@ -113,9 +113,10 @@ /// /// Performs test BM04Opdrijven02 situation where uplift occurs 1D /// - [Test, Ignore] + [Test] [Category("Slow")] - [Category(Categories.WorkInProgress)] // DamMacroStability kernel is being replaced by Macrostability kernel in DamEngine + [Category("WorkInProgress")] + [Ignore("DamMacroStability kernel is being replaced by Macrostability kernel in DamEngine")] public void BM04Opdrijven02SituatieMetOpdrijven1D() { string cFolderName = @@ -132,9 +133,10 @@ /// /// Performs test BM04Opdrijven03 situation with a labile equilibirum 1D /// - [Test, Ignore] + [Test] [Category("Slow")] - [Category(Categories.WorkInProgress)] // DamMacroStability kernel is being replaced by Macrostability kernel in DamEngine + [Category("WorkInProgress")] + [Ignore("DamMacroStability kernel is being replaced by Macrostability kernel in DamEngine")] public void BM04Opdrijven03SituatieMetEenLabielEvenwicht1D() { string cFolderName = @@ -151,9 +153,10 @@ /// /// performs test BM04Opdrijven04 situation with an inclined ditch bottom where uplift occurs 1D /// - [Test, Ignore] + [Test] [Category("Slow")] - [Category(Categories.WorkInProgress)] // DamMacroStability kernel is being replaced by Macrostability kernel in DamEngine + [Category("WorkInProgress")] + [Ignore("DamMacroStability kernel is being replaced by Macrostability kernel in DamEngine")] public void BM04Opdrijven04SituatieMetEenSchuineSlootbodemEnOpdrijvenOp1Locatie1D() { string cFolderName = @@ -187,9 +190,10 @@ /// /// Performs test BM04Opdrijven06 situation with uplift on different locations along the 1D profile /// - [Test, Ignore] + [Test] [Category("Slow")] - [Category(Categories.WorkInProgress)] // DamMacroStability kernel is being replaced by Macrostability kernel in DamEngine + [Category("WorkInProgress")] + [Ignore("DamMacroStability kernel is being replaced by Macrostability kernel in DamEngine")] public void BM04Opdrijven06SituatieMetOpdrijvenOpVerschillendeLocatiesLangsHetProfiel1D() { string cFolderName =