Index: Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationActivity.cs
===================================================================
diff -u -rc78a5b1d66fba1148ab5880357ce3c20a042c9ed -r248229db928c9e5556be704ed274226f80b4ef19
--- Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationActivity.cs (.../DesignWaterLevelCalculationActivity.cs) (revision c78a5b1d66fba1148ab5880357ce3c20a042c9ed)
+++ Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationActivity.cs (.../DesignWaterLevelCalculationActivity.cs) (revision 248229db928c9e5556be704ed274226f80b4ef19)
@@ -87,9 +87,11 @@
PerformRun(() => DesignWaterLevelCalculationService.Instance.Validate(
messageProvider.GetCalculationName(hydraulicBoundaryLocation.Name), hydraulicBoundaryDatabaseFilePath),
() => hydraulicBoundaryLocation.DesignWaterLevel = (RoundedDouble) double.NaN,
- () => DesignWaterLevelCalculationService.Instance.Calculate(
- messageProvider, hydraulicBoundaryLocation, hydraulicBoundaryDatabaseFilePath,
- ringId, norm));
+ () => DesignWaterLevelCalculationService.Instance.Calculate(hydraulicBoundaryLocation,
+ hydraulicBoundaryDatabaseFilePath,
+ ringId,
+ norm,
+ messageProvider));
}
protected override void OnFinish()
Index: Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationService.cs
===================================================================
diff -u -r03b153b8f94dc5ff3619bdd52c79394a0d7fde85 -r248229db928c9e5556be704ed274226f80b4ef19
--- Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationService.cs (.../DesignWaterLevelCalculationService.cs) (revision 03b153b8f94dc5ff3619bdd52c79394a0d7fde85)
+++ Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationService.cs (.../DesignWaterLevelCalculationService.cs) (revision 248229db928c9e5556be704ed274226f80b4ef19)
@@ -19,32 +19,24 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
-using System.IO;
using log4net;
-using Ringtoets.Common.Service.MessageProviders;
-using Ringtoets.Common.Service.Properties;
-using Ringtoets.HydraRing.Calculation.Data;
using Ringtoets.HydraRing.Calculation.Data.Input.Hydraulics;
-using Ringtoets.HydraRing.Calculation.Data.Output;
-using Ringtoets.HydraRing.Calculation.Parsers;
-using Ringtoets.HydraRing.Calculation.Services;
using Ringtoets.HydraRing.Data;
-using Ringtoets.HydraRing.IO;
namespace Ringtoets.Common.Service
{
///
/// Service that provides methods for performing Hydra-Ring calculations for design water level.
///
- public class DesignWaterLevelCalculationService : IDesignWaterLevelCalculationService
+ public class DesignWaterLevelCalculationService : HydraulicBoundaryLocationCalculationService
{
private static readonly ILog log = LogManager.GetLogger(typeof(DesignWaterLevelCalculationService));
- private static IDesignWaterLevelCalculationService instance;
+ private static IHydraulicBoundaryLocationCalculationService instance;
///
- /// Gets or sets an instance of .
+ /// Gets or sets an instance of .
///
- public static IDesignWaterLevelCalculationService Instance
+ public static IHydraulicBoundaryLocationCalculationService Instance
{
get
{
@@ -56,64 +48,8 @@
}
}
- public bool Validate(string name, string hydraulicBoundaryDatabaseFilePath)
+ protected override AssessmentLevelCalculationInput CreateInput(IHydraulicBoundaryLocation hydraulicBoundaryLocation, double norm)
{
- CalculationServiceHelper.LogValidationBeginTime(name);
-
- string validationProblem = HydraulicDatabaseHelper.ValidatePathForCalculation(hydraulicBoundaryDatabaseFilePath);
- var isValid = string.IsNullOrEmpty(validationProblem);
-
- if (!isValid)
- {
- CalculationServiceHelper.LogMessagesAsError(Resources.Hydraulic_boundary_database_connection_failed_0_,
- validationProblem);
- }
-
- CalculationServiceHelper.LogValidationEndTime(name);
-
- return isValid;
- }
-
- public ReliabilityIndexCalculationOutput Calculate(ICalculationMessageProvider messageProvider,
- IHydraulicBoundaryLocation hydraulicBoundaryLocation,
- string hydraulicBoundaryDatabaseFilePath,
- string ringId, double norm)
- {
- var hlcdDirectory = Path.GetDirectoryName(hydraulicBoundaryDatabaseFilePath);
- var input = CreateInput(hydraulicBoundaryLocation, norm);
- var reliabilityIndexCalculationParser = new ReliabilityIndexCalculationParser();
- var calculationName = messageProvider.GetCalculationName(hydraulicBoundaryLocation.Name);
-
- CalculationServiceHelper.PerformCalculation(
- calculationName,
- () =>
- {
- HydraRingCalculationService.Instance.PerformCalculation(
- hlcdDirectory,
- ringId,
- HydraRingUncertaintiesType.All,
- input,
- new[]
- {
- reliabilityIndexCalculationParser
- });
-
- VerifyOutput(reliabilityIndexCalculationParser.Output, messageProvider, hydraulicBoundaryLocation.Name);
- });
-
- return reliabilityIndexCalculationParser.Output;
- }
-
- private static void VerifyOutput(ReliabilityIndexCalculationOutput output, ICalculationMessageProvider messageProvider, string locationName)
- {
- if (output == null)
- {
- log.Error(messageProvider.GetCalculationFailedMessage(locationName));
- }
- }
-
- private static AssessmentLevelCalculationInput CreateInput(IHydraulicBoundaryLocation hydraulicBoundaryLocation, double norm)
- {
return new AssessmentLevelCalculationInput(1, hydraulicBoundaryLocation.Id, norm);
}
}
Index: Ringtoets/Common/src/Ringtoets.Common.Service/HydraulicBoundaryLocationCalculationService.cs
===================================================================
diff -u -rb13d0991492d2a0a463ad76af5557e10787709d2 -r248229db928c9e5556be704ed274226f80b4ef19
--- Ringtoets/Common/src/Ringtoets.Common.Service/HydraulicBoundaryLocationCalculationService.cs (.../HydraulicBoundaryLocationCalculationService.cs) (revision b13d0991492d2a0a463ad76af5557e10787709d2)
+++ Ringtoets/Common/src/Ringtoets.Common.Service/HydraulicBoundaryLocationCalculationService.cs (.../HydraulicBoundaryLocationCalculationService.cs) (revision 248229db928c9e5556be704ed274226f80b4ef19)
@@ -33,6 +33,10 @@
namespace Ringtoets.Common.Service
{
+ ///
+ /// Abstract service that provides methods for performing Hydra-Ring calculations for hydraulic boundary locations.
+ ///
+ /// The input type of the calculation.
public abstract class HydraulicBoundaryLocationCalculationService : IHydraulicBoundaryLocationCalculationService
where T : HydraRingCalculationInput
{
@@ -91,6 +95,12 @@
}
}
+ ///
+ /// Creates the input for the calculation.
+ ///
+ /// The hydraulic boundary location to create the input for.
+ /// The norm which is needed in the input.
+ /// The created Input.
protected abstract T CreateInput(IHydraulicBoundaryLocation hydraulicBoundaryLocation, double norm);
}
}
\ No newline at end of file
Fisheye: Tag 248229db928c9e5556be704ed274226f80b4ef19 refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.Service/IDesignWaterLevelCalculationService.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 248229db928c9e5556be704ed274226f80b4ef19 refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.Service/IWaveHeightCalculationService.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Common/src/Ringtoets.Common.Service/Ringtoets.Common.Service.csproj
===================================================================
diff -u -rb13d0991492d2a0a463ad76af5557e10787709d2 -r248229db928c9e5556be704ed274226f80b4ef19
--- Ringtoets/Common/src/Ringtoets.Common.Service/Ringtoets.Common.Service.csproj (.../Ringtoets.Common.Service.csproj) (revision b13d0991492d2a0a463ad76af5557e10787709d2)
+++ Ringtoets/Common/src/Ringtoets.Common.Service/Ringtoets.Common.Service.csproj (.../Ringtoets.Common.Service.csproj) (revision 248229db928c9e5556be704ed274226f80b4ef19)
@@ -53,8 +53,6 @@
-
-
Index: Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationService.cs
===================================================================
diff -u -ra97c4ffe5254af061462539883d25722be13e539 -r248229db928c9e5556be704ed274226f80b4ef19
--- Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationService.cs (.../WaveHeightCalculationService.cs) (revision a97c4ffe5254af061462539883d25722be13e539)
+++ Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationService.cs (.../WaveHeightCalculationService.cs) (revision 248229db928c9e5556be704ed274226f80b4ef19)
@@ -19,32 +19,24 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
-using System.IO;
using log4net;
-using Ringtoets.Common.Service.MessageProviders;
-using Ringtoets.Common.Service.Properties;
-using Ringtoets.HydraRing.Calculation.Data;
using Ringtoets.HydraRing.Calculation.Data.Input.Hydraulics;
-using Ringtoets.HydraRing.Calculation.Data.Output;
-using Ringtoets.HydraRing.Calculation.Parsers;
-using Ringtoets.HydraRing.Calculation.Services;
using Ringtoets.HydraRing.Data;
-using Ringtoets.HydraRing.IO;
namespace Ringtoets.Common.Service
{
///
/// Service that provides methods for performing Hydra-Ring calculations for marginal wave statistics.
///
- public class WaveHeightCalculationService : IWaveHeightCalculationService
+ public class WaveHeightCalculationService : HydraulicBoundaryLocationCalculationService
{
private static readonly ILog log = LogManager.GetLogger(typeof(WaveHeightCalculationService));
- private static IWaveHeightCalculationService instance;
+ private static IHydraulicBoundaryLocationCalculationService instance;
///
- /// Gets or sets an instance of .
+ /// Gets or sets an instance of .
///
- public static IWaveHeightCalculationService Instance
+ public static IHydraulicBoundaryLocationCalculationService Instance
{
get
{
@@ -56,65 +48,8 @@
}
}
- public bool Validate(string name, string hydraulicBoundaryDatabaseFilePath)
+ protected override WaveHeightCalculationInput CreateInput(IHydraulicBoundaryLocation hydraulicBoundaryLocation, double norm)
{
- CalculationServiceHelper.LogValidationBeginTime(name);
-
- string validationProblem = HydraulicDatabaseHelper.ValidatePathForCalculation(hydraulicBoundaryDatabaseFilePath);
- var isValid = string.IsNullOrEmpty(validationProblem);
-
- if (!isValid)
- {
- CalculationServiceHelper.LogMessagesAsError(Resources.Hydraulic_boundary_database_connection_failed_0_,
- validationProblem);
- }
-
- CalculationServiceHelper.LogValidationEndTime(name);
-
- return isValid;
- }
-
- public ReliabilityIndexCalculationOutput Calculate(IHydraulicBoundaryLocation hydraulicBoundaryLocation,
- string hydraulicBoundaryDatabaseFilePath,
- string ringId,
- double norm,
- ICalculationMessageProvider messageProvider)
- {
- var hlcdDirectory = Path.GetDirectoryName(hydraulicBoundaryDatabaseFilePath);
- var input = CreateInput(hydraulicBoundaryLocation, norm);
- var reliabilityIndexCalculationParser = new ReliabilityIndexCalculationParser();
- var calculationName = messageProvider.GetCalculationName(hydraulicBoundaryLocation.Name);
-
- CalculationServiceHelper.PerformCalculation(
- calculationName,
- () =>
- {
- HydraRingCalculationService.Instance.PerformCalculation(
- hlcdDirectory,
- ringId,
- HydraRingUncertaintiesType.All,
- input,
- new[]
- {
- reliabilityIndexCalculationParser
- });
-
- VerifyOutput(reliabilityIndexCalculationParser.Output, messageProvider, hydraulicBoundaryLocation.Name);
- });
-
- return reliabilityIndexCalculationParser.Output;
- }
-
- private static void VerifyOutput(ReliabilityIndexCalculationOutput output, ICalculationMessageProvider messageProvider, string locationName)
- {
- if (output == null)
- {
- log.Error(messageProvider.GetCalculationFailedMessage(locationName));
- }
- }
-
- private static WaveHeightCalculationInput CreateInput(IHydraulicBoundaryLocation hydraulicBoundaryLocation, double norm)
- {
return new WaveHeightCalculationInput(1, hydraulicBoundaryLocation.Id, norm);
}
}
Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationActivityTest.cs
===================================================================
diff -u -rbb32237c29a9f16a3d7e65c1baf833f5fb0c1988 -r248229db928c9e5556be704ed274226f80b4ef19
--- Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationActivityTest.cs (.../DesignWaterLevelCalculationActivityTest.cs) (revision bb32237c29a9f16a3d7e65c1baf833f5fb0c1988)
+++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationActivityTest.cs (.../DesignWaterLevelCalculationActivityTest.cs) (revision 248229db928c9e5556be704ed274226f80b4ef19)
@@ -173,7 +173,7 @@
using (new DesignWaterLevelCalculationServiceConfig())
{
- var testService = (TestDesignWaterLevelCalculationService) DesignWaterLevelCalculationService.Instance;
+ var testService = (TestHydraulicBoundaryLocationCalculationService) DesignWaterLevelCalculationService.Instance;
// Call
activity.Run();
@@ -275,8 +275,8 @@
using (new DesignWaterLevelCalculationServiceConfig())
{
- var testService = (TestDesignWaterLevelCalculationService) DesignWaterLevelCalculationService.Instance;
- testService.SetCalculationConvergenceOutput = CalculationConvergence.NotCalculated;
+ var testService = (TestHydraulicBoundaryLocationCalculationService) DesignWaterLevelCalculationService.Instance;
+ testService.CalculationConvergenceOutput = CalculationConvergence.NotCalculated;
activity.Run();
}
@@ -316,8 +316,8 @@
using (new DesignWaterLevelCalculationServiceConfig())
{
- var testService = (TestDesignWaterLevelCalculationService) DesignWaterLevelCalculationService.Instance;
- testService.SetCalculationConvergenceOutput = CalculationConvergence.CalculatedNotConverged;
+ var testService = (TestHydraulicBoundaryLocationCalculationService) DesignWaterLevelCalculationService.Instance;
+ testService.CalculationConvergenceOutput = CalculationConvergence.CalculatedNotConverged;
activity.Run();
}
Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationServiceTest.cs
===================================================================
diff -u -rc78a5b1d66fba1148ab5880357ce3c20a042c9ed -r248229db928c9e5556be704ed274226f80b4ef19
--- Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationServiceTest.cs (.../DesignWaterLevelCalculationServiceTest.cs) (revision c78a5b1d66fba1148ab5880357ce3c20a042c9ed)
+++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationServiceTest.cs (.../DesignWaterLevelCalculationServiceTest.cs) (revision 248229db928c9e5556be704ed274226f80b4ef19)
@@ -45,6 +45,16 @@
private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Integration.Service, "HydraRingCalculation");
[Test]
+ public void Constructor_ExpectedValues()
+ {
+ // Call
+ var service = new DesignWaterLevelCalculationService();
+
+ // Assert
+ Assert.IsInstanceOf>(service);
+ }
+
+ [Test]
public void Validate_ValidHydraulicBoundaryDatabasePath_ReturnsTrue()
{
// Setup
@@ -117,9 +127,11 @@
var testService = (TestHydraRingCalculationService) HydraRingCalculationService.Instance;
// Call
- DesignWaterLevelCalculationService.Instance.Calculate(calculationMessageProviderMock,
- hydraulicBoundaryLocationMock,
- validFilePath, ringId, norm);
+ DesignWaterLevelCalculationService.Instance.Calculate(hydraulicBoundaryLocationMock,
+ validFilePath,
+ ringId,
+ norm,
+ calculationMessageProviderMock);
// Assert
Assert.AreEqual(testDataPath, testService.HlcdDirectory);
@@ -161,9 +173,11 @@
using (new HydraRingCalculationServiceConfig())
{
// Call
- Action call = () => output = DesignWaterLevelCalculationService.Instance.Calculate(calculationMessageProviderMock,
- hydraulicBoundaryLocationMock,
- validFilePath, ringId, norm);
+ Action call = () => output = DesignWaterLevelCalculationService.Instance.Calculate(hydraulicBoundaryLocationMock,
+ validFilePath,
+ ringId,
+ norm,
+ calculationMessageProviderMock);
// Assert
TestHelper.AssertLogMessages(call, messages =>
Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/WaveHeightCalculationActivityTest.cs
===================================================================
diff -u -ra97c4ffe5254af061462539883d25722be13e539 -r248229db928c9e5556be704ed274226f80b4ef19
--- Ringtoets/Common/test/Ringtoets.Common.Service.Test/WaveHeightCalculationActivityTest.cs (.../WaveHeightCalculationActivityTest.cs) (revision a97c4ffe5254af061462539883d25722be13e539)
+++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/WaveHeightCalculationActivityTest.cs (.../WaveHeightCalculationActivityTest.cs) (revision 248229db928c9e5556be704ed274226f80b4ef19)
@@ -170,7 +170,7 @@
using (new WaveHeightCalculationServiceConfig())
{
- var testService = (TestWaveHeightCalculationService) WaveHeightCalculationService.Instance;
+ var testService = (TestHydraulicBoundaryLocationCalculationService) WaveHeightCalculationService.Instance;
// Call
activity.Run();
@@ -270,7 +270,7 @@
using (new WaveHeightCalculationServiceConfig())
{
- var testService = (TestWaveHeightCalculationService) WaveHeightCalculationService.Instance;
+ var testService = (TestHydraulicBoundaryLocationCalculationService) WaveHeightCalculationService.Instance;
testService.CalculationConvergenceOutput = CalculationConvergence.NotCalculated;
activity.Run();
@@ -314,7 +314,7 @@
using (new WaveHeightCalculationServiceConfig())
{
- var testService = (TestWaveHeightCalculationService) WaveHeightCalculationService.Instance;
+ var testService = (TestHydraulicBoundaryLocationCalculationService) WaveHeightCalculationService.Instance;
testService.CalculationConvergenceOutput = CalculationConvergence.CalculatedNotConverged;
activity.Run();
}
Index: Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/DesignWaterLevelCalculationServiceConfigTest.cs
===================================================================
diff -u -rc6176d50a690c3ff5ee1c4b2902dcabc2e270201 -r248229db928c9e5556be704ed274226f80b4ef19
--- Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/DesignWaterLevelCalculationServiceConfigTest.cs (.../DesignWaterLevelCalculationServiceConfigTest.cs) (revision c6176d50a690c3ff5ee1c4b2902dcabc2e270201)
+++ Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/DesignWaterLevelCalculationServiceConfigTest.cs (.../DesignWaterLevelCalculationServiceConfigTest.cs) (revision 248229db928c9e5556be704ed274226f80b4ef19)
@@ -45,7 +45,7 @@
using (new DesignWaterLevelCalculationServiceConfig())
{
// Assert
- Assert.IsInstanceOf(DesignWaterLevelCalculationService.Instance);
+ Assert.IsInstanceOf(DesignWaterLevelCalculationService.Instance);
}
}
Index: Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/Ringtoets.Common.Service.TestUtil.Test.csproj
===================================================================
diff -u -r1e533850c7711172462df1e8f569b9f3ff950045 -r248229db928c9e5556be704ed274226f80b4ef19
--- Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/Ringtoets.Common.Service.TestUtil.Test.csproj (.../Ringtoets.Common.Service.TestUtil.Test.csproj) (revision 1e533850c7711172462df1e8f569b9f3ff950045)
+++ Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/Ringtoets.Common.Service.TestUtil.Test.csproj (.../Ringtoets.Common.Service.TestUtil.Test.csproj) (revision 248229db928c9e5556be704ed274226f80b4ef19)
@@ -56,7 +56,7 @@
-
+
Fisheye: Tag 248229db928c9e5556be704ed274226f80b4ef19 refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/TestDesignWaterLevelCalculationServiceTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/TestHydraulicBoundaryLocationCalculationServiceTest.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/TestHydraulicBoundaryLocationCalculationServiceTest.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/TestHydraulicBoundaryLocationCalculationServiceTest.cs (revision 248229db928c9e5556be704ed274226f80b4ef19)
@@ -0,0 +1,198 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU 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 General Public License for more details.
+//
+// You should have received a copy of the GNU 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 Core.Common.Utils;
+using NUnit.Framework;
+using Rhino.Mocks;
+using Ringtoets.Common.Service.MessageProviders;
+using Ringtoets.HydraRing.Calculation.Data.Output;
+using Ringtoets.HydraRing.Data;
+
+namespace Ringtoets.Common.Service.TestUtil.Test
+{
+ [TestFixture]
+ public class TestHydraulicBoundaryLocationCalculationServiceTest
+ {
+ [Test]
+ public void Validate_Always_ReturnTrue()
+ {
+ // Setup
+ var service = new TestHydraulicBoundaryLocationCalculationService();
+
+ // Call
+ bool validated = service.Validate(string.Empty, string.Empty);
+
+ // Assert
+ Assert.IsTrue(validated);
+ }
+
+ [Test]
+ public void Calculate_Always_SetsInputParameters()
+ {
+ // Setup
+ const double norm = 12.34;
+ const string filePath = "C:/temp";
+ const string ringId = "11-1";
+
+ var mockRepository = new MockRepository();
+ var calculationMessageProviderMock = mockRepository.StrictMock();
+ var hydraulicBoundaryLocationMock = mockRepository.StrictMock();
+
+ mockRepository.ReplayAll();
+ var service = new TestHydraulicBoundaryLocationCalculationService();
+
+ // Call
+ service.Calculate(hydraulicBoundaryLocationMock,
+ filePath,
+ ringId,
+ norm,
+ calculationMessageProviderMock);
+
+ // Assert
+ Assert.AreSame(calculationMessageProviderMock, service.MessageProvider);
+ Assert.AreSame(hydraulicBoundaryLocationMock, service.HydraulicBoundaryLocation);
+ Assert.AreEqual(filePath, service.HydraulicBoundaryDatabaseFilePath);
+ Assert.AreEqual(ringId, service.RingId);
+ Assert.AreEqual(norm, service.Norm);
+ }
+
+ [Test]
+ public void Calculate_SetCalculationConvergenceOutputDefault_ReturnsExpectedValue()
+ {
+ // Setup
+ const double norm = 12.34;
+
+ var mockRepository = new MockRepository();
+ var calculationMessageProviderMock = mockRepository.StrictMock();
+ var hydraulicBoundaryLocationMock = mockRepository.StrictMock();
+
+ mockRepository.ReplayAll();
+ var service = new TestHydraulicBoundaryLocationCalculationService();
+
+ // Call
+ ReliabilityIndexCalculationOutput output = service.Calculate(hydraulicBoundaryLocationMock,
+ string.Empty,
+ string.Empty,
+ norm,
+ calculationMessageProviderMock);
+
+ // Assert
+ var expectedOutput = new ReliabilityIndexCalculationOutput(norm, StatisticsConverter.NormToBeta(norm));
+ AssertReliabilityIndexCalculationOutput(expectedOutput, output);
+ mockRepository.VerifyAll();
+ }
+
+ [Test]
+ public void Calculate_SetCalculationConvergenceOutputCalculatedConverged_ReturnsExpectedValue()
+ {
+ // Setup
+ const double norm = 12.34;
+
+ var mockRepository = new MockRepository();
+ var calculationMessageProviderMock = mockRepository.StrictMock();
+ var hydraulicBoundaryLocationMock = mockRepository.StrictMock();
+
+ mockRepository.ReplayAll();
+ var service = new TestHydraulicBoundaryLocationCalculationService
+ {
+ CalculationConvergenceOutput = CalculationConvergence.CalculatedConverged
+ };
+
+ // Call
+ ReliabilityIndexCalculationOutput output = service.Calculate(hydraulicBoundaryLocationMock,
+ string.Empty,
+ string.Empty,
+ norm,
+ calculationMessageProviderMock);
+
+ // Assert
+ Assert.AreSame(calculationMessageProviderMock, service.MessageProvider);
+ var expectedOutput = new ReliabilityIndexCalculationOutput(norm, StatisticsConverter.NormToBeta(norm));
+ AssertReliabilityIndexCalculationOutput(expectedOutput, output);
+ mockRepository.VerifyAll();
+ }
+
+ [Test]
+ public void Calculate_SetCalculationConvergenceOutputNotCalculated_ReturnsNull()
+ {
+ // Setup
+ const double norm = 12.34;
+
+ var mockRepository = new MockRepository();
+ var calculationMessageProviderMock = mockRepository.StrictMock();
+ var hydraulicBoundaryLocationMock = mockRepository.StrictMock();
+
+ mockRepository.ReplayAll();
+ var service = new TestHydraulicBoundaryLocationCalculationService
+ {
+ CalculationConvergenceOutput = CalculationConvergence.NotCalculated
+ };
+
+ // Call
+ ReliabilityIndexCalculationOutput output = service.Calculate(hydraulicBoundaryLocationMock,
+ string.Empty,
+ string.Empty,
+ norm,
+ calculationMessageProviderMock);
+
+ // Assert
+ Assert.AreSame(calculationMessageProviderMock, service.MessageProvider);
+ Assert.IsNull(output);
+ mockRepository.VerifyAll();
+ }
+
+ [Test]
+ public void Calculate_SetCalculationConvergenceOutputCalculatedNotConverged_ReturnsExpectedValue()
+ {
+ // Setup
+ const double norm = 12.34;
+
+ var mockRepository = new MockRepository();
+ var calculationMessageProviderMock = mockRepository.StrictMock();
+ var hydraulicBoundaryLocationMock = mockRepository.StrictMock();
+
+ mockRepository.ReplayAll();
+ var service = new TestHydraulicBoundaryLocationCalculationService
+ {
+ CalculationConvergenceOutput = CalculationConvergence.CalculatedNotConverged
+ };
+
+ // Call
+ ReliabilityIndexCalculationOutput output = service.Calculate(hydraulicBoundaryLocationMock,
+ string.Empty,
+ string.Empty,
+ norm,
+ calculationMessageProviderMock);
+
+ // Assert
+ Assert.AreSame(calculationMessageProviderMock, service.MessageProvider);
+ var expectedOutput = new ReliabilityIndexCalculationOutput(norm, norm);
+ AssertReliabilityIndexCalculationOutput(expectedOutput, output);
+ mockRepository.VerifyAll();
+ }
+
+ private static void AssertReliabilityIndexCalculationOutput(ReliabilityIndexCalculationOutput expected, ReliabilityIndexCalculationOutput actual)
+ {
+ Assert.AreEqual(expected.CalculatedReliabilityIndex, actual.CalculatedReliabilityIndex);
+ Assert.AreEqual(expected.Result, actual.Result, 1e-6);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/TestWaveHeightCalculationServiceTest.cs
===================================================================
diff -u -ra97c4ffe5254af061462539883d25722be13e539 -r248229db928c9e5556be704ed274226f80b4ef19
--- Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/TestWaveHeightCalculationServiceTest.cs (.../TestWaveHeightCalculationServiceTest.cs) (revision a97c4ffe5254af061462539883d25722be13e539)
+++ Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/TestWaveHeightCalculationServiceTest.cs (.../TestWaveHeightCalculationServiceTest.cs) (revision 248229db928c9e5556be704ed274226f80b4ef19)
@@ -35,7 +35,7 @@
public void Validate_Always_ReturnTrue()
{
// Setup
- var service = new TestWaveHeightCalculationService();
+ var service = new TestHydraulicBoundaryLocationCalculationService();
// Call
bool validated = service.Validate(string.Empty, string.Empty);
@@ -53,7 +53,7 @@
var hydraulicBoundaryLocationMock = mockRepository.StrictMock();
mockRepository.ReplayAll();
- var service = new TestWaveHeightCalculationService();
+ var service = new TestHydraulicBoundaryLocationCalculationService();
const double norm = 12.34;
// Call
@@ -78,7 +78,7 @@
var hydraulicBoundaryLocationMock = mockRepository.StrictMock();
mockRepository.ReplayAll();
- var service = new TestWaveHeightCalculationService
+ var service = new TestHydraulicBoundaryLocationCalculationService
{
CalculationConvergenceOutput = CalculationConvergence.CalculatedConverged
};
@@ -107,7 +107,7 @@
var hydraulicBoundaryLocationMock = mockRepository.StrictMock();
mockRepository.ReplayAll();
- var service = new TestWaveHeightCalculationService
+ var service = new TestHydraulicBoundaryLocationCalculationService
{
CalculationConvergenceOutput = CalculationConvergence.NotCalculated
};
@@ -135,7 +135,7 @@
var hydraulicBoundaryLocationMock = mockRepository.StrictMock();
mockRepository.ReplayAll();
- var service = new TestWaveHeightCalculationService
+ var service = new TestHydraulicBoundaryLocationCalculationService
{
CalculationConvergenceOutput = CalculationConvergence.CalculatedNotConverged
};
Index: Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/WaveHeightCalculationServiceConfigTest.cs
===================================================================
diff -u -ra97c4ffe5254af061462539883d25722be13e539 -r248229db928c9e5556be704ed274226f80b4ef19
--- Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/WaveHeightCalculationServiceConfigTest.cs (.../WaveHeightCalculationServiceConfigTest.cs) (revision a97c4ffe5254af061462539883d25722be13e539)
+++ Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/WaveHeightCalculationServiceConfigTest.cs (.../WaveHeightCalculationServiceConfigTest.cs) (revision 248229db928c9e5556be704ed274226f80b4ef19)
@@ -35,7 +35,7 @@
public void Validate_Always_ReturnTrue()
{
// Setup
- var service = new TestWaveHeightCalculationService();
+ var service = new TestHydraulicBoundaryLocationCalculationService();
// Call
bool validated = service.Validate(string.Empty, string.Empty);
@@ -53,7 +53,7 @@
var hydraulicBoundaryLocationMock = mockRepository.StrictMock();
mockRepository.ReplayAll();
- var service = new TestWaveHeightCalculationService();
+ var service = new TestHydraulicBoundaryLocationCalculationService();
const double norm = 12.34;
// Call
@@ -78,7 +78,7 @@
var hydraulicBoundaryLocationMock = mockRepository.StrictMock();
mockRepository.ReplayAll();
- var service = new TestWaveHeightCalculationService
+ var service = new TestHydraulicBoundaryLocationCalculationService
{
CalculationConvergenceOutput = CalculationConvergence.CalculatedConverged
};
@@ -107,7 +107,7 @@
var hydraulicBoundaryLocationMock = mockRepository.StrictMock();
mockRepository.ReplayAll();
- var service = new TestWaveHeightCalculationService
+ var service = new TestHydraulicBoundaryLocationCalculationService
{
CalculationConvergenceOutput = CalculationConvergence.NotCalculated
};
@@ -135,7 +135,7 @@
var hydraulicBoundaryLocationMock = mockRepository.StrictMock();
mockRepository.ReplayAll();
- var service = new TestWaveHeightCalculationService
+ var service = new TestHydraulicBoundaryLocationCalculationService
{
CalculationConvergenceOutput = CalculationConvergence.CalculatedNotConverged
};
Index: Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil/DesignWaterLevelCalculationServiceConfig.cs
===================================================================
diff -u -rc78a5b1d66fba1148ab5880357ce3c20a042c9ed -r248229db928c9e5556be704ed274226f80b4ef19
--- Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil/DesignWaterLevelCalculationServiceConfig.cs (.../DesignWaterLevelCalculationServiceConfig.cs) (revision c78a5b1d66fba1148ab5880357ce3c20a042c9ed)
+++ Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil/DesignWaterLevelCalculationServiceConfig.cs (.../DesignWaterLevelCalculationServiceConfig.cs) (revision 248229db928c9e5556be704ed274226f80b4ef19)
@@ -24,7 +24,7 @@
namespace Ringtoets.Common.Service.TestUtil
{
///
- /// This class can be used to set a temporary
+ /// This class can be used to set a temporary
/// for while testing.
/// Disposing an instance of this class will revert the
/// .
@@ -42,17 +42,17 @@
///
public class DesignWaterLevelCalculationServiceConfig : IDisposable
{
- private readonly IDesignWaterLevelCalculationService previousInstance;
+ private readonly IHydraulicBoundaryLocationCalculationService previousInstance;
///
/// Creates a new instance of .
- /// Sets a to
+ /// Sets a to
/// .
///
public DesignWaterLevelCalculationServiceConfig()
{
previousInstance = DesignWaterLevelCalculationService.Instance;
- DesignWaterLevelCalculationService.Instance = new TestDesignWaterLevelCalculationService();
+ DesignWaterLevelCalculationService.Instance = new TestHydraulicBoundaryLocationCalculationService();
}
///
Index: Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil/Ringtoets.Common.Service.TestUtil.csproj
===================================================================
diff -u -r1e533850c7711172462df1e8f569b9f3ff950045 -r248229db928c9e5556be704ed274226f80b4ef19
--- Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil/Ringtoets.Common.Service.TestUtil.csproj (.../Ringtoets.Common.Service.TestUtil.csproj) (revision 1e533850c7711172462df1e8f569b9f3ff950045)
+++ Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil/Ringtoets.Common.Service.TestUtil.csproj (.../Ringtoets.Common.Service.TestUtil.csproj) (revision 248229db928c9e5556be704ed274226f80b4ef19)
@@ -48,8 +48,7 @@
-
-
+
Fisheye: Tag 248229db928c9e5556be704ed274226f80b4ef19 refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil/TestDesignWaterLevelCalculationService.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil/TestHydraulicBoundaryLocationCalculationService.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil/TestHydraulicBoundaryLocationCalculationService.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil/TestHydraulicBoundaryLocationCalculationService.cs (revision 248229db928c9e5556be704ed274226f80b4ef19)
@@ -0,0 +1,101 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU 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 General Public License for more details.
+//
+// You should have received a copy of the GNU 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 Core.Common.Utils;
+using Ringtoets.Common.Service.MessageProviders;
+using Ringtoets.HydraRing.Calculation.Data.Output;
+using Ringtoets.HydraRing.Data;
+
+namespace Ringtoets.Common.Service.TestUtil
+{
+ ///
+ /// This class allows mocking an actual design water level calculation,
+ /// so that tests can be performed upon them.
+ ///
+ public class TestHydraulicBoundaryLocationCalculationService : IHydraulicBoundaryLocationCalculationService
+ {
+ private CalculationConvergence returnValidOutput = CalculationConvergence.CalculatedConverged;
+
+ ///
+ /// Set the expected output for .
+ ///
+ public CalculationConvergence CalculationConvergenceOutput
+ {
+ set
+ {
+ returnValidOutput = value;
+ }
+ }
+
+ ///
+ /// Gets the used .
+ ///
+ public ICalculationMessageProvider MessageProvider { get; private set; }
+
+ ///
+ /// Gets the used .
+ ///
+ public IHydraulicBoundaryLocation HydraulicBoundaryLocation { get; private set; }
+
+ ///
+ /// Gets the used hydraulic boundary databse file path.
+ ///
+ public string HydraulicBoundaryDatabaseFilePath { get; private set; }
+
+ ///
+ /// Gets the used ring id.
+ ///
+ public string RingId { get; private set; }
+
+ ///
+ /// Gets the used norm.
+ ///
+ public double Norm { get; private set; }
+
+ public bool Validate(string name, string hydraulicBoundaryDatabaseFilePath)
+ {
+ return true;
+ }
+
+ public ReliabilityIndexCalculationOutput Calculate(IHydraulicBoundaryLocation hydraulicBoundaryLocation,
+ string hydraulicBoundaryDatabaseFilePath,
+ string ringId,
+ double norm,
+ ICalculationMessageProvider messageProvider)
+ {
+ MessageProvider = messageProvider;
+ HydraulicBoundaryLocation = hydraulicBoundaryLocation;
+ HydraulicBoundaryDatabaseFilePath = hydraulicBoundaryDatabaseFilePath;
+ RingId = ringId;
+ Norm = norm;
+
+ switch (returnValidOutput)
+ {
+ case CalculationConvergence.NotCalculated:
+ return null;
+ case CalculationConvergence.CalculatedNotConverged:
+ return new ReliabilityIndexCalculationOutput(norm, norm);
+ default:
+ return new ReliabilityIndexCalculationOutput(norm, StatisticsConverter.NormToBeta(norm));
+ }
+ }
+ }
+}
\ No newline at end of file
Fisheye: Tag 248229db928c9e5556be704ed274226f80b4ef19 refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil/TestWaveHeightCalculationService.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil/WaveHeightCalculationServiceConfig.cs
===================================================================
diff -u -r1e533850c7711172462df1e8f569b9f3ff950045 -r248229db928c9e5556be704ed274226f80b4ef19
--- Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil/WaveHeightCalculationServiceConfig.cs (.../WaveHeightCalculationServiceConfig.cs) (revision 1e533850c7711172462df1e8f569b9f3ff950045)
+++ Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil/WaveHeightCalculationServiceConfig.cs (.../WaveHeightCalculationServiceConfig.cs) (revision 248229db928c9e5556be704ed274226f80b4ef19)
@@ -24,7 +24,7 @@
namespace Ringtoets.Common.Service.TestUtil
{
///
- /// This class can be used to set a temporary
+ /// This class can be used to set a temporary
/// for while testing.
/// Disposing an instance of this class will revert the
/// .
@@ -34,25 +34,25 @@
///
/// using(new WaveHeightCalculationServiceConfig())
/// {
- /// var testService = (TestWaveHeightCalculationService) WaveHeightCalculationService.Instance;
+ /// var testService = (TestHydraulicBoundaryLocationCalculationService) WaveHeightCalculationService.Instance;
///
/// // Perform test with service
/// }
///
///
public class WaveHeightCalculationServiceConfig : IDisposable
{
- private readonly IWaveHeightCalculationService previousInstance;
+ private readonly IHydraulicBoundaryLocationCalculationService previousInstance;
///
/// Creates a new instance of .
- /// Sets a to
+ /// Sets a to
/// .
///
public WaveHeightCalculationServiceConfig()
{
previousInstance = WaveHeightCalculationService.Instance;
- WaveHeightCalculationService.Instance = new TestWaveHeightCalculationService();
+ WaveHeightCalculationService.Instance = new TestHydraulicBoundaryLocationCalculationService();
}
///
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Ringtoets.GrassCoverErosionOutwards.Forms.Test.csproj
===================================================================
diff -u -r1d9501d7bfa1cc08cc717b4d94debe0c3ebd8dba -r248229db928c9e5556be704ed274226f80b4ef19
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Ringtoets.GrassCoverErosionOutwards.Forms.Test.csproj (.../Ringtoets.GrassCoverErosionOutwards.Forms.Test.csproj) (revision 1d9501d7bfa1cc08cc717b4d94debe0c3ebd8dba)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Ringtoets.GrassCoverErosionOutwards.Forms.Test.csproj (.../Ringtoets.GrassCoverErosionOutwards.Forms.Test.csproj) (revision 248229db928c9e5556be704ed274226f80b4ef19)
@@ -142,6 +142,10 @@
{73E7E100-C015-4874-A548-AD6E33E7955E}
Ringtoets.Common.Service.TestUtil
+
+ {888d4097-8bc2-4703-9fb1-8744c94d525e}
+ Ringtoets.HydraRing.Calculation
+
{70F8CC9C-5BC8-4FB2-B201-EAE7FA8088C2}
Ringtoets.HydraRing.Data
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/TreeNodeInfos/GrassCoverErosionOutwardsDesignWaterLevelLocationsContextTreeNodeInfoTest.cs
===================================================================
diff -u -rbb32237c29a9f16a3d7e65c1baf833f5fb0c1988 -r248229db928c9e5556be704ed274226f80b4ef19
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/TreeNodeInfos/GrassCoverErosionOutwardsDesignWaterLevelLocationsContextTreeNodeInfoTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsContextTreeNodeInfoTest.cs) (revision bb32237c29a9f16a3d7e65c1baf833f5fb0c1988)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/TreeNodeInfos/GrassCoverErosionOutwardsDesignWaterLevelLocationsContextTreeNodeInfoTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsContextTreeNodeInfoTest.cs) (revision 248229db928c9e5556be704ed274226f80b4ef19)
@@ -406,7 +406,7 @@
using (ContextMenuStrip contextMenuAdapter = info.ContextMenuStrip(context, null, treeViewControl))
using (new DesignWaterLevelCalculationServiceConfig())
{
- var testService = (TestDesignWaterLevelCalculationService) DesignWaterLevelCalculationService.Instance;
+ var testService = (TestHydraulicBoundaryLocationCalculationService) DesignWaterLevelCalculationService.Instance;
// Call
contextMenuAdapter.Items[contextMenuRunDesignWaterLevelCalculationsIndex].PerformClick();
@@ -548,8 +548,8 @@
using (ContextMenuStrip contextMenuAdapter = info.ContextMenuStrip(context, null, treeViewControl))
using (new DesignWaterLevelCalculationServiceConfig())
{
- var testService = (TestDesignWaterLevelCalculationService) DesignWaterLevelCalculationService.Instance;
- testService.SetCalculationConvergenceOutput = CalculationConvergence.NotCalculated;
+ var testService = (TestHydraulicBoundaryLocationCalculationService) DesignWaterLevelCalculationService.Instance;
+ testService.CalculationConvergenceOutput = CalculationConvergence.NotCalculated;
// When
contextMenuAdapter.Items[contextMenuRunDesignWaterLevelCalculationsIndex].PerformClick();
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveHeightLocationsContextTreeNodeInfoTest.cs
===================================================================
diff -u -ra97c4ffe5254af061462539883d25722be13e539 -r248229db928c9e5556be704ed274226f80b4ef19
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveHeightLocationsContextTreeNodeInfoTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsContextTreeNodeInfoTest.cs) (revision a97c4ffe5254af061462539883d25722be13e539)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveHeightLocationsContextTreeNodeInfoTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsContextTreeNodeInfoTest.cs) (revision 248229db928c9e5556be704ed274226f80b4ef19)
@@ -399,7 +399,7 @@
{
using (new WaveHeightCalculationServiceConfig())
{
- var testService = (TestWaveHeightCalculationService) WaveHeightCalculationService.Instance;
+ var testService = (TestHydraulicBoundaryLocationCalculationService) WaveHeightCalculationService.Instance;
testService.CalculationConvergenceOutput = CalculationConvergence.NotCalculated;
// When
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj
===================================================================
diff -u -rae04c23f970bb96e54adbfb8c2fe1aaf95d13326 -r248229db928c9e5556be704ed274226f80b4ef19
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj (.../Ringtoets.Integration.Forms.Test.csproj) (revision ae04c23f970bb96e54adbfb8c2fe1aaf95d13326)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj (.../Ringtoets.Integration.Forms.Test.csproj) (revision 248229db928c9e5556be704ed274226f80b4ef19)
@@ -197,6 +197,10 @@
{73E7E100-C015-4874-A548-AD6E33E7955E}
Ringtoets.Common.Service.TestUtil
+
+ {888d4097-8bc2-4703-9fb1-8744c94d525e}
+ Ringtoets.HydraRing.Calculation
+
{74CBA865-9338-447F-BAD9-28312446AE84}
Ringtoets.HydraRing.Calculation.TestUtil
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/DesignWaterLevelLocationsContextTreeNodeInfoTest.cs
===================================================================
diff -u -r675467f7dd6a785cc879f1ff00781332a0a5f60c -r248229db928c9e5556be704ed274226f80b4ef19
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/DesignWaterLevelLocationsContextTreeNodeInfoTest.cs (.../DesignWaterLevelLocationsContextTreeNodeInfoTest.cs) (revision 675467f7dd6a785cc879f1ff00781332a0a5f60c)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/DesignWaterLevelLocationsContextTreeNodeInfoTest.cs (.../DesignWaterLevelLocationsContextTreeNodeInfoTest.cs) (revision 248229db928c9e5556be704ed274226f80b4ef19)
@@ -345,8 +345,8 @@
{
using (new DesignWaterLevelCalculationServiceConfig())
{
- var testService = (TestDesignWaterLevelCalculationService) DesignWaterLevelCalculationService.Instance;
- testService.SetCalculationConvergenceOutput = CalculationConvergence.NotCalculated;
+ var testService = (TestHydraulicBoundaryLocationCalculationService) DesignWaterLevelCalculationService.Instance;
+ testService.CalculationConvergenceOutput = CalculationConvergence.NotCalculated;
// When
contextMenuAdapter.Items[contextMenuRunAssessmentLevelCalculationsIndex].PerformClick();