Index: Ringtoets/Common/src/Ringtoets.Common.IO/Exceptions/InvalidDistributionSettingException.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.IO/Exceptions/InvalidDistributionSettingException.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/Exceptions/InvalidDistributionSettingException.cs (revision 12168affe49e3702bb66ec40c33e0f2390440cd3)
@@ -0,0 +1,68 @@
+// Copyright (C) Stichting Deltares 2017. 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 System;
+using System.Runtime.Serialization;
+
+namespace Ringtoets.Common.IO.Exceptions
+{
+ ///
+ /// Exception thrown when something went wrong when a distribution setting is invalid.
+ ///
+ [Serializable]
+ public class InvalidDistributionSettingException : Exception
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public InvalidDistributionSettingException() {}
+
+ ///
+ /// Initializes a new instance of the class
+ /// with a specified error message.
+ ///
+ /// The message that describes the error.
+ public InvalidDistributionSettingException(string message)
+ : base(message) {}
+
+ ///
+ /// Initializes a new instance of the class with a specified error message
+ /// and a reference to the inner exception that is the cause of this exception.
+ ///
+ /// The error message that explains the reason for the exception.
+ /// The exception that is the cause of the current exception,
+ /// or null if no inner exception is specified.
+ public InvalidDistributionSettingException(string message, Exception innerException) : base(message, innerException) {}
+
+ ///
+ /// Initializes a new instance of with
+ /// serialized data.
+ /// The that holds the serialized
+ /// object data about the exception being thrown.
+ /// The that contains contextual
+ /// information about the source or destination.
+ /// The parameter is
+ /// null.
+ /// The class name is null or
+ /// is zero (0).
+ protected InvalidDistributionSettingException(SerializationInfo info, StreamingContext context) : base(info, context) {}
+ }
+}
\ No newline at end of file
Fisheye: Tag 12168affe49e3702bb66ec40c33e0f2390440cd3 refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.IO/Exceptions/InvalidDistributionSettingsException.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Common/src/Ringtoets.Common.IO/Ringtoets.Common.IO.csproj
===================================================================
diff -u -r7b4aa1ece31359b16a450b043a66a767265615d5 -r12168affe49e3702bb66ec40c33e0f2390440cd3
--- Ringtoets/Common/src/Ringtoets.Common.IO/Ringtoets.Common.IO.csproj (.../Ringtoets.Common.IO.csproj) (revision 7b4aa1ece31359b16a450b043a66a767265615d5)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/Ringtoets.Common.IO.csproj (.../Ringtoets.Common.IO.csproj) (revision 12168affe49e3702bb66ec40c33e0f2390440cd3)
@@ -74,7 +74,7 @@
-
+
Index: Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/DistributionHelper.cs
===================================================================
diff -u -r8edf96cdf0db44770c331cff467de51de992941b -r12168affe49e3702bb66ec40c33e0f2390440cd3
--- Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/DistributionHelper.cs (.../DistributionHelper.cs) (revision 8edf96cdf0db44770c331cff467de51de992941b)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/DistributionHelper.cs (.../DistributionHelper.cs) (revision 12168affe49e3702bb66ec40c33e0f2390440cd3)
@@ -41,7 +41,7 @@
/// The name of the parameter to be validated.
/// Thrown when
/// is null.
- /// Thrown when the parameter is not a
+ /// Thrown when the parameter is not a
/// log normal distribution with a zero shift.
public static void ValidateLogNormalDistribution(long? distributionType, double shift, string parameterName)
{
@@ -53,13 +53,13 @@
if (distributionType.HasValue)
{
if (distributionType.Value != SoilLayerConstants.LogNormalDistributionValue)
- throw new InvalidDistributionSettingsException(string.Format(
+ throw new InvalidDistributionSettingException(string.Format(
Resources.Stochastic_parameter_0_must_be_a_lognormal_distribution,
parameterName));
if (Math.Abs(shift) > tolerance)
{
- throw new InvalidDistributionSettingsException(string.Format(
+ throw new InvalidDistributionSettingException(string.Format(
Resources.Stochastic_parameter_0_must_be_a_lognormal_distribution_with_zero_shift,
parameterName));
}
@@ -73,7 +73,7 @@
/// The name of the parameter to be validated.
/// Thrown when
/// is null.
- /// Thrown when the parameter is not a
+ /// Thrown when the parameter is not a
/// log normal distribution.
public static void ValidateShiftedLogNormalDistribution(long? distributionType, string parameterName)
{
@@ -84,7 +84,7 @@
if (distributionType.HasValue && distributionType != SoilLayerConstants.LogNormalDistributionValue)
{
- throw new InvalidDistributionSettingsException(string.Format(
+ throw new InvalidDistributionSettingException(string.Format(
Resources.Stochastic_parameter_0_has_no_shifted_lognormal_distribution,
parameterName));
}
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/Exceptions/InvalidDistributionSettingExceptionTest.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/Exceptions/InvalidDistributionSettingExceptionTest.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/Exceptions/InvalidDistributionSettingExceptionTest.cs (revision 12168affe49e3702bb66ec40c33e0f2390440cd3)
@@ -0,0 +1,32 @@
+// Copyright (C) Stichting Deltares 2017. 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 System;
+using Core.Common.TestUtil;
+using NUnit.Framework;
+using Ringtoets.Common.IO.Exceptions;
+
+namespace Ringtoets.Common.IO.Test.Exceptions
+{
+ [TestFixture]
+ public class InvalidDistributionSettingExceptionTest :
+ CustomExceptionDesignGuidelinesTestFixture {}
+}
\ No newline at end of file
Fisheye: Tag 12168affe49e3702bb66ec40c33e0f2390440cd3 refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.IO.Test/Exceptions/InvalidDistributionSettingsExceptionTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/Ringtoets.Common.IO.Test.csproj
===================================================================
diff -u -r7b4aa1ece31359b16a450b043a66a767265615d5 -r12168affe49e3702bb66ec40c33e0f2390440cd3
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/Ringtoets.Common.IO.Test.csproj (.../Ringtoets.Common.IO.Test.csproj) (revision 7b4aa1ece31359b16a450b043a66a767265615d5)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/Ringtoets.Common.IO.Test.csproj (.../Ringtoets.Common.IO.Test.csproj) (revision 12168affe49e3702bb66ec40c33e0f2390440cd3)
@@ -79,7 +79,7 @@
-
+
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/SoilProfile/DistributionHelperTest.cs
===================================================================
diff -u -r8edf96cdf0db44770c331cff467de51de992941b -r12168affe49e3702bb66ec40c33e0f2390440cd3
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/SoilProfile/DistributionHelperTest.cs (.../DistributionHelperTest.cs) (revision 8edf96cdf0db44770c331cff467de51de992941b)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/SoilProfile/DistributionHelperTest.cs (.../DistributionHelperTest.cs) (revision 12168affe49e3702bb66ec40c33e0f2390440cd3)
@@ -63,7 +63,7 @@
parameterName);
// Assert
- var exception = Assert.Throws(call);
+ var exception = Assert.Throws(call);
Assert.AreEqual($"Parameter '{parameterName}' moet lognormaal verdeeld zijn.", exception.Message);
}
@@ -83,7 +83,7 @@
parameterName);
// Assert
- var exception = Assert.Throws(call);
+ var exception = Assert.Throws(call);
Assert.AreEqual($"Parameter '{parameterName}' moet lognormaal verdeeld zijn met een verschuiving gelijk aan 0.", exception.Message);
}
@@ -148,7 +148,7 @@
parameterName);
// Assert
- var exception = Assert.Throws(call);
+ var exception = Assert.Throws(call);
Assert.AreEqual($"Parameter '{parameterName}' moet verschoven lognormaal verdeeld zijn.", exception.Message);
}
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsPreconsolidationStressTransformer.cs
===================================================================
diff -u -r8edf96cdf0db44770c331cff467de51de992941b -r12168affe49e3702bb66ec40c33e0f2390440cd3
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsPreconsolidationStressTransformer.cs (.../MacroStabilityInwardsPreconsolidationStressTransformer.cs) (revision 8edf96cdf0db44770c331cff467de51de992941b)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsPreconsolidationStressTransformer.cs (.../MacroStabilityInwardsPreconsolidationStressTransformer.cs) (revision 12168affe49e3702bb66ec40c33e0f2390440cd3)
@@ -71,7 +71,7 @@
return new MacroStabilityInwardsPreconsolidationStress(location, distribution);
}
- catch (InvalidDistributionSettingsException e)
+ catch (InvalidDistributionSettingException e)
{
string errorMessage = CreateErrorMessage(location, e.Message);
throw new ImportedDataTransformException(errorMessage, e);
@@ -99,7 +99,7 @@
/// are correct for creating the log normal distribution of a preconsolidation stress.
///
/// The to validate.
- /// Thrown when the stochastic parameters
+ /// Thrown when the stochastic parameters
/// are not defined as a log normal distribution.
private static void ValidateDistribution(PreconsolidationStress preconsolidationStress)
{
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsSoilLayerTransformer.cs
===================================================================
diff -u -r8edf96cdf0db44770c331cff467de51de992941b -r12168affe49e3702bb66ec40c33e0f2390440cd3
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsSoilLayerTransformer.cs (.../MacroStabilityInwardsSoilLayerTransformer.cs) (revision 8edf96cdf0db44770c331cff467de51de992941b)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsSoilLayerTransformer.cs (.../MacroStabilityInwardsSoilLayerTransformer.cs) (revision 12168affe49e3702bb66ec40c33e0f2390440cd3)
@@ -367,7 +367,7 @@
soilLayer.PopShift,
Resources.SoilLayerData_PopDistribution_DisplayName);
}
- catch (InvalidDistributionSettingsException e)
+ catch (InvalidDistributionSettingException e)
{
string exceptionMessage = CreateErrorMessage(soilLayer.MaterialName, e.Message);
throw new ImportedDataTransformException(exceptionMessage, e);
Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfiles/PipingSoilLayerTransformer.cs
===================================================================
diff -u -r8edf96cdf0db44770c331cff467de51de992941b -r12168affe49e3702bb66ec40c33e0f2390440cd3
--- Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfiles/PipingSoilLayerTransformer.cs (.../PipingSoilLayerTransformer.cs) (revision 8edf96cdf0db44770c331cff467de51de992941b)
+++ Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfiles/PipingSoilLayerTransformer.cs (.../PipingSoilLayerTransformer.cs) (revision 12168affe49e3702bb66ec40c33e0f2390440cd3)
@@ -172,7 +172,7 @@
soilLayer.PermeabilityShift,
Resources.SoilLayer_PermeabilityDistribution_DisplayName);
}
- catch (InvalidDistributionSettingsException e)
+ catch (InvalidDistributionSettingException e)
{
string errorMessage = CreateExceptionMessage(soilLayer.MaterialName,
e.Message);