Index: Ringtoets/Common/src/Ringtoets.Common.Data/Contribution/FailureMechanismContribution.cs
===================================================================
diff -u -r0b02d2f718cbc5c039f130a0243fe12eb5674a31 -rb726f712c5614827e9bfa8041ee40071e02be3b9
--- Ringtoets/Common/src/Ringtoets.Common.Data/Contribution/FailureMechanismContribution.cs (.../FailureMechanismContribution.cs) (revision 0b02d2f718cbc5c039f130a0243fe12eb5674a31)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Contribution/FailureMechanismContribution.cs (.../FailureMechanismContribution.cs) (revision b726f712c5614827e9bfa8041ee40071e02be3b9)
@@ -61,6 +61,7 @@
Norm = defaultNorm;
SignalingNorm = defaultNorm;
LowerLimitNorm = defaultNorm;
+ NormType = NormType.LowerLimit;
UpdateContributions(failureMechanisms, otherContribution);
}
@@ -96,6 +97,11 @@
}
///
+ /// Gets or sets the norm type which has been defined on the assessment section.
+ ///
+ public NormType NormType { get; set; }
+
+ ///
/// Gets the distribution of failure mechanism contributions.
///
public IEnumerable Distribution
Index: Ringtoets/Common/src/Ringtoets.Common.Data/Contribution/NormType.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Data/Contribution/NormType.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Contribution/NormType.cs (revision b726f712c5614827e9bfa8041ee40071e02be3b9)
@@ -0,0 +1,44 @@
+// 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 Core.Common.Utils.Attributes;
+using Ringtoets.Common.Data.Properties;
+
+namespace Ringtoets.Common.Data.Contribution
+{
+ ///
+ /// Describes the norm types used in .
+ ///
+ public enum NormType
+ {
+ ///
+ /// The lower limit norm type.
+ ///
+ [ResourcesDisplayName(typeof(Resources), nameof(Resources.NormType_LowerLimit_DisplayName))]
+ LowerLimit = 1,
+
+ ///
+ /// The signaling norm type.
+ ///
+ [ResourcesDisplayName(typeof(Resources), nameof(Resources.NormType_Signaling_DisplayName))]
+ Signaling = 2
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs
===================================================================
diff -u -rfc7fef209ce94b913bf4bfb974abd71242b4769d -rb726f712c5614827e9bfa8041ee40071e02be3b9
--- Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision fc7fef209ce94b913bf4bfb974abd71242b4769d)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision b726f712c5614827e9bfa8041ee40071e02be3b9)
@@ -645,6 +645,24 @@
}
///
+ /// Looks up a localized string similar to Ondergrens.
+ ///
+ public static string NormType_LowerLimit_DisplayName {
+ get {
+ return ResourceManager.GetString("NormType_LowerLimit_DisplayName", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Signaleringswaarde.
+ ///
+ public static string NormType_Signaling_DisplayName {
+ get {
+ return ResourceManager.GetString("NormType_Signaling_DisplayName", resourceCulture);
+ }
+ }
+
+ ///
/// Looks up a localized string similar to De waarde voor de oriëntatie moet in het bereik {0} liggen..
///
public static string Orientation_Value_needs_to_be_in_Range_0_ {
Index: Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx
===================================================================
diff -u -rfc7fef209ce94b913bf4bfb974abd71242b4769d -rb726f712c5614827e9bfa8041ee40071e02be3b9
--- Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx (.../Resources.resx) (revision fc7fef209ce94b913bf4bfb974abd71242b4769d)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx (.../Resources.resx) (revision b726f712c5614827e9bfa8041ee40071e02be3b9)
@@ -366,4 +366,10 @@
De geometrie bevat geen punt op locatie {0} om als '{1}' in te stellen.
+
+ Ondergrens
+
+
+ Signaleringswaarde
+
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj
===================================================================
diff -u -raabaa33e54f9ebb10c850d7d8964dc0a692e5535 -rb726f712c5614827e9bfa8041ee40071e02be3b9
--- Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision aabaa33e54f9ebb10c850d7d8964dc0a692e5535)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision b726f712c5614827e9bfa8041ee40071e02be3b9)
@@ -49,6 +49,7 @@
+
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Contribution/FailureMechanismContributionTest.cs
===================================================================
diff -u -r0b02d2f718cbc5c039f130a0243fe12eb5674a31 -rb726f712c5614827e9bfa8041ee40071e02be3b9
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Contribution/FailureMechanismContributionTest.cs (.../FailureMechanismContributionTest.cs) (revision 0b02d2f718cbc5c039f130a0243fe12eb5674a31)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Contribution/FailureMechanismContributionTest.cs (.../FailureMechanismContributionTest.cs) (revision b726f712c5614827e9bfa8041ee40071e02be3b9)
@@ -115,6 +115,7 @@
Assert.AreEqual(norm, result.Norm);
Assert.AreEqual(norm, result.SignalingNorm);
Assert.AreEqual(norm, result.LowerLimitNorm);
+ Assert.AreEqual(NormType.LowerLimit, result.NormType);
}
[Test]
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Contribution/NormTypeTest.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Contribution/NormTypeTest.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Contribution/NormTypeTest.cs (revision b726f712c5614827e9bfa8041ee40071e02be3b9)
@@ -0,0 +1,64 @@
+// 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.Collections.Generic;
+using Core.Common.TestUtil;
+using NUnit.Framework;
+using Ringtoets.Common.Data.Contribution;
+
+namespace Ringtoets.Common.Data.Test.Contribution
+{
+ [TestFixture]
+ public class NormTypeTest : EnumTestFixture
+ {
+ protected override IDictionary ExpectedDisplayNameForEnumValues
+ {
+ get
+ {
+ return new Dictionary
+ {
+ {
+ NormType.LowerLimit, "Ondergrens"
+ },
+ {
+ NormType.Signaling, "Signaleringswaarde"
+ }
+ };
+ }
+ }
+
+ protected override IDictionary ExpectedValueForEnumValues
+ {
+ get
+ {
+ return new Dictionary
+ {
+ {
+ NormType.LowerLimit, 1
+ },
+ {
+ NormType.Signaling, 2
+ }
+ };
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj
===================================================================
diff -u -red125eab861825fb053bf64259d38f33599087a9 -rb726f712c5614827e9bfa8041ee40071e02be3b9
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision ed125eab861825fb053bf64259d38f33599087a9)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision b726f712c5614827e9bfa8041ee40071e02be3b9)
@@ -63,6 +63,7 @@
+