Index: DamClients/DamLive/trunk/src/Deltares.DamLive.Tests/XmlConversionHelperTests.cs =================================================================== diff -u -r5844 -r6263 --- DamClients/DamLive/trunk/src/Deltares.DamLive.Tests/XmlConversionHelperTests.cs (.../XmlConversionHelperTests.cs) (revision 5844) +++ DamClients/DamLive/trunk/src/Deltares.DamLive.Tests/XmlConversionHelperTests.cs (.../XmlConversionHelperTests.cs) (revision 6263) @@ -23,42 +23,43 @@ using Deltares.Dam.Data; using Deltares.DamLive.Io; using NUnit.Framework; +using StabilitySearchMethod = Deltares.DamLive.Io.StabilitySearchMethod; namespace Deltares.DamLive.Tests; [TestFixture] public class XmlConversionHelperTests { [Test] - [TestCase(StabilitySearchMethod.Grid, MStabSearchMethod.Grid)] - [TestCase(StabilitySearchMethod.BeeSwarm, MStabSearchMethod.BeeSwarm)] - public void CanConvertToDataSearchMethodType(StabilitySearchMethod xmlType, MStabSearchMethod dataType) + [TestCase(StabilitySearchMethod.Grid, Deltares.Dam.Data.StabilitySearchMethod.Grid)] + [TestCase(StabilitySearchMethod.BeeSwarm, Deltares.Dam.Data.StabilitySearchMethod.BeeSwarm)] + public void CanConvertToDataSearchMethodType(StabilitySearchMethod xmlType, Deltares.Dam.Data.StabilitySearchMethod dataType) { Assert.That(XmlConversionHelper.ConvertToSearchMethod(xmlType), Is.EqualTo(dataType)); } [Test] - [TestCase(MStabSearchMethod.Grid, StabilitySearchMethod.Grid)] - [TestCase(MStabSearchMethod.BeeSwarm, StabilitySearchMethod.BeeSwarm)] - public void CanConvertToXmlSearchMethodType(MStabSearchMethod dataType, StabilitySearchMethod xmlType) + [TestCase(Deltares.Dam.Data.StabilitySearchMethod.Grid, StabilitySearchMethod.Grid)] + [TestCase(Deltares.Dam.Data.StabilitySearchMethod.BeeSwarm, StabilitySearchMethod.BeeSwarm)] + public void CanConvertToXmlSearchMethodType(Deltares.Dam.Data.StabilitySearchMethod dataType, StabilitySearchMethod xmlType) { Assert.That(XmlConversionHelper.ConvertToSearchMethod(dataType), Is.EqualTo(xmlType)); } [Test] - [TestCase(StabilityCalculationModel.Bishop, MStabModelType.Bishop)] - [TestCase(StabilityCalculationModel.UpliftVan, MStabModelType.UpliftVan)] - [TestCase(StabilityCalculationModel.BishopUpliftVan, MStabModelType.BishopUpliftVan)] - public void CanConvertToDataModelType(StabilityCalculationModel xmlType, MStabModelType dataType) + [TestCase(StabilityCalculationModel.Bishop, StabilityModelType.Bishop)] + [TestCase(StabilityCalculationModel.UpliftVan, StabilityModelType.UpliftVan)] + [TestCase(StabilityCalculationModel.BishopUpliftVan, StabilityModelType.BishopUpliftVan)] + public void CanConvertToDataModelType(StabilityCalculationModel xmlType, StabilityModelType dataType) { Assert.That(XmlConversionHelper.ConvertToModelType(xmlType), Is.EqualTo(dataType)); } [Test] - [TestCase( MStabModelType.Bishop, StabilityCalculationModel.Bishop)] - [TestCase( MStabModelType.UpliftVan, StabilityCalculationModel.UpliftVan)] - [TestCase( MStabModelType.BishopUpliftVan, StabilityCalculationModel.BishopUpliftVan)] - public void CanConvertToXmlModelType(MStabModelType dataType, StabilityCalculationModel xmlType) + [TestCase( StabilityModelType.Bishop, StabilityCalculationModel.Bishop)] + [TestCase( StabilityModelType.UpliftVan, StabilityCalculationModel.UpliftVan)] + [TestCase( StabilityModelType.BishopUpliftVan, StabilityCalculationModel.BishopUpliftVan)] + public void CanConvertToXmlModelType(StabilityModelType dataType, StabilityCalculationModel xmlType) { Assert.That(XmlConversionHelper.ConvertToModelType(dataType), Is.EqualTo(xmlType)); } Index: DamClients/DamLive/trunk/src/Deltares.DamLive.Application/XmlConversionHelper.cs =================================================================== diff -u -r5844 -r6263 --- DamClients/DamLive/trunk/src/Deltares.DamLive.Application/XmlConversionHelper.cs (.../XmlConversionHelper.cs) (revision 5844) +++ DamClients/DamLive/trunk/src/Deltares.DamLive.Application/XmlConversionHelper.cs (.../XmlConversionHelper.cs) (revision 6263) @@ -27,63 +27,63 @@ public static class XmlConversionHelper { - public static MStabModelType ConvertToModelType(StabilityCalculationModel model) + public static StabilityModelType ConvertToModelType(StabilityCalculationModel model) { - var translationTable = new Dictionary + var translationTable = new Dictionary { { - StabilityCalculationModel.Bishop, MStabModelType.Bishop + StabilityCalculationModel.Bishop, StabilityModelType.Bishop }, { - StabilityCalculationModel.UpliftVan, MStabModelType.UpliftVan + StabilityCalculationModel.UpliftVan, StabilityModelType.UpliftVan }, { - StabilityCalculationModel.BishopUpliftVan, MStabModelType.BishopUpliftVan + StabilityCalculationModel.BishopUpliftVan, StabilityModelType.BishopUpliftVan } }; return translationTable[model]; } - public static StabilityCalculationModel ConvertToModelType(MStabModelType model) + public static StabilityCalculationModel ConvertToModelType(StabilityModelType model) { - var translationTable = new Dictionary + var translationTable = new Dictionary { { - MStabModelType.Bishop, StabilityCalculationModel.Bishop + StabilityModelType.Bishop, StabilityCalculationModel.Bishop }, { - MStabModelType.UpliftVan, StabilityCalculationModel.UpliftVan + StabilityModelType.UpliftVan, StabilityCalculationModel.UpliftVan }, { - MStabModelType.BishopUpliftVan, StabilityCalculationModel.BishopUpliftVan + StabilityModelType.BishopUpliftVan, StabilityCalculationModel.BishopUpliftVan } }; return translationTable[model]; } - public static MStabSearchMethod ConvertToSearchMethod(StabilitySearchMethod model) + public static Deltares.Dam.Data.StabilitySearchMethod ConvertToSearchMethod(Io.StabilitySearchMethod model) { - var translationTable = new Dictionary + var translationTable = new Dictionary { { - StabilitySearchMethod.Grid, MStabSearchMethod.Grid + Io.StabilitySearchMethod.Grid, Dam.Data.StabilitySearchMethod.Grid }, { - StabilitySearchMethod.BeeSwarm, MStabSearchMethod.BeeSwarm + Io.StabilitySearchMethod.BeeSwarm, Dam.Data.StabilitySearchMethod.BeeSwarm } }; return translationTable[model]; } - public static StabilitySearchMethod ConvertToSearchMethod(MStabSearchMethod model) + public static Io.StabilitySearchMethod ConvertToSearchMethod(Deltares.Dam.Data.StabilitySearchMethod model) { - var translationTable = new Dictionary + var translationTable = new Dictionary { { - MStabSearchMethod.Grid, StabilitySearchMethod.Grid + Dam.Data.StabilitySearchMethod.Grid, Io.StabilitySearchMethod.Grid }, { - MStabSearchMethod.BeeSwarm, StabilitySearchMethod.BeeSwarm + Dam.Data.StabilitySearchMethod.BeeSwarm, Io.StabilitySearchMethod.BeeSwarm } }; return translationTable[model]; Index: DamClients/DamLive/trunk/src/Deltares.DamLive.Tests/FillDomainFromXmlCalculationParametersTests.cs =================================================================== diff -u -r5844 -r6263 --- DamClients/DamLive/trunk/src/Deltares.DamLive.Tests/FillDomainFromXmlCalculationParametersTests.cs (.../FillDomainFromXmlCalculationParametersTests.cs) (revision 5844) +++ DamClients/DamLive/trunk/src/Deltares.DamLive.Tests/FillDomainFromXmlCalculationParametersTests.cs (.../FillDomainFromXmlCalculationParametersTests.cs) (revision 6263) @@ -25,6 +25,7 @@ using Deltares.DamLive.Data; using KellermanSoftware.CompareNetObjects; using NUnit.Framework; +using StabilitySearchMethod = Deltares.Dam.Data.StabilitySearchMethod; namespace Deltares.DamLive.Tests; @@ -34,10 +35,10 @@ [Test] [TestCase(FailureMechanismSystemType.Piping, PipingModelType.Bligh)] [TestCase(FailureMechanismSystemType.Piping, PipingModelType.Wti2017)] - [TestCase(FailureMechanismSystemType.StabilityOutside, PipingModelType.Bligh, MStabModelType.Bishop, MStabSearchMethod.Grid)] - [TestCase(FailureMechanismSystemType.StabilityInside, PipingModelType.Bligh, MStabModelType.UpliftVan, MStabSearchMethod.Grid)] - [TestCase(FailureMechanismSystemType.StabilityInside, PipingModelType.Bligh, MStabModelType.UpliftVan, MStabSearchMethod.BeeSwarm)] - public void CanWriteAndReadCalculationParametersDataToXml(FailureMechanismSystemType mechanismType, PipingModelType pipingModel = PipingModelType.Bligh, MStabModelType stabModel = MStabModelType.Bishop, MStabSearchMethod searchMethod = MStabSearchMethod.Grid) + [TestCase(FailureMechanismSystemType.StabilityOutside, PipingModelType.Bligh, StabilityModelType.Bishop, StabilitySearchMethod.Grid)] + [TestCase(FailureMechanismSystemType.StabilityInside, PipingModelType.Bligh, StabilityModelType.UpliftVan, StabilitySearchMethod.Grid)] + [TestCase(FailureMechanismSystemType.StabilityInside, PipingModelType.Bligh, StabilityModelType.UpliftVan, StabilitySearchMethod.BeeSwarm)] + public void CanWriteAndReadCalculationParametersDataToXml(FailureMechanismSystemType mechanismType, PipingModelType pipingModel = PipingModelType.Bligh, StabilityModelType stabModel = StabilityModelType.Bishop, StabilitySearchMethod searchMethod = StabilitySearchMethod.Grid) { const string filename = "CalculationParameters.xml"; CalculationParameters expectedData = CreateExampleCalculationParameters(mechanismType, pipingModel, stabModel, searchMethod); @@ -52,7 +53,7 @@ CompareCalculationParametersData(actualData, expectedData); } - private static CalculationParameters CreateExampleCalculationParameters(FailureMechanismSystemType mechanismType, PipingModelType pipingModel, MStabModelType stabModel, MStabSearchMethod searchMethod) + private static CalculationParameters CreateExampleCalculationParameters(FailureMechanismSystemType mechanismType, PipingModelType pipingModel, StabilityModelType stabModel, StabilitySearchMethod searchMethod) { var calculationModules = new CalculationModules {