Index: Ringtoets/Common/src/Ringtoets.Common.Service/CalculationServiceHelper.cs =================================================================== diff -u -r7371a70ed0751d341d41a7b951b780d286f83791 -rf4bd4f705693d534015e214b191e059c2b0c39d3 --- Ringtoets/Common/src/Ringtoets.Common.Service/CalculationServiceHelper.cs (.../CalculationServiceHelper.cs) (revision 7371a70ed0751d341d41a7b951b780d286f83791) +++ Ringtoets/Common/src/Ringtoets.Common.Service/CalculationServiceHelper.cs (.../CalculationServiceHelper.cs) (revision f4bd4f705693d534015e214b191e059c2b0c39d3) @@ -45,10 +45,12 @@ { throw new ArgumentNullException(nameof(format)); } + if (errorMessages == null) { throw new ArgumentNullException(nameof(errorMessages)); } + foreach (string errorMessage in errorMessages) { log.ErrorFormat(format, errorMessage); @@ -83,6 +85,7 @@ { throw new ArgumentNullException(nameof(warningMessages)); } + foreach (string waningMessage in warningMessages) { log.Warn(waningMessage); @@ -147,10 +150,12 @@ { throw new ArgumentNullException(nameof(message)); } + if (exception == null) { throw new ArgumentNullException(nameof(exception)); } + log.Error(message, exception); } } Index: Ringtoets/Common/src/Ringtoets.Common.Service/ClearResults.cs =================================================================== diff -u -r6ef5e439a6d9f40ebd9926251945e0935fbbc314 -rf4bd4f705693d534015e214b191e059c2b0c39d3 --- Ringtoets/Common/src/Ringtoets.Common.Service/ClearResults.cs (.../ClearResults.cs) (revision 6ef5e439a6d9f40ebd9926251945e0935fbbc314) +++ Ringtoets/Common/src/Ringtoets.Common.Service/ClearResults.cs (.../ClearResults.cs) (revision f4bd4f705693d534015e214b191e059c2b0c39d3) @@ -42,6 +42,7 @@ { throw new ArgumentNullException(nameof(changedObjects)); } + if (removedObjects == null) { throw new ArgumentNullException(nameof(removedObjects)); Index: Ringtoets/Common/src/Ringtoets.Common.Service/HydraRingSettingsDatabaseHelper.cs =================================================================== diff -u -rac96d7c315129af851634ed5a4a6800b59ede718 -rf4bd4f705693d534015e214b191e059c2b0c39d3 --- Ringtoets/Common/src/Ringtoets.Common.Service/HydraRingSettingsDatabaseHelper.cs (.../HydraRingSettingsDatabaseHelper.cs) (revision ac96d7c315129af851634ed5a4a6800b59ede718) +++ Ringtoets/Common/src/Ringtoets.Common.Service/HydraRingSettingsDatabaseHelper.cs (.../HydraRingSettingsDatabaseHelper.cs) (revision f4bd4f705693d534015e214b191e059c2b0c39d3) @@ -61,18 +61,21 @@ { calculationInput.PreprocessorSetting = preprocessorSettingsProvider.GetPreprocessorSetting(locationId, usePreprocessor); } + using (var designTablesSettingsProviders = new DesignTablesSettingsProvider(settingsDatabaseFileName)) { calculationInput.DesignTablesSetting = designTablesSettingsProviders.GetDesignTablesSetting( locationId, calculationInput.FailureMechanismType); } + using (var numericsSettingsProvider = new NumericsSettingsProvider(settingsDatabaseFileName)) { calculationInput.NumericsSettings = numericsSettingsProvider.GetNumericsSettings( locationId, calculationInput.FailureMechanismType); } + using (var timeIntegrationSettingsProvider = new TimeIntegrationSettingsProvider(settingsDatabaseFileName)) { calculationInput.TimeIntegrationSetting = timeIntegrationSettingsProvider.GetTimeIntegrationSetting( Index: Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/FaultTreeIllustrationPointConverter.cs =================================================================== diff -u -r83ac738ad69ef53eba6ca4f647657e5b7f024b96 -rf4bd4f705693d534015e214b191e059c2b0c39d3 --- Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/FaultTreeIllustrationPointConverter.cs (.../FaultTreeIllustrationPointConverter.cs) (revision 83ac738ad69ef53eba6ca4f647657e5b7f024b96) +++ Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/FaultTreeIllustrationPointConverter.cs (.../FaultTreeIllustrationPointConverter.cs) (revision f4bd4f705693d534015e214b191e059c2b0c39d3) @@ -57,8 +57,9 @@ try { CombinationType combinationType = CombinationTypeConverter.Convert(hydraRingFaultTreeIllustrationPoint.CombinationType); - IEnumerable stochasts = hydraRingFaultTreeIllustrationPoint - .Stochasts.Select(StochastConverter.Convert).ToArray(); + IEnumerable stochasts = hydraRingFaultTreeIllustrationPoint.Stochasts + .Select(StochastConverter.Convert) + .ToArray(); return new FaultTreeIllustrationPoint(hydraRingFaultTreeIllustrationPoint.Name, hydraRingFaultTreeIllustrationPoint.Beta, Index: Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/IllustrationPointResultConverter.cs =================================================================== diff -u -rc77ccbb8b26516270f36ef53110be573839f3470 -rf4bd4f705693d534015e214b191e059c2b0c39d3 --- Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/IllustrationPointResultConverter.cs (.../IllustrationPointResultConverter.cs) (revision c77ccbb8b26516270f36ef53110be573839f3470) +++ Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/IllustrationPointResultConverter.cs (.../IllustrationPointResultConverter.cs) (revision f4bd4f705693d534015e214b191e059c2b0c39d3) @@ -46,6 +46,7 @@ { throw new ArgumentNullException(nameof(hydraRingIllustrationPointResult)); } + return new IllustrationPointResult(hydraRingIllustrationPointResult.Description, hydraRingIllustrationPointResult.Value); } Index: Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/SubMechanismIllustrationPointConverter.cs =================================================================== diff -u -r83ac738ad69ef53eba6ca4f647657e5b7f024b96 -rf4bd4f705693d534015e214b191e059c2b0c39d3 --- Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/SubMechanismIllustrationPointConverter.cs (.../SubMechanismIllustrationPointConverter.cs) (revision 83ac738ad69ef53eba6ca4f647657e5b7f024b96) +++ Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/SubMechanismIllustrationPointConverter.cs (.../SubMechanismIllustrationPointConverter.cs) (revision f4bd4f705693d534015e214b191e059c2b0c39d3) @@ -49,10 +49,12 @@ throw new ArgumentNullException(nameof(hydraRingSubMechanismIllustrationPoint)); } - IEnumerable stochasts = hydraRingSubMechanismIllustrationPoint - .Stochasts.Select(StochastConverter.Convert).ToArray(); - IEnumerable illustrationPointResults = hydraRingSubMechanismIllustrationPoint - .Results.Select(IllustrationPointResultConverter.Convert).ToArray(); + IEnumerable stochasts = hydraRingSubMechanismIllustrationPoint.Stochasts + .Select(StochastConverter.Convert) + .ToArray(); + IEnumerable illustrationPointResults = hydraRingSubMechanismIllustrationPoint.Results + .Select(IllustrationPointResultConverter.Convert) + .ToArray(); return new SubMechanismIllustrationPoint(hydraRingSubMechanismIllustrationPoint.Name, hydraRingSubMechanismIllustrationPoint.Beta, Index: Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/TopLevelFaultTreeIllustrationPointConverter.cs =================================================================== diff -u -rc77ccbb8b26516270f36ef53110be573839f3470 -rf4bd4f705693d534015e214b191e059c2b0c39d3 --- Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/TopLevelFaultTreeIllustrationPointConverter.cs (.../TopLevelFaultTreeIllustrationPointConverter.cs) (revision c77ccbb8b26516270f36ef53110be573839f3470) +++ Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/TopLevelFaultTreeIllustrationPointConverter.cs (.../TopLevelFaultTreeIllustrationPointConverter.cs) (revision f4bd4f705693d534015e214b191e059c2b0c39d3) @@ -54,6 +54,7 @@ { throw new ArgumentNullException(nameof(hydraRingWindDirectionClosingSituation)); } + if (hydraRingIllustrationPointTreeNode == null) { throw new ArgumentNullException(nameof(hydraRingIllustrationPointTreeNode)); Index: Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/TopLevelSubMechanismIllustrationPointConverter.cs =================================================================== diff -u -rc77ccbb8b26516270f36ef53110be573839f3470 -rf4bd4f705693d534015e214b191e059c2b0c39d3 --- Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/TopLevelSubMechanismIllustrationPointConverter.cs (.../TopLevelSubMechanismIllustrationPointConverter.cs) (revision c77ccbb8b26516270f36ef53110be573839f3470) +++ Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/TopLevelSubMechanismIllustrationPointConverter.cs (.../TopLevelSubMechanismIllustrationPointConverter.cs) (revision f4bd4f705693d534015e214b191e059c2b0c39d3) @@ -51,6 +51,7 @@ { throw new ArgumentNullException(nameof(hydraRingWindDirectionClosingSituation)); } + if (hydraRingSubMechanismIllustrationPoint == null) { throw new ArgumentNullException(nameof(hydraRingSubMechanismIllustrationPoint)); Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/RingtoetsCommonDataSynchronizationServiceTest.cs =================================================================== diff -u -rda7bb9a6d96d7118d6dcdc2ee17a11d5b43f44c7 -rf4bd4f705693d534015e214b191e059c2b0c39d3 --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/RingtoetsCommonDataSynchronizationServiceTest.cs (.../RingtoetsCommonDataSynchronizationServiceTest.cs) (revision da7bb9a6d96d7118d6dcdc2ee17a11d5b43f44c7) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/RingtoetsCommonDataSynchronizationServiceTest.cs (.../RingtoetsCommonDataSynchronizationServiceTest.cs) (revision f4bd4f705693d534015e214b191e059c2b0c39d3) @@ -166,7 +166,7 @@ }, Output = new TestStructuresOutput() }; - var calculations = new[] + StructuresCalculation[] calculations = { calculation1, calculation2, Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/SynchronizeCalculationWithForeshoreProfileHelperTest.cs =================================================================== diff -u -r25b0a55f2aeac2edab0cd8b002309a63971e1db4 -rf4bd4f705693d534015e214b191e059c2b0c39d3 --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/SynchronizeCalculationWithForeshoreProfileHelperTest.cs (.../SynchronizeCalculationWithForeshoreProfileHelperTest.cs) (revision 25b0a55f2aeac2edab0cd8b002309a63971e1db4) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/SynchronizeCalculationWithForeshoreProfileHelperTest.cs (.../SynchronizeCalculationWithForeshoreProfileHelperTest.cs) (revision f4bd4f705693d534015e214b191e059c2b0c39d3) @@ -68,6 +68,7 @@ calculation.Expect(c => c.ClearOutput()); calculation.Expect(c => c.NotifyObservers()); } + mocks.ReplayAll(); // Call Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/ValidationRules/UseBreakWaterRuleTest.cs =================================================================== diff -u -r1bbf51443c907b5f202e80764fa05f2e7f842c04 -rf4bd4f705693d534015e214b191e059c2b0c39d3 --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/ValidationRules/UseBreakWaterRuleTest.cs (.../UseBreakWaterRuleTest.cs) (revision 1bbf51443c907b5f202e80764fa05f2e7f842c04) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/ValidationRules/UseBreakWaterRuleTest.cs (.../UseBreakWaterRuleTest.cs) (revision f4bd4f705693d534015e214b191e059c2b0c39d3) @@ -64,8 +64,10 @@ [Test] [Combinatorial] public void Validate_DoesNotUseBreakWaterWithInvalidBreakWaterHeight_NoErrorMessage( - [Values(BreakWaterType.Wall, BreakWaterType.Caisson, BreakWaterType.Dam)] BreakWaterType type, - [Values(double.NaN, double.NegativeInfinity, double.PositiveInfinity)] double height) + [Values(BreakWaterType.Wall, BreakWaterType.Caisson, BreakWaterType.Dam)] + BreakWaterType type, + [Values(double.NaN, double.NegativeInfinity, double.PositiveInfinity)] + double height) { // Setup var breakWater = mockRepository.Stub(); @@ -86,8 +88,10 @@ [Test] [Combinatorial] public void Validate_UseBreakWaterWithInvalidBreakWaterHeight_ErrorMessage( - [Values(BreakWaterType.Wall, BreakWaterType.Caisson, BreakWaterType.Dam)] BreakWaterType type, - [Values(double.NaN, double.NegativeInfinity, double.PositiveInfinity)] double height) + [Values(BreakWaterType.Wall, BreakWaterType.Caisson, BreakWaterType.Dam)] + BreakWaterType type, + [Values(double.NaN, double.NegativeInfinity, double.PositiveInfinity)] + double height) { // Setup var breakWater = mockRepository.Stub();