Index: DamEngine/trunk/src/Deltares.DamEngine.Interface/FillDamFromXmlInput.cs =================================================================== diff -u -r4052 -r4373 --- DamEngine/trunk/src/Deltares.DamEngine.Interface/FillDamFromXmlInput.cs (.../FillDamFromXmlInput.cs) (revision 4052) +++ DamEngine/trunk/src/Deltares.DamEngine.Interface/FillDamFromXmlInput.cs (.../FillDamFromXmlInput.cs) (revision 4373) @@ -295,6 +295,11 @@ if (input.PipingModelTypeSpecified) { + if (input.PipingModelType == InputPipingModelType.Sellmeijer4Forces || + input.PipingModelType == InputPipingModelType.SellmeijerVnk) + { + throw new NotImplementedException(); + } calculationSpecification.PipingModelType = ConversionHelper.ConvertToPipingModelType(input.PipingModelType); } Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/GrebbedijkStabilityVNK.xml =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/GrebbedijkStabilityVNK.xml (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/GrebbedijkStabilityVNK.xml (revision 4373) @@ -0,0 +1,361 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/OperationalGrebbedijkTests.cs =================================================================== diff -u -r4358 -r4373 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/OperationalGrebbedijkTests.cs (.../OperationalGrebbedijkTests.cs) (revision 4358) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/OperationalGrebbedijkTests.cs (.../OperationalGrebbedijkTests.cs) (revision 4373) @@ -106,10 +106,12 @@ Assert.AreEqual(2.326, output.Results.OperationalOutputTimeSeries[1].Entries.TimeSerieEntry[1].Value, tolerance); } - [TestCase(PipingModelType.Sellmeijer4Forces)] - [TestCase(PipingModelType.SellmeijerVnk)] - public void Run_UsingTestFiles_ButWithUnsupportedPipingModelFails(PipingModelType pipingModel) + [TestCase(1)] + [TestCase(2)] + public void Run_UsingTestFiles_ButWithUnsupportedPipingModelFails(int oldPipingModel) { + // testcase 1 = old model PipingModelType.Sellmeijer4Forces + // testcase 2 = old model PipingModelType.SellmeijerVnk const string calcDir = "TestOperationalGrebbedijk"; const string localWorkingDir = @".\"; const string baseTestDirectory = @".\"; @@ -121,20 +123,23 @@ Directory.CreateDirectory(calcDir); // Switch to TestFiles directory to check if DamLive can also run from another directory string oldLocalWorkingDir = Directory.GetCurrentDirectory(); - Directory.SetCurrentDirectory(localWorkingDir); - // Based on "DamLive\trunk\src\Deltares.DamLive.Tests\TestData\DamLive\Set2\\output.damx" - const string inputFileName = baseTestDirectory + @"GrebbedijkStability.xml"; - string inputString = File.ReadAllText(inputFileName); - inputString = XmlAdapter.ChangeValueInXml(inputString, "ProjectPath", ""); // Current directory will be used - inputString = XmlAdapter.ChangeValueInXml(inputString, "CalculationMap", calcDir); // Current directory will be used - inputString = XmlAdapter.ChangeValueInXml(inputString, "MapForSoilgeometries2D", baseTestDirectory + @"Operational\Grebbedijk\input.Geometries\"); - inputString = XmlAdapter.ChangeValueInXml(inputString, "SoilDatabaseName", baseTestDirectory + @"Operational\Grebbedijk\input0.soilmaterials.mdb"); - var engineInterface = new EngineInterface(inputString); - Assert.IsNotNull(engineInterface.DamProjectData); - engineInterface.DamProjectData.DamProjectCalculationSpecification.CurrentSpecification.FailureMechanismSystemType = FailureMechanismSystemType.Piping; - engineInterface.DamProjectData.DamProjectCalculationSpecification.CurrentSpecification.PipingModelType = pipingModel; - Assert.That(() => engineInterface.Run(), Throws.TypeOf(typeof(NotImplementedException)).With.Message.EqualTo("The method or operation is not implemented.")); - Directory.SetCurrentDirectory(oldLocalWorkingDir); + try + { + Directory.SetCurrentDirectory(localWorkingDir); + // Based on "DamLive\trunk\src\Deltares.DamLive.Tests\TestData\DamLive\Set2\\output.damx", assume 4Forces + string inputFileName = baseTestDirectory + @"GrebbedijkStability4Forces.xml"; + if (oldPipingModel == 2) + { + inputFileName = baseTestDirectory + @"GrebbedijkStabilityVNK.xml"; + } + string inputString = File.ReadAllText(inputFileName); + Assert.That(() => new EngineInterface(inputString), + Throws.TypeOf(typeof(NotImplementedException)).With.Message.EqualTo("The method or operation is not implemented.")); + } + finally + { + Directory.SetCurrentDirectory(oldLocalWorkingDir); + } } [TestCase(PipingModelType.Wti2017)] Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/GrebbedijkStability4Forces.xml =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/GrebbedijkStability4Forces.xml (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/GrebbedijkStability4Forces.xml (revision 4373) @@ -0,0 +1,361 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Interface/ConversionHelper.cs =================================================================== diff -u -r4358 -r4373 --- DamEngine/trunk/src/Deltares.DamEngine.Interface/ConversionHelper.cs (.../ConversionHelper.cs) (revision 4358) +++ DamEngine/trunk/src/Deltares.DamEngine.Interface/ConversionHelper.cs (.../ConversionHelper.cs) (revision 4373) @@ -783,12 +783,6 @@ PipingModelType.Bligh, InputPipingModelType.Bligh }, { - PipingModelType.SellmeijerVnk, InputPipingModelType.SellmeijerVnk - }, - { - PipingModelType.Sellmeijer4Forces, InputPipingModelType.Sellmeijer4Forces - }, - { PipingModelType.Wti2017, InputPipingModelType.WtiSellmeijerRevised } }; @@ -808,12 +802,6 @@ InputPipingModelType.Bligh, PipingModelType.Bligh }, { - InputPipingModelType.SellmeijerVnk, PipingModelType.SellmeijerVnk - }, - { - InputPipingModelType.Sellmeijer4Forces, PipingModelType.Sellmeijer4Forces - }, - { InputPipingModelType.WtiSellmeijerRevised, PipingModelType.Wti2017 } }; Index: DamEngine/trunk/src/Deltares.DamEngine.Data/General/PipingEnumerations.cs =================================================================== diff -u -r4052 -r4373 --- DamEngine/trunk/src/Deltares.DamEngine.Data/General/PipingEnumerations.cs (.../PipingEnumerations.cs) (revision 4052) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/General/PipingEnumerations.cs (.../PipingEnumerations.cs) (revision 4373) @@ -27,7 +27,5 @@ public enum PipingModelType { Bligh, - SellmeijerVnk, - Sellmeijer4Forces, Wti2017 } \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/ConversionHelperTests.cs =================================================================== diff -u -r4358 -r4373 --- DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/ConversionHelperTests.cs (.../ConversionHelperTests.cs) (revision 4358) +++ DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/ConversionHelperTests.cs (.../ConversionHelperTests.cs) (revision 4373) @@ -459,8 +459,6 @@ [Test] [TestCase(PipingModelType.Bligh, InputPipingModelType.Bligh)] - [TestCase(PipingModelType.SellmeijerVnk, InputPipingModelType.SellmeijerVnk)] - [TestCase(PipingModelType.Sellmeijer4Forces, InputPipingModelType.Sellmeijer4Forces)] [TestCase(PipingModelType.Wti2017, InputPipingModelType.WtiSellmeijerRevised)] public void CanConvertToInputPipingModelType(PipingModelType pipingModelType, InputPipingModelType inputPipingModelType) { @@ -469,8 +467,6 @@ [Test] [TestCase(InputPipingModelType.Bligh, PipingModelType.Bligh)] - [TestCase(InputPipingModelType.SellmeijerVnk, PipingModelType.SellmeijerVnk)] - [TestCase(InputPipingModelType.Sellmeijer4Forces, PipingModelType.Sellmeijer4Forces)] [TestCase(InputPipingModelType.WtiSellmeijerRevised, PipingModelType.Wti2017)] public void CanConvertToPipingModelType(InputPipingModelType inputPipingModelType, PipingModelType pipingModelType) {