Index: DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/GeneralHelper.cs =================================================================== diff -u -r5597 -r5729 --- DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/GeneralHelper.cs (.../GeneralHelper.cs) (revision 5597) +++ DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/GeneralHelper.cs (.../GeneralHelper.cs) (revision 5729) @@ -31,6 +31,7 @@ using Deltares.DamEngine.Io; using Deltares.DamEngine.Io.XmlOutput; using DGeoSuite.Common; +using KellermanSoftware.CompareNetObjects; using NUnit.Framework; namespace Deltares.DamEngine.TestHelpers; @@ -210,4 +211,33 @@ return 0; } + + public static void CompareDesignOutput(Output expected, Output actual) + { + StripCalculationSubDir(expected); + StripCalculationSubDir(actual); + CompareOutput(expected, actual); + } + + private static void StripCalculationSubDir(Output expected) + { + foreach (DesignResult result in expected.Results.CalculationResults) + { + result.CalculationSubDir = ""; + } + } + + public static void CompareOutput(Output expected, Output actual) + { + var compare = new CompareLogic + { + Config = + { + MaxDifferences = 100 + } + }; + ComparisonResult result = compare.Compare(expected, actual); + Assert.That(result.Differences, Is.Empty, "Differences found read/write Output object"); + } + } \ No newline at end of file