Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsInputContextProperties.cs =================================================================== diff -u -r44bce9443701bae546a52fed26327da870c2ab0b -rb116b56a97e5a4aee668e9dda089e8a2e2d45e57 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsInputContextProperties.cs (.../MacroStabilityInwardsInputContextProperties.cs) (revision 44bce9443701bae546a52fed26327da870c2ab0b) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsInputContextProperties.cs (.../MacroStabilityInwardsInputContextProperties.cs) (revision b116b56a97e5a4aee668e9dda089e8a2e2d45e57) @@ -93,7 +93,7 @@ throw new ArgumentNullException(nameof(getNormativeAssessmentLevelFunc)); } - if (this.propertyChangeHandler == null) + if (propertyChangeHandler == null) { throw new ArgumentNullException(nameof(this.propertyChangeHandler)); } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -rd57b5fdfd92270ac6eff490b438bbe90f0296a4d -rb116b56a97e5a4aee668e9dda089e8a2e2d45e57 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsCalculationGroupContextTreeNodeInfoTest.cs (.../MacroStabilityInwardsCalculationGroupContextTreeNodeInfoTest.cs) (revision d57b5fdfd92270ac6eff490b438bbe90f0296a4d) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsCalculationGroupContextTreeNodeInfoTest.cs (.../MacroStabilityInwardsCalculationGroupContextTreeNodeInfoTest.cs) (revision b116b56a97e5a4aee668e9dda089e8a2e2d45e57) @@ -796,7 +796,7 @@ group.Children.Add(invalidCalculation); var failureMechanism = new TestMacroStabilityInwardsFailureMechanism(); - var assessmentSection = mocks.Stub(); + var assessmentSection = new ObservableTestAssessmentSectionStub(); var nodeData = new MacroStabilityInwardsCalculationGroupContext(group, parentGroup, Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsCalculationScenarioContextTreeNodeInfoTest.cs =================================================================== diff -u -rceefc700930d8a8d9ff88644c129804990dcc9c9 -rb116b56a97e5a4aee668e9dda089e8a2e2d45e57 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsCalculationScenarioContextTreeNodeInfoTest.cs (.../MacroStabilityInwardsCalculationScenarioContextTreeNodeInfoTest.cs) (revision ceefc700930d8a8d9ff88644c129804990dcc9c9) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsCalculationScenarioContextTreeNodeInfoTest.cs (.../MacroStabilityInwardsCalculationScenarioContextTreeNodeInfoTest.cs) (revision b116b56a97e5a4aee668e9dda089e8a2e2d45e57) @@ -534,7 +534,7 @@ { var calculation = new MacroStabilityInwardsCalculationScenario(); var failureMechanism = new TestMacroStabilityInwardsFailureMechanism(); - var assessmentSection = mocks.Stub(); + var assessmentSection = new ObservableTestAssessmentSectionStub(); var calculationContext = new MacroStabilityInwardsCalculationScenarioContext(calculation, new CalculationGroup(), Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsFailureMechanismContextTreeNodeInfoTest.cs =================================================================== diff -u -r5b421f80047c5b98776fb1c6f4a216775066e805 -rb116b56a97e5a4aee668e9dda089e8a2e2d45e57 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsFailureMechanismContextTreeNodeInfoTest.cs (.../MacroStabilityInwardsFailureMechanismContextTreeNodeInfoTest.cs) (revision 5b421f80047c5b98776fb1c6f4a216775066e805) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsFailureMechanismContextTreeNodeInfoTest.cs (.../MacroStabilityInwardsFailureMechanismContextTreeNodeInfoTest.cs) (revision b116b56a97e5a4aee668e9dda089e8a2e2d45e57) @@ -647,7 +647,7 @@ failureMechanism.CalculationsGroup.Children.Add(validCalculation); failureMechanism.CalculationsGroup.Children.Add(invalidCalculation); - var assessmentSection = mocks.Stub(); + var assessmentSection = new ObservableTestAssessmentSectionStub(); var failureMechanismContext = new MacroStabilityInwardsFailureMechanismContext(failureMechanism, assessmentSection); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsCalculationServiceTest.cs =================================================================== diff -u -r6cd47071c8dbb10eb401925acbb067c4be9266d9 -rb116b56a97e5a4aee668e9dda089e8a2e2d45e57 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsCalculationServiceTest.cs (.../MacroStabilityInwardsCalculationServiceTest.cs) (revision 6cd47071c8dbb10eb401925acbb067c4be9266d9) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsCalculationServiceTest.cs (.../MacroStabilityInwardsCalculationServiceTest.cs) (revision b116b56a97e5a4aee668e9dda089e8a2e2d45e57) @@ -285,17 +285,28 @@ } } - [Test] - public void Calculate_CompleteInput_SetsInputOnCalculator() + [TestCase(true)] + [TestCase(false)] + public void Calculate_CompleteInput_SetsInputOnCalculator(bool useAssessmentLevelManualInput) { // Setup + RoundedDouble normativeAssessmentLevel = GetCalculatedTestAssessmentLevel(); + MacroStabilityInwardsInput input = testCalculation.InputParameters; + + input.AssessmentLevel = (RoundedDouble) 2.2; + + input.UseAssessmentLevelManualInput = useAssessmentLevelManualInput; using (new MacroStabilityInwardsCalculatorFactoryConfig()) { // Call - MacroStabilityInwardsCalculationService.Calculate(testCalculation, GetCalculatedTestAssessmentLevel()); + MacroStabilityInwardsCalculationService.Calculate(testCalculation, normativeAssessmentLevel); // Assert - AssertInput(testCalculation.InputParameters, (TestMacroStabilityInwardsCalculatorFactory) MacroStabilityInwardsCalculatorFactory.Instance); + RoundedDouble expectedAssessmentLevel = useAssessmentLevelManualInput + ? testCalculation.InputParameters.AssessmentLevel + : normativeAssessmentLevel; + + AssertInput(testCalculation.InputParameters, (TestMacroStabilityInwardsCalculatorFactory) MacroStabilityInwardsCalculatorFactory.Instance, expectedAssessmentLevel); } } @@ -591,7 +602,7 @@ } } - private static void AssertInput(MacroStabilityInwardsInput originalInput, TestMacroStabilityInwardsCalculatorFactory factory) + private static void AssertInput(MacroStabilityInwardsInput originalInput, TestMacroStabilityInwardsCalculatorFactory factory, RoundedDouble expectedAssessmentLevel) { UpliftVanCalculatorInput actualInput = factory.LastCreatedUpliftVanCalculator.Input; CalculatorInputAssert.AssertSoilProfile(originalInput.SoilProfileUnderSurfaceLine, actualInput.SoilProfile); @@ -604,7 +615,7 @@ Assert.AreEqual(PlLineCreationMethod.RingtoetsWti2017, actualInput.PlLineCreationMethod); Assert.AreEqual(LandwardDirection.PositiveX, actualInput.LandwardDirection); Assert.AreSame(originalInput.SurfaceLine, actualInput.SurfaceLine); - Assert.AreEqual(originalInput.AssessmentLevel, actualInput.AssessmentLevel); + Assert.AreEqual(expectedAssessmentLevel, actualInput.AssessmentLevel); Assert.AreEqual(originalInput.DikeSoilScenario, actualInput.DikeSoilScenario); Assert.AreEqual(originalInput.WaterLevelRiverAverage, actualInput.WaterLevelRiverAverage); Assert.AreEqual(originalInput.LocationInputExtreme.WaterLevelPolder, actualInput.WaterLevelPolderExtreme); Index: Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingCalculationServiceTest.cs =================================================================== diff -u -r6cd47071c8dbb10eb401925acbb067c4be9266d9 -rb116b56a97e5a4aee668e9dda089e8a2e2d45e57 --- Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingCalculationServiceTest.cs (.../PipingCalculationServiceTest.cs) (revision 6cd47071c8dbb10eb401925acbb067c4be9266d9) +++ Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingCalculationServiceTest.cs (.../PipingCalculationServiceTest.cs) (revision b116b56a97e5a4aee668e9dda089e8a2e2d45e57) @@ -1022,6 +1022,8 @@ RoundedDouble normativeAssessmentLevel = GetTestNormativeAssessmentLevel(); PipingInput input = testCalculation.InputParameters; + input.AssessmentLevel = (RoundedDouble) 2.2; + input.UseAssessmentLevelManualInput = useAssessmentLevelManualInput; using (new PipingSubCalculatorFactoryConfig())