Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/Handlers/HydraulicLocationConfigurationDatabaseUpdateHandlerTest.cs =================================================================== diff -u -rc36b47c2e1e8cf948767cca33f80ad735f370ad0 -r59912f4503f8c3c1584fdd28fa42faf349e7b654 --- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/Handlers/HydraulicLocationConfigurationDatabaseUpdateHandlerTest.cs (.../HydraulicLocationConfigurationDatabaseUpdateHandlerTest.cs) (revision c36b47c2e1e8cf948767cca33f80ad735f370ad0) +++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/Handlers/HydraulicLocationConfigurationDatabaseUpdateHandlerTest.cs (.../HydraulicLocationConfigurationDatabaseUpdateHandlerTest.cs) (revision 59912f4503f8c3c1584fdd28fa42faf349e7b654) @@ -30,7 +30,6 @@ using Riskeer.Common.Data.Calculation; using Riskeer.Common.Data.Hydraulics; using Riskeer.DuneErosion.Data; -using Riskeer.GrassCoverErosionOutwards.Data; using Riskeer.HydraRing.IO.HydraulicLocationConfigurationDatabase; using Riskeer.HydraRing.IO.TestUtil; using Riskeer.Integration.Data; @@ -47,10 +46,10 @@ public void Constructor_AssessmentSectionNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => new HydraulicLocationConfigurationDatabaseUpdateHandler(null); + void Call() => new HydraulicLocationConfigurationDatabaseUpdateHandler(null); // Assert - var exception = Assert.Throws(call); + var exception = Assert.Throws(Call); Assert.AreEqual("assessmentSection", exception.ParamName); } @@ -109,10 +108,10 @@ var handler = new HydraulicLocationConfigurationDatabaseUpdateHandler(CreateAssessmentSection()); // Call - TestDelegate call = () => handler.Update(null, ReadHydraulicLocationConfigurationDatabaseSettingsTestFactory.Create(), false, ""); + void Call() => handler.Update(null, ReadHydraulicLocationConfigurationDatabaseSettingsTestFactory.Create(), false, ""); // Assert - var exception = Assert.Throws(call); + var exception = Assert.Throws(Call); Assert.AreEqual("hydraulicBoundaryDatabase", exception.ParamName); } @@ -123,11 +122,10 @@ var handler = new HydraulicLocationConfigurationDatabaseUpdateHandler(CreateAssessmentSection()); // Call - TestDelegate call = () => handler.Update(new HydraulicBoundaryDatabase(), ReadHydraulicLocationConfigurationDatabaseSettingsTestFactory.Create(), - false, null); + void Call() => handler.Update(new HydraulicBoundaryDatabase(), ReadHydraulicLocationConfigurationDatabaseSettingsTestFactory.Create(), false, null); // Assert - var exception = Assert.Throws(call); + var exception = Assert.Throws(Call); Assert.AreEqual("hlcdFilePath", exception.ParamName); } @@ -141,12 +139,12 @@ bool usePreprocessorClosure = new Random(21).NextBoolean(); // Call - Action call = () => handler.Update(hydraulicBoundaryDatabase, null, usePreprocessorClosure, hlcdFilePath); + void Call() => handler.Update(hydraulicBoundaryDatabase, null, usePreprocessorClosure, hlcdFilePath); // Assert const string expectedMessage = "De tabel 'ScenarioInformation' in het HLCD bestand is niet aanwezig. Er worden standaardwaarden " + "conform WBI2017 gebruikt voor de HLCD bestandsinformatie."; - TestHelper.AssertLogMessageWithLevelIsGenerated(call, Tuple.Create(expectedMessage, LogLevelConstant.Warn), 1); + TestHelper.AssertLogMessageWithLevelIsGenerated(Call, Tuple.Create(expectedMessage, LogLevelConstant.Warn), 1); HydraulicLocationConfigurationSettings settings = hydraulicBoundaryDatabase.HydraulicLocationConfigurationSettings; Assert.AreEqual(hlcdFilePath, settings.FilePath); @@ -173,10 +171,10 @@ bool usePreprocessorClosure = new Random(21).NextBoolean(); // Call - Action call = () => handler.Update(hydraulicBoundaryDatabase, readSettings, usePreprocessorClosure, hlcdFilePath); + void Call() => handler.Update(hydraulicBoundaryDatabase, readSettings, usePreprocessorClosure, hlcdFilePath); // Assert - TestHelper.AssertLogMessagesCount(call, 0); + TestHelper.AssertLogMessagesCount(Call, 0); HydraulicLocationConfigurationSettings settings = hydraulicBoundaryDatabase.HydraulicLocationConfigurationSettings; Assert.AreEqual(hlcdFilePath, settings.FilePath); @@ -251,6 +249,7 @@ private static IEnumerable GetLocationCalculations(AssessmentSection assessmentSection) { var calculations = new List(); + calculations.AddRange(assessmentSection.WaterLevelCalculationsForFactorizedSignalingNorm); calculations.AddRange(assessmentSection.WaterLevelCalculationsForSignalingNorm); calculations.AddRange(assessmentSection.WaterLevelCalculationsForLowerLimitNorm); @@ -260,14 +259,6 @@ calculations.AddRange(assessmentSection.WaveHeightCalculationsForLowerLimitNorm); calculations.AddRange(assessmentSection.WaveHeightCalculationsForFactorizedLowerLimitNorm); - GrassCoverErosionOutwardsFailureMechanism grassCoverErosionOutwardsFailureMechanism = assessmentSection.GrassCoverErosionOutwards; - calculations.AddRange(grassCoverErosionOutwardsFailureMechanism.WaterLevelCalculationsForMechanismSpecificFactorizedSignalingNorm); - calculations.AddRange(grassCoverErosionOutwardsFailureMechanism.WaterLevelCalculationsForMechanismSpecificSignalingNorm); - calculations.AddRange(grassCoverErosionOutwardsFailureMechanism.WaterLevelCalculationsForMechanismSpecificLowerLimitNorm); - calculations.AddRange(grassCoverErosionOutwardsFailureMechanism.WaveHeightCalculationsForMechanismSpecificFactorizedSignalingNorm); - calculations.AddRange(grassCoverErosionOutwardsFailureMechanism.WaveHeightCalculationsForMechanismSpecificSignalingNorm); - calculations.AddRange(grassCoverErosionOutwardsFailureMechanism.WaveHeightCalculationsForMechanismSpecificLowerLimitNorm); - return calculations; }