Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/OperationalStabilityProfile1DTests.cs =================================================================== diff -u -r5916 -r5939 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/OperationalStabilityProfile1DTests.cs (.../OperationalStabilityProfile1DTests.cs) (revision 5916) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/OperationalStabilityProfile1DTests.cs (.../OperationalStabilityProfile1DTests.cs) (revision 5939) @@ -22,9 +22,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using Deltares.DamEngine.Data.General; using Deltares.DamEngine.Data.Standard; -using Deltares.DamEngine.Interface; using Deltares.DamEngine.Io; using Deltares.DamEngine.Io.XmlOutput; using Deltares.DamEngine.TestHelpers; @@ -137,39 +135,4 @@ ComparisonResult result = compare.Compare(expected, actual); Assert.That(result.Differences, Is.Empty, "Differences found read/write Output object"); } - - [TestCase(PipingModelType.Wti2017)] - [TestCase(PipingModelType.Bligh)] - public void Run_UsingTestFiles_ButWithSupportedPipingModelFailsBecauseNoRelevantSegments(PipingModelType pipingModel) - { - const string calcDir = "TestOperationalPipingFailsNoRelevantSegments"; - if (Directory.Exists(calcDir)) - { - Directory.Delete(calcDir, true); // delete previous results - } - - Directory.CreateDirectory(calcDir); - const string inputFileName = @".\TestFiles\Operational\Profile1DTests\CalculateStabilityInsideBishopGrid1InputFile.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 - var engineInterface = new EngineInterface(inputString); - Assert.That(engineInterface.DamProjectData, Is.Not.Null); - engineInterface.DamProjectData.DamProjectCalculationSpecification.CurrentSpecification.FailureMechanismSystemType = FailureMechanismSystemType.Piping; - engineInterface.DamProjectData.DamProjectCalculationSpecification.CurrentSpecification.PipingModelType = pipingModel; - - Output output = GeneralHelper.RunAfterInputValidation(engineInterface, false); - - Assert.That(output.Results.CalculationMessages, Has.Length.EqualTo(2)); - Assert.Multiple(() => - { - Assert.That(output.Results.CalculationMessages[0].MessageType, Is.EqualTo(MessageMessageType.Info)); - Assert.That(output.Results.CalculationMessages[0].Message1, Is.EqualTo("There are 8 locations with sensor data")); - Assert.That(output.Results.CalculationMessages[1].MessageType, Is.EqualTo(MessageMessageType.Error)); - Assert.That(output.Results.CalculationMessages[1].Message1, Is.EqualTo("No segments with failure mechanism Piping present")); - }); - } - - } \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/OperationalCombinationTests.cs =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/OperationalCombinationTests.cs (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/OperationalCombinationTests.cs (revision 5939) @@ -0,0 +1,65 @@ +// Copyright (C) Stichting Deltares 2024. 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 Deltares.DamEngine.Data.General; +using Deltares.DamEngine.Interface; +using Deltares.DamEngine.Io.XmlOutput; +using Deltares.DamEngine.TestHelpers; +using NUnit.Framework; + +namespace Deltares.DamEngine.IntegrationTests.IntegrationTests; + +public class OperationalCombinationTests +{ + [TestCase(PipingModelType.Wti2017)] + [TestCase(PipingModelType.Bligh)] + public void Run_UsingTestFiles_WithPipingModelFailsBecauseNoRelevantSegments(PipingModelType pipingModel) + { + const string calcDir = "TestOperationalPipingFailsNoRelevantSegments"; + if (Directory.Exists(calcDir)) + { + Directory.Delete(calcDir, true); // delete previous results + } + + Directory.CreateDirectory(calcDir); + const string inputFileName = @".\TestFiles\Operational\Profile1DTests\CalculateStabilityInsideBishopGrid1InputFile.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 + var engineInterface = new EngineInterface(inputString); + Assert.That(engineInterface.DamProjectData, Is.Not.Null); + engineInterface.DamProjectData.DamProjectCalculationSpecification.CurrentSpecification.FailureMechanismSystemType = FailureMechanismSystemType.Piping; + engineInterface.DamProjectData.DamProjectCalculationSpecification.CurrentSpecification.PipingModelType = pipingModel; + + Output output = GeneralHelper.RunAfterInputValidation(engineInterface, false); + + Assert.That(output.Results.CalculationMessages, Has.Length.EqualTo(2)); + Assert.Multiple(() => + { + Assert.That(output.Results.CalculationMessages[0].MessageType, Is.EqualTo(MessageMessageType.Info)); + Assert.That(output.Results.CalculationMessages[0].Message1, Is.EqualTo("There are 8 locations with sensor data")); + Assert.That(output.Results.CalculationMessages[1].MessageType, Is.EqualTo(MessageMessageType.Error)); + Assert.That(output.Results.CalculationMessages[1].Message1, Is.EqualTo("No segments with failure mechanism Piping present")); + }); + } +}