Index: Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Integration.Test/WaveImpactAsphaltCoverWaveConditionsCalculationActivityIntegrationTest.cs =================================================================== diff -u -r4f4daebe59ab925c98cef039101ec70544530bbe -rea8a17f920fc62e1164b07230be5d2f256dc4ffe --- Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Integration.Test/WaveImpactAsphaltCoverWaveConditionsCalculationActivityIntegrationTest.cs (.../WaveImpactAsphaltCoverWaveConditionsCalculationActivityIntegrationTest.cs) (revision 4f4daebe59ab925c98cef039101ec70544530bbe) +++ Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Integration.Test/WaveImpactAsphaltCoverWaveConditionsCalculationActivityIntegrationTest.cs (.../WaveImpactAsphaltCoverWaveConditionsCalculationActivityIntegrationTest.cs) (revision ea8a17f920fc62e1164b07230be5d2f256dc4ffe) @@ -19,7 +19,6 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -60,8 +59,13 @@ // Setup string invalidFilePath = Path.Combine(testDataPath, "NonExisting.sqlite"); - var assessmentSection = new AssessmentSectionStub(); - assessmentSection.HydraulicBoundaryDatabase.FilePath = invalidFilePath; + var assessmentSection = new AssessmentSectionStub + { + HydraulicBoundaryDatabase = + { + FilePath = invalidFilePath + } + }; var hydraulicBoundaryLocation = new TestHydraulicBoundaryLocation(); assessmentSection.SetHydraulicBoundaryLocationCalculations(new[] @@ -83,10 +87,10 @@ using (new HydraRingCalculatorFactoryConfig(calculatorFactory)) { // Call - Action call = () => activity.Run(); + void Call() => activity.Run(); // Assert - TestHelper.AssertLogMessages(call, messages => + TestHelper.AssertLogMessages(Call, messages => { string[] msgs = messages.ToArray(); Assert.AreEqual(4, msgs.Length); @@ -125,10 +129,10 @@ using (new HydraRingCalculatorFactoryConfig(calculatorFactory)) { // Call - Action call = () => activity.Run(); + void Call() => activity.Run(); // Assert - TestHelper.AssertLogMessages(call, messages => + TestHelper.AssertLogMessages(Call, messages => { string[] msgs = messages.ToArray(); Assert.AreEqual(4, msgs.Length); @@ -164,10 +168,10 @@ using (new HydraRingCalculatorFactoryConfig(calculatorFactory)) { // Call - Action call = () => activity.Run(); + void Call() => activity.Run(); // Assert - TestHelper.AssertLogMessages(call, messages => + TestHelper.AssertLogMessages(Call, messages => { string[] msgs = messages.ToArray(); Assert.AreEqual(4, msgs.Length); @@ -216,7 +220,7 @@ // Assert for (var i = 0; i < waterLevels.Length; i++) { - string text = $"Stap {i + 1} van {waterLevels.Length} | Waterstand '{waterLevels[i]}' [m+NAP] voor asfalt berekenen."; + var text = $"Stap {i + 1} van {waterLevels.Length} | Waterstand '{waterLevels[i]}' [m+NAP] voor asfalt berekenen."; Assert.AreEqual(text, progessTexts[i]); } } @@ -277,7 +281,7 @@ var expectedInput = new WaveConditionsCosineCalculationInput(1, input.Orientation, input.HydraulicBoundaryLocation.Id, - assessmentSection.FailureMechanismContribution.LowerLimitNorm * 30, + assessmentSection.FailureMechanismContribution.LowerLimitNorm, input.ForeshoreProfile.Geometry.Select(c => new HydraRingForelandPoint(c.X, c.Y)), new HydraRingBreakWater(BreakWaterTypeHelper.GetHydraRingBreakWaterType(breakWaterType), input.BreakWater.Height), waterLevels.ElementAt(waterLevelIndex++), @@ -668,7 +672,7 @@ InputParameters = { HydraulicBoundaryLocation = hydraulicBoundaryLocation, - CategoryType = AssessmentSectionCategoryType.FactorizedLowerLimitNorm, + WaterLevelType = WaveConditionsInputWaterLevelType.LowerLimit, ForeshoreProfile = new TestForeshoreProfile(true), UseForeshore = true, UseBreakWater = true, @@ -703,16 +707,14 @@ hydraulicBoundaryLocation }); - assessmentSection.WaterLevelCalculationsForFactorizedLowerLimitNorm.First().Output = new TestHydraulicBoundaryLocationCalculationOutput(9.3); + assessmentSection.WaterLevelCalculationsForLowerLimitNorm.First().Output = new TestHydraulicBoundaryLocationCalculationOutput(9.3); return assessmentSection; } private static IEnumerable GetWaterLevels(WaveImpactAsphaltCoverWaveConditionsCalculation calculation, IAssessmentSection assessmentSection) { - return calculation.InputParameters.GetWaterLevels(assessmentSection.GetAssessmentLevel( - calculation.InputParameters.HydraulicBoundaryLocation, - calculation.InputParameters.CategoryType)); + return calculation.InputParameters.GetWaterLevels(WaveConditionsInputHelper.GetAssessmentLevel(calculation.InputParameters, assessmentSection)); } } } \ No newline at end of file