Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTIStabilityModelResult.xsd =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTIStabilityModelResult.xsd (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTIStabilityModelResult.xsd (revision 1969) @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTIGeometry.xsd =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTIGeometry.xsd (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTIGeometry.xsd (revision 1969) @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj =================================================================== diff -u -r1963 -r1969 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj (.../Deltares.DamEngine.Calculators.csproj) (revision 1963) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj (.../Deltares.DamEngine.Calculators.csproj) (revision 1969) @@ -217,7 +217,6 @@ - @@ -235,6 +234,33 @@ Designer + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTISoilModel.xsd =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTISoilModel.xsd (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTISoilModel.xsd (revision 1969) @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTIStabilityModelValidation.xsd =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTIStabilityModelValidation.xsd (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTIStabilityModelValidation.xsd (revision 1969) @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/TestFiles/Benchmark 1-01b.wti =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/TestFiles/Benchmark 1-01b.wti (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/TestFiles/Benchmark 1-01b.wti (revision 1969) @@ -0,0 +1,400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTIDeserializer.cs =================================================================== diff -u -r1964 -r1969 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTIDeserializer.cs (.../WTIDeserializer.cs) (revision 1964) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTIDeserializer.cs (.../WTIDeserializer.cs) (revision 1969) @@ -52,12 +52,12 @@ { XmlDocument document = new XmlDocument(); document.LoadXml(xml); - document.Schemas.Add(GetSchema("Deltares.WTIStability.IO.WtiVersionInfo.xsd", false)); - document.Schemas.Add(GetSchema("Deltares.WTIStability.IO.WTIGeometry.xsd", false)); - document.Schemas.Add(GetSchema("Deltares.WTIStability.IO.WTIWaternetDefinition.xsd", false)); - document.Schemas.Add(GetSchema("Deltares.WTIStability.IO.WTIWaternet.xsd", false)); - document.Schemas.Add(GetSchema("Deltares.WTIStability.IO.WTISoilModel.xsd", false)); - document.Schemas.Add(GetSchema("Deltares.WTIStability.IO.WTIStabilityModel.xsd", true)); + document.Schemas.Add(GetSchema("Deltares.DamEngine.Calculators.KernelWrappers.MacrostabilityCommon.MacrostabilityIo.WtiVersionInfo.xsd", false)); + document.Schemas.Add(GetSchema("Deltares.DamEngine.Calculators.KernelWrappers.MacrostabilityCommon.MacrostabilityIo.WTIGeometry.xsd", false)); + document.Schemas.Add(GetSchema("Deltares.DamEngine.Calculators.KernelWrappers.MacrostabilityCommon.MacrostabilityIo.WTIWaternetDefinition.xsd", false)); + document.Schemas.Add(GetSchema("Deltares.DamEngine.Calculators.KernelWrappers.MacrostabilityCommon.MacrostabilityIo.WTIWaternet.xsd", false)); + document.Schemas.Add(GetSchema("Deltares.DamEngine.Calculators.KernelWrappers.MacrostabilityCommon.MacrostabilityIo.WTISoilModel.xsd", false)); + document.Schemas.Add(GetSchema("Deltares.DamEngine.Calculators.KernelWrappers.MacrostabilityCommon.MacrostabilityIo.WTIStabilityModel.xsd", true)); // the following call to Validate succeeds. document.Validate(ValidationEventHandler); Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WtiVersionInfo.xsd =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WtiVersionInfo.xsd (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WtiVersionInfo.xsd (revision 1969) @@ -0,0 +1,31 @@ + + + + + + + + + + Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTIWaternetDefinition.xsd =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTIWaternetDefinition.xsd (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTIWaternetDefinition.xsd (revision 1969) @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/Deltares.DamEngine.Calculators.Tests.csproj =================================================================== diff -u -r1967 -r1969 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/Deltares.DamEngine.Calculators.Tests.csproj (.../Deltares.DamEngine.Calculators.Tests.csproj) (revision 1967) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/Deltares.DamEngine.Calculators.Tests.csproj (.../Deltares.DamEngine.Calculators.Tests.csproj) (revision 1969) @@ -36,6 +36,10 @@ False ..\..\lib\FailureMechanisms\DamMacroStability\Deltares.DamMacroStability.Calculator.dll + + False + ..\..\lib\FailureMechanisms\Macrostability\Deltares.MacroStability.Kernel.dll + False ..\..\lib\FailureMechanisms\WbiPipingMerged\Deltares.WTIPiping.Merged.dll @@ -54,6 +58,7 @@ + @@ -116,6 +121,12 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/TestFiles/Benchmark 2-04a.wti =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/TestFiles/Benchmark 2-04a.wti (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/TestFiles/Benchmark 2-04a.wti (revision 1969) @@ -0,0 +1 @@ + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTIWaternetUsedDuringCalculation.xsd =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTIWaternetUsedDuringCalculation.xsd (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTIWaternetUsedDuringCalculation.xsd (revision 1969) @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTIStabilityModel.xsd =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTIStabilityModel.xsd (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTIStabilityModel.xsd (revision 1969) @@ -0,0 +1,202 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTIWaternet.xsd =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTIWaternet.xsd (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacrostabilityCommon/MacrostabilityIo/WTIWaternet.xsd (revision 1969) @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/MacrostabilityIoTests.cs =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/MacrostabilityIoTests.cs (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/MacrostabilityIoTests.cs (revision 1969) @@ -0,0 +1,54 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero 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.IO; +using NUnit.Framework; +using Deltares.MacroStability.Kernel; +using Deltares.DamEngine.Calculators.KernelWrappers.MacrostabilityCommon.MacrostabilityIo; +using Deltares.DamEngine.TestHelpers; + +namespace Deltares.DamEngine.Calculators.Tests.KernelWrappers.MacroStabilityCommon +{ + [TestFixture] + public class MacrostabilityIoTests + { + private const string WtiFilesMap = @"KernelWrappers\MacroStabilityCommon\TestFiles"; + [Test] + [Category(Categories.WorkInProgress)] + public void GivenWtiFileWhenDeserializingAndSerializingThenTheStringsAreEqual() + { + // Given WTI file + const string fileNameIn = "Benchmark 1-01b.wti"; + string fullFileNameIn = Path.Combine(WtiFilesMap, fileNameIn); + + // When Deserializing and Serializing + string xmlInput = File.ReadAllText(fullFileNameIn); + const string fileNameOut = fileNameIn + ".out"; + string fullFileNameOut = Path.Combine(WtiFilesMap, fileNameOut); + KernelModel kernelModel = WtiDeserializer.Deserialize(xmlInput); + string xmlOutput = WtiSerializer.Serialize(kernelModel); + File.WriteAllText(fullFileNameOut, xmlOutput); + + // Then the strings are equal + Assert.AreEqual(xmlInput, xmlOutput); + } + } +}