Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/ClosingStructureFailureMechanismSectionResultCreateExtensions.cs
===================================================================
diff -u -r1cd3618f5f8916ef15992d69ec3b447b311c2f72 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/ClosingStructureFailureMechanismSectionResultCreateExtensions.cs (.../ClosingStructureFailureMechanismSectionResultCreateExtensions.cs) (revision 1cd3618f5f8916ef15992d69ec3b447b311c2f72)
+++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/ClosingStructureFailureMechanismSectionResultCreateExtensions.cs (.../ClosingStructureFailureMechanismSectionResultCreateExtensions.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -47,7 +47,7 @@
var sectionResultEntity = new ClosingStructureSectionResultEntity
{
LayerOne = Convert.ToByte(result.AssessmentLayerOne),
- LayerTwoA = result.AssessmentLayerTwoA.Value.ToNullableDecimal(),
+ LayerTwoA = result.AssessmentLayerTwoA.ToNullableDecimal(),
LayerThree = result.AssessmentLayerThree.Value.ToNullableDecimal()
};
Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacrostabilityInwardsFailureMechanismSectionResultCreateExtensions.cs
===================================================================
diff -u -rb4816e19c7167c26fad825b88dd72b59dcedc13a -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacrostabilityInwardsFailureMechanismSectionResultCreateExtensions.cs (.../MacrostabilityInwardsFailureMechanismSectionResultCreateExtensions.cs) (revision b4816e19c7167c26fad825b88dd72b59dcedc13a)
+++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacrostabilityInwardsFailureMechanismSectionResultCreateExtensions.cs (.../MacrostabilityInwardsFailureMechanismSectionResultCreateExtensions.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -47,7 +47,7 @@
var sectionResultEntity = new MacrostabilityInwardsSectionResultEntity
{
LayerOne = Convert.ToByte(result.AssessmentLayerOne),
- LayerTwoA = result.AssessmentLayerTwoA.Value.ToNullableDecimal(),
+ LayerTwoA = result.AssessmentLayerTwoA.ToNullableDecimal(),
LayerThree = result.AssessmentLayerThree.Value.ToNullableDecimal()
};
Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacrostabilityOutwardsFailureMechanismSectionResultCreateExtensions.cs
===================================================================
diff -u -rb4816e19c7167c26fad825b88dd72b59dcedc13a -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacrostabilityOutwardsFailureMechanismSectionResultCreateExtensions.cs (.../MacrostabilityOutwardsFailureMechanismSectionResultCreateExtensions.cs) (revision b4816e19c7167c26fad825b88dd72b59dcedc13a)
+++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacrostabilityOutwardsFailureMechanismSectionResultCreateExtensions.cs (.../MacrostabilityOutwardsFailureMechanismSectionResultCreateExtensions.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -47,7 +47,7 @@
var sectionResultEntity = new MacrostabilityOutwardsSectionResultEntity
{
LayerOne = Convert.ToByte(result.AssessmentLayerOne),
- LayerTwoA = result.AssessmentLayerTwoA.Value.ToNullableDecimal(),
+ LayerTwoA = result.AssessmentLayerTwoA.ToNullableDecimal(),
LayerThree = result.AssessmentLayerThree.Value.ToNullableDecimal()
};
Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/StrengthStabilityPointConstructionFailureMechanismSectionResultCreateExtensions.cs
===================================================================
diff -u -r8a15fe6e429a0f177f25defaf1851c9963374dbe -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/StrengthStabilityPointConstructionFailureMechanismSectionResultCreateExtensions.cs (.../StrengthStabilityPointConstructionFailureMechanismSectionResultCreateExtensions.cs) (revision 8a15fe6e429a0f177f25defaf1851c9963374dbe)
+++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/StrengthStabilityPointConstructionFailureMechanismSectionResultCreateExtensions.cs (.../StrengthStabilityPointConstructionFailureMechanismSectionResultCreateExtensions.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -46,7 +46,7 @@
}
var sectionResultEntity = new StrengthStabilityPointConstructionSectionResultEntity
{
- LayerTwoA = result.AssessmentLayerTwoA.Value.ToNullableDecimal(),
+ LayerTwoA = result.AssessmentLayerTwoA.ToNullableDecimal(),
LayerThree = result.AssessmentLayerThree.Value.ToNullableDecimal()
};
Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Update/ClosingStructureFailureMechanismSectionResultUpdateExtensions.cs
===================================================================
diff -u -r3ef137de1d07bfecd17f0b415d895995d8b2d7b7 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Application/Ringtoets/src/Application.Ringtoets.Storage/Update/ClosingStructureFailureMechanismSectionResultUpdateExtensions.cs (.../ClosingStructureFailureMechanismSectionResultUpdateExtensions.cs) (revision 3ef137de1d07bfecd17f0b415d895995d8b2d7b7)
+++ Application/Ringtoets/src/Application.Ringtoets.Storage/Update/ClosingStructureFailureMechanismSectionResultUpdateExtensions.cs (.../ClosingStructureFailureMechanismSectionResultUpdateExtensions.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -63,7 +63,7 @@
s => s.ClosingStructureSectionResultEntityId);
entity.LayerOne = Convert.ToByte(result.AssessmentLayerOne);
- entity.LayerTwoA = result.AssessmentLayerTwoA.Value.ToNullableDecimal();
+ entity.LayerTwoA = result.AssessmentLayerTwoA.ToNullableDecimal();
entity.LayerThree = result.AssessmentLayerThree.Value.ToNullableDecimal();
registry.Register(entity, result);
Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Update/MacrostabilityInwardsFailureMechanismSectionResultUpdateExtensions.cs
===================================================================
diff -u -r3ef137de1d07bfecd17f0b415d895995d8b2d7b7 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Application/Ringtoets/src/Application.Ringtoets.Storage/Update/MacrostabilityInwardsFailureMechanismSectionResultUpdateExtensions.cs (.../MacrostabilityInwardsFailureMechanismSectionResultUpdateExtensions.cs) (revision 3ef137de1d07bfecd17f0b415d895995d8b2d7b7)
+++ Application/Ringtoets/src/Application.Ringtoets.Storage/Update/MacrostabilityInwardsFailureMechanismSectionResultUpdateExtensions.cs (.../MacrostabilityInwardsFailureMechanismSectionResultUpdateExtensions.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -63,7 +63,7 @@
s => s.MacrostabilityInwardsSectionResultEntityId);
entity.LayerOne = Convert.ToByte(result.AssessmentLayerOne);
- entity.LayerTwoA = result.AssessmentLayerTwoA.Value.ToNullableDecimal();
+ entity.LayerTwoA = result.AssessmentLayerTwoA.ToNullableDecimal();
entity.LayerThree = result.AssessmentLayerThree.Value.ToNullableDecimal();
registry.Register(entity, result);
Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Update/MacrostabilityOutwardsFailureMechanismSectionResultUpdateExtensions.cs
===================================================================
diff -u -r3ef137de1d07bfecd17f0b415d895995d8b2d7b7 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Application/Ringtoets/src/Application.Ringtoets.Storage/Update/MacrostabilityOutwardsFailureMechanismSectionResultUpdateExtensions.cs (.../MacrostabilityOutwardsFailureMechanismSectionResultUpdateExtensions.cs) (revision 3ef137de1d07bfecd17f0b415d895995d8b2d7b7)
+++ Application/Ringtoets/src/Application.Ringtoets.Storage/Update/MacrostabilityOutwardsFailureMechanismSectionResultUpdateExtensions.cs (.../MacrostabilityOutwardsFailureMechanismSectionResultUpdateExtensions.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -63,7 +63,7 @@
s => s.MacrostabilityOutwardsSectionResultEntityId);
entity.LayerOne = Convert.ToByte(result.AssessmentLayerOne);
- entity.LayerTwoA = result.AssessmentLayerTwoA.Value.ToNullableDecimal();
+ entity.LayerTwoA = result.AssessmentLayerTwoA.ToNullableDecimal();
entity.LayerThree = result.AssessmentLayerThree.Value.ToNullableDecimal();
registry.Register(entity, result);
Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Update/StrengthStabilityPointConstructionFailureMechanismSectionResultUpdateExtensions.cs
===================================================================
diff -u -r3ef137de1d07bfecd17f0b415d895995d8b2d7b7 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Application/Ringtoets/src/Application.Ringtoets.Storage/Update/StrengthStabilityPointConstructionFailureMechanismSectionResultUpdateExtensions.cs (.../StrengthStabilityPointConstructionFailureMechanismSectionResultUpdateExtensions.cs) (revision 3ef137de1d07bfecd17f0b415d895995d8b2d7b7)
+++ Application/Ringtoets/src/Application.Ringtoets.Storage/Update/StrengthStabilityPointConstructionFailureMechanismSectionResultUpdateExtensions.cs (.../StrengthStabilityPointConstructionFailureMechanismSectionResultUpdateExtensions.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -62,7 +62,7 @@
context.StrengthStabilityPointConstructionSectionResultEntities,
s => s.StrengthStabilityPointConstructionSectionResultEntityId);
- entity.LayerTwoA = result.AssessmentLayerTwoA.Value.ToNullableDecimal();
+ entity.LayerTwoA = result.AssessmentLayerTwoA.ToNullableDecimal();
entity.LayerThree = result.AssessmentLayerThree.Value.ToNullableDecimal();
registry.Register(entity, result);
Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Update/ClosingStructureFailureMechanismSectionResultUpdateExtensionsTest.cs
===================================================================
diff -u -r3ef137de1d07bfecd17f0b415d895995d8b2d7b7 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Update/ClosingStructureFailureMechanismSectionResultUpdateExtensionsTest.cs (.../ClosingStructureFailureMechanismSectionResultUpdateExtensionsTest.cs) (revision 3ef137de1d07bfecd17f0b415d895995d8b2d7b7)
+++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Update/ClosingStructureFailureMechanismSectionResultUpdateExtensionsTest.cs (.../ClosingStructureFailureMechanismSectionResultUpdateExtensionsTest.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -153,7 +153,7 @@
// Assert
Assert.AreEqual(Convert.ToByte(true), sectionResultEntity.LayerOne);
- Assert.AreEqual(sectionResult.AssessmentLayerTwoA.Value.ToNullableDecimal(), sectionResultEntity.LayerTwoA);
+ Assert.AreEqual(sectionResult.AssessmentLayerTwoA.ToNullableDecimal(), sectionResultEntity.LayerTwoA);
Assert.AreEqual(sectionResult.AssessmentLayerThree.Value.ToNullableDecimal(), sectionResultEntity.LayerThree);
mocks.VerifyAll();
Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Update/MacrostabilityInwardsFailureMechanismSectionResultUpdateExtensionsTest.cs
===================================================================
diff -u -r3ef137de1d07bfecd17f0b415d895995d8b2d7b7 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Update/MacrostabilityInwardsFailureMechanismSectionResultUpdateExtensionsTest.cs (.../MacrostabilityInwardsFailureMechanismSectionResultUpdateExtensionsTest.cs) (revision 3ef137de1d07bfecd17f0b415d895995d8b2d7b7)
+++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Update/MacrostabilityInwardsFailureMechanismSectionResultUpdateExtensionsTest.cs (.../MacrostabilityInwardsFailureMechanismSectionResultUpdateExtensionsTest.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -153,7 +153,7 @@
// Assert
Assert.AreEqual(Convert.ToByte(true), sectionResultEntity.LayerOne);
- Assert.AreEqual(sectionResult.AssessmentLayerTwoA.Value.ToNullableDecimal(), sectionResultEntity.LayerTwoA);
+ Assert.AreEqual(sectionResult.AssessmentLayerTwoA.ToNullableDecimal(), sectionResultEntity.LayerTwoA);
Assert.AreEqual(sectionResult.AssessmentLayerThree.Value.ToNullableDecimal(), sectionResultEntity.LayerThree);
mocks.VerifyAll();
Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Update/MacrostabilityOutwardsFailureMechanismSectionResultUpdateExtensionsTest.cs
===================================================================
diff -u -r3ef137de1d07bfecd17f0b415d895995d8b2d7b7 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Update/MacrostabilityOutwardsFailureMechanismSectionResultUpdateExtensionsTest.cs (.../MacrostabilityOutwardsFailureMechanismSectionResultUpdateExtensionsTest.cs) (revision 3ef137de1d07bfecd17f0b415d895995d8b2d7b7)
+++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Update/MacrostabilityOutwardsFailureMechanismSectionResultUpdateExtensionsTest.cs (.../MacrostabilityOutwardsFailureMechanismSectionResultUpdateExtensionsTest.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -153,7 +153,7 @@
// Assert
Assert.AreEqual(Convert.ToByte(true), sectionResultEntity.LayerOne);
- Assert.AreEqual(sectionResult.AssessmentLayerTwoA.Value.ToNullableDecimal(), sectionResultEntity.LayerTwoA);
+ Assert.AreEqual(sectionResult.AssessmentLayerTwoA.ToNullableDecimal(), sectionResultEntity.LayerTwoA);
Assert.AreEqual(sectionResult.AssessmentLayerThree.Value.ToNullableDecimal(), sectionResultEntity.LayerThree);
mocks.VerifyAll();
Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Update/StrengthStabilityPointConstructionFailureMechanismSectionResultUpdateExtensionsTest.cs
===================================================================
diff -u -r3ef137de1d07bfecd17f0b415d895995d8b2d7b7 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Update/StrengthStabilityPointConstructionFailureMechanismSectionResultUpdateExtensionsTest.cs (.../StrengthStabilityPointConstructionFailureMechanismSectionResultUpdateExtensionsTest.cs) (revision 3ef137de1d07bfecd17f0b415d895995d8b2d7b7)
+++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Update/StrengthStabilityPointConstructionFailureMechanismSectionResultUpdateExtensionsTest.cs (.../StrengthStabilityPointConstructionFailureMechanismSectionResultUpdateExtensionsTest.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -150,7 +150,7 @@
sectionResult.Update(new PersistenceRegistry(), ringtoetsEntities);
// Assert
- Assert.AreEqual(sectionResult.AssessmentLayerTwoA.Value.ToNullableDecimal(), sectionResultEntity.LayerTwoA);
+ Assert.AreEqual(sectionResult.AssessmentLayerTwoA.ToNullableDecimal(), sectionResultEntity.LayerTwoA);
Assert.AreEqual(sectionResult.AssessmentLayerThree.Value.ToNullableDecimal(), sectionResultEntity.LayerThree);
mocks.VerifyAll();
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj (.../Ringtoets.Common.Forms.csproj) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj (.../Ringtoets.Common.Forms.csproj) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -72,7 +72,7 @@
-
+
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/TypeConverters/FailureMechanismSectionResultNoProbabilityValueDoubleConverter.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Forms/TypeConverters/FailureMechanismSectionResultNoProbabilityValueDoubleConverter.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/TypeConverters/FailureMechanismSectionResultNoProbabilityValueDoubleConverter.cs (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -0,0 +1,102 @@
+// Copyright (C) Stichting Deltares 2016. 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.ComponentModel;
+using System.Globalization;
+
+using Core.Common.Base.Data;
+
+using Ringtoets.Common.Forms.Helpers;
+using Ringtoets.Common.Forms.Properties;
+
+using CommonBaseResources = Core.Common.Base.Properties.Resources;
+
+namespace Ringtoets.Common.Forms.TypeConverters
+{
+ ///
+ /// This class is a variant of ,
+ /// intended to display probabilities with values instead of general
+ /// variables.
+ ///
+ public class FailureMechanismSectionResultNoProbabilityValueDoubleConverter : TypeConverter
+ {
+ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
+ {
+ var doubleValue = (double)value;
+ if (destinationType == typeof(string))
+ {
+ if (double.IsNaN(doubleValue))
+ {
+ return Resources.FailureMechanismSectionResult_No_result_dash;
+ }
+ if (double.IsNegativeInfinity(doubleValue))
+ {
+ return CommonBaseResources.RoundedDouble_ToString_NegativeInfinity;
+ }
+ if (double.IsPositiveInfinity(doubleValue))
+ {
+ return CommonBaseResources.RoundedDouble_ToString_PositiveInfinity;
+ }
+
+ return ProbabilityFormattingHelper.Format(doubleValue);
+ }
+ return base.ConvertTo(context, culture, value, destinationType);
+ }
+
+ public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
+ {
+ var text = value as string;
+ if (text != null)
+ {
+ if (string.IsNullOrWhiteSpace(text) || text.Trim() == Resources.FailureMechanismSectionResult_No_result_dash)
+ {
+ return double.NaN;
+ }
+
+ try
+ {
+ return Convert.ToDouble(text);
+ }
+ catch (FormatException exception)
+ {
+ throw new NotSupportedException(CommonBaseResources.RoundedDoubleConverter_ConvertFrom_String_must_represent_number,
+ exception);
+ }
+ catch (OverflowException exception)
+ {
+ throw new NotSupportedException(CommonBaseResources.RoundedDoubleConverter_ConvertFrom_String_too_small_or_too_big_to_represent_as_double,
+ exception);
+ }
+ }
+ return base.ConvertFrom(context, culture, value);
+ }
+
+ public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
+ {
+ if (sourceType == typeof(string))
+ {
+ return true;
+ }
+ return base.CanConvertFrom(context, sourceType);
+ }
+ }
+}
\ No newline at end of file
Fisheye: Tag 9d7a5bd6246ec71a14f1944516d21e06954243f7 refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.Forms/TypeConverters/FailureMechanismSectionResultNoProbabilityValueRoundedDoubleConverter.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Ringtoets.Common.Forms.Test.csproj
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Ringtoets.Common.Forms.Test.csproj (.../Ringtoets.Common.Forms.Test.csproj) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Ringtoets.Common.Forms.Test.csproj (.../Ringtoets.Common.Forms.Test.csproj) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -76,7 +76,7 @@
-
+
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TypeConverters/FailureMechanismSectionResultNoProbabilityValueDoubleConverterTest.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TypeConverters/FailureMechanismSectionResultNoProbabilityValueDoubleConverterTest.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TypeConverters/FailureMechanismSectionResultNoProbabilityValueDoubleConverterTest.cs (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -0,0 +1,281 @@
+// Copyright (C) Stichting Deltares 2016. 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.ComponentModel;
+using System.Globalization;
+
+using NUnit.Framework;
+
+using Ringtoets.Common.Forms.Helpers;
+using Ringtoets.Common.Forms.TypeConverters;
+using CommonBaseResources = Core.Common.Base.Properties.Resources;
+
+namespace Ringtoets.Common.Forms.Test.TypeConverters
+{
+ [TestFixture]
+ public class FailureMechanismSectionResultNoProbabilityValueDoubleConverterTest
+ {
+ [Test]
+ public void Constructor_ExpectedValues()
+ {
+ // Call
+ var converter = new FailureMechanismSectionResultNoProbabilityValueDoubleConverter();
+
+ // Assert
+ Assert.IsInstanceOf(converter);
+ }
+
+ [Test]
+ public void CanConvertFrom_String_ReturnTrue()
+ {
+ // Setup
+ var converter = new FailureMechanismSectionResultNoProbabilityValueDoubleConverter();
+
+ // Call
+ bool canConvertFromString = converter.CanConvertFrom(typeof(string));
+
+ // Assert
+ Assert.IsTrue(canConvertFromString);
+ }
+
+ [Test]
+ public void CanConvertFrom_OtherThenString_ReturnFalse()
+ {
+ // Setup
+ var converter = new FailureMechanismSectionResultNoProbabilityValueDoubleConverter();
+
+ // Call
+ bool canConvertFromString = converter.CanConvertFrom(typeof(object));
+
+ // Assert
+ Assert.IsFalse(canConvertFromString);
+ }
+
+ [Test]
+ public void ConvertFrom_Object_ThrowNotSupportedException()
+ {
+ // Setup
+ var converter = new FailureMechanismSectionResultNoProbabilityValueDoubleConverter();
+
+ // Call
+ TestDelegate call = () => converter.ConvertFrom(new object());
+
+ // Assert
+ Assert.Throws(call);
+ }
+
+ [Test]
+ [TestCase("")]
+ [TestCase(" ")]
+ [TestCase("-")]
+ [TestCase("NaN")]
+ public void ConvertFrom_NoValueText_ReturnNaN(string text)
+ {
+ // Setup
+ var converter = new FailureMechanismSectionResultNoProbabilityValueDoubleConverter();
+
+ // Call
+ var result = (double)converter.ConvertFrom(text);
+
+ // Assert
+ Assert.IsNaN(result);
+ }
+
+ [Test]
+ [SetCulture("nl-NL")]
+ [TestCase(123.4567)]
+ [TestCase(-9.87654321)]
+ public void ConvertFrom_SomeNumericalTextInDutchCulture_ReturnConvertedRoundedDouble(double input)
+ {
+ DoConvertFrom_SomeNumericalTextInCurrentCulture_ReturnConvertedRoundedDouble(input);
+ }
+
+ [Test]
+ [SetCulture("en-US")]
+ [TestCase(12.34)]
+ [TestCase(-0.96834715)]
+ public void ConvertFrom_SomeNumericalTextInEnglishCulture_ReturnConvertedRoundedDouble(double input)
+ {
+ DoConvertFrom_SomeNumericalTextInCurrentCulture_ReturnConvertedRoundedDouble(input);
+ }
+
+ [Test]
+ public void ConvertFrom_TextDoesNotRepresentNumber_ThrowNotSupportedException()
+ {
+ // Setup
+ string text = "I'm not a number!";
+
+ var converter = new FailureMechanismSectionResultNoProbabilityValueDoubleConverter();
+
+ // Call
+ TestDelegate call = () => converter.ConvertFrom(null, CultureInfo.CurrentCulture, text);
+
+ // Assert
+ string message = Assert.Throws(call).Message;
+ Assert.AreEqual("De tekst moet een getal zijn.", message);
+ }
+
+ [Test]
+ public void ConvertFrom_TextTooLongToStoreInDouble_ThrowNotSupportedException()
+ {
+ // Setup
+ string text = "1" + double.MaxValue.ToString(CultureInfo.CurrentCulture);
+
+ var converter = new FailureMechanismSectionResultNoProbabilityValueDoubleConverter();
+
+ // Call
+ TestDelegate call = () => converter.ConvertFrom(null, CultureInfo.CurrentCulture, text);
+
+ // Assert
+ string message = Assert.Throws(call).Message;
+ Assert.AreEqual("De tekst is een getal dat te groot of te klein is om gerepresenteerd te worden.", message);
+ }
+
+ [Test]
+ public void CanConvertTo_ToString_ReturnTrue()
+ {
+ // Setup
+ var converter = new FailureMechanismSectionResultNoProbabilityValueDoubleConverter();
+
+ // Call
+ bool canConvertToString = converter.CanConvertTo(typeof(string));
+
+ // Assert
+ Assert.IsTrue(canConvertToString);
+ }
+
+ [Test]
+ public void CanConvertTo_ToObject_ReturnFalse()
+ {
+ // Setup
+ var converter = new FailureMechanismSectionResultNoProbabilityValueDoubleConverter();
+
+ // Call
+ bool canConvertToObject = converter.CanConvertTo(typeof(object));
+
+ // Assert
+ Assert.IsFalse(canConvertToObject);
+ }
+
+ [Test]
+ public void ConvertTo_Object_ThrowNotSupportedException()
+ {
+ // Setup
+ var converter = new FailureMechanismSectionResultNoProbabilityValueDoubleConverter();
+
+ // Call
+ TestDelegate call = () => converter.ConvertTo(1.1, typeof(object));
+
+ // Assert
+ Assert.Throws(call);
+ }
+
+ [Test]
+ public void ConvertTo_NaNToString_ReturnHyphen()
+ {
+ // Setup
+ var converter = new FailureMechanismSectionResultNoProbabilityValueDoubleConverter();
+
+ // Call
+ var text = (string)converter.ConvertTo(double.NaN, typeof(string));
+
+ // Assert
+ Assert.AreEqual("-", text);
+ }
+
+ [Test]
+ public void ConvertTo_PositiveInfinityToString_ReturnHyphen()
+ {
+ // Setup
+ var converter = new FailureMechanismSectionResultNoProbabilityValueDoubleConverter();
+
+ // Call
+ var text = (string)converter.ConvertTo(double.PositiveInfinity, typeof(string));
+
+ // Assert
+ Assert.AreEqual("Oneindig", text);
+ }
+
+ [Test]
+ public void ConvertTo_NegativeInfinityToString_ReturnHyphen()
+ {
+ // Setup
+ var converter = new FailureMechanismSectionResultNoProbabilityValueDoubleConverter();
+
+ // Call
+ var text = (string)converter.ConvertTo(double.NegativeInfinity, typeof(string));
+
+ // Assert
+ Assert.AreEqual("-Oneindig", text);
+ }
+
+ [Test]
+ [SetCulture("nl-NL")]
+ [TestCase(-0.000235)]
+ [TestCase(0.0069)]
+ [TestCase(0.000000000000000069)]
+ public void ConvertTo_NumberToString_ReturnStringInLocalDutchCulture(double value)
+ {
+ // Setup
+ var converter = new FailureMechanismSectionResultNoProbabilityValueDoubleConverter();
+
+ // Call
+ var text = (string)converter.ConvertTo(value, typeof(string));
+
+ // Assert
+ string expectedText = ProbabilityFormattingHelper.Format(value);
+ Assert.AreEqual(expectedText, text);
+ }
+
+ [Test]
+ [SetCulture("en-US")]
+ [TestCase(-0.0000658)]
+ [TestCase(0.000006788)]
+ [TestCase(-0.000000000000000069)]
+ public void ConvertTo_NumberToString_ReturnStringInLocalEnglishCulture(double value)
+ {
+ // Setup
+ var converter = new FailureMechanismSectionResultNoProbabilityValueDoubleConverter();
+
+ // Call
+ var text = (string)converter.ConvertTo(value, typeof(string));
+
+ // Assert
+ string expectedText = ProbabilityFormattingHelper.Format(value);
+ Assert.AreEqual(expectedText, text);
+ }
+
+ private static void DoConvertFrom_SomeNumericalTextInCurrentCulture_ReturnConvertedRoundedDouble(double input)
+ {
+ // Setup
+ string text = input.ToString(CultureInfo.CurrentCulture);
+
+ var converter = new FailureMechanismSectionResultNoProbabilityValueDoubleConverter();
+
+ // Call
+ double conversionResult = (double)converter.ConvertFrom(null, CultureInfo.CurrentCulture, text);
+
+ // Assert
+ Assert.AreEqual(input, conversionResult);
+ }
+ }
+}
\ No newline at end of file
Fisheye: Tag 9d7a5bd6246ec71a14f1944516d21e06954243f7 refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TypeConverters/FailureMechanismSectionResultNoProbabilityValueRoundedDoubleConverterTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsFailureMechanismSectionResult.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsFailureMechanismSectionResult.cs (.../GrassCoverErosionInwardsFailureMechanismSectionResult.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsFailureMechanismSectionResult.cs (.../GrassCoverErosionInwardsFailureMechanismSectionResult.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -32,7 +32,7 @@
///
public class GrassCoverErosionInwardsFailureMechanismSectionResult : FailureMechanismSectionResult, IStorable
{
- private readonly RoundedDouble assessmentLayerTwoA;
+ private readonly double assessmentLayerTwoA;
///
/// Creates a new instance of .
@@ -41,14 +41,14 @@
/// Thrown when is null.
public GrassCoverErosionInwardsFailureMechanismSectionResult(FailureMechanismSection section) : base(section)
{
- assessmentLayerTwoA = (RoundedDouble)double.NaN;
+ assessmentLayerTwoA = double.NaN;
AssessmentLayerThree = (RoundedDouble)double.NaN;
}
///
/// Gets the value of assessment layer two a.
///
- public RoundedDouble AssessmentLayerTwoA
+ public double AssessmentLayerTwoA
{
get
{
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsFailureMechanismSectionResultRow.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsFailureMechanismSectionResultRow.cs (.../GrassCoverErosionInwardsFailureMechanismSectionResultRow.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsFailureMechanismSectionResultRow.cs (.../GrassCoverErosionInwardsFailureMechanismSectionResultRow.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -83,8 +83,8 @@
///
/// Gets the value representing the result of the layer 2a assessment.
///
- [TypeConverter(typeof(FailureMechanismSectionResultNoProbabilityValueRoundedDoubleConverter))]
- public RoundedDouble AssessmentLayerTwoA
+ [TypeConverter(typeof(FailureMechanismSectionResultNoProbabilityValueDoubleConverter))]
+ public double AssessmentLayerTwoA
{
get
{
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.cs (.../GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.cs (.../GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -68,7 +68,7 @@
Assert.AreEqual(result.AssessmentLayerThree, row.AssessmentLayerThree);
Assert.IsTrue(TypeUtils.HasTypeConverter(
+ FailureMechanismSectionResultNoProbabilityValueDoubleConverter>(
r => r.AssessmentLayerTwoA));
Assert.IsTrue(TypeUtils.HasTypeConverter(
Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresFailureMechanismSectionResult.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresFailureMechanismSectionResult.cs (.../HeightStructuresFailureMechanismSectionResult.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresFailureMechanismSectionResult.cs (.../HeightStructuresFailureMechanismSectionResult.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -32,7 +32,7 @@
///
public class HeightStructuresFailureMechanismSectionResult : FailureMechanismSectionResult, IStorable
{
- private readonly RoundedDouble assessmentLayerTwoA;
+ private readonly double assessmentLayerTwoA;
///
/// Creates a new instance of .
@@ -41,14 +41,14 @@
/// Thrown when is null.
public HeightStructuresFailureMechanismSectionResult(FailureMechanismSection section) : base(section)
{
- assessmentLayerTwoA = (RoundedDouble)double.NaN;
+ assessmentLayerTwoA = double.NaN;
AssessmentLayerThree = (RoundedDouble)double.NaN;
}
///
/// Gets the value of assessment layer two a.
///
- public RoundedDouble AssessmentLayerTwoA
+ public double AssessmentLayerTwoA
{
get
{
Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Views/HeightStructuresFailureMechanismSectionResultRow.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Views/HeightStructuresFailureMechanismSectionResultRow.cs (.../HeightStructuresFailureMechanismSectionResultRow.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Views/HeightStructuresFailureMechanismSectionResultRow.cs (.../HeightStructuresFailureMechanismSectionResultRow.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -80,8 +80,8 @@
///
/// Gets the assessment layer two a of the .
///
- [TypeConverter(typeof(FailureMechanismSectionResultNoProbabilityValueRoundedDoubleConverter))]
- public RoundedDouble AssessmentLayerTwoA
+ [TypeConverter(typeof(FailureMechanismSectionResultNoProbabilityValueDoubleConverter))]
+ public double AssessmentLayerTwoA
{
get
{
Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismSectionResultRowTest.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismSectionResultRowTest.cs (.../HeightStructuresFailureMechanismSectionResultRowTest.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismSectionResultRowTest.cs (.../HeightStructuresFailureMechanismSectionResultRowTest.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -68,7 +68,7 @@
Assert.AreEqual(result.AssessmentLayerThree, row.AssessmentLayerThree);
Assert.IsTrue(TypeUtils.HasTypeConverter(
+ FailureMechanismSectionResultNoProbabilityValueDoubleConverter>(
r => r.AssessmentLayerTwoA));
Assert.IsTrue(TypeUtils.HasTypeConverter(
Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/SectionResults/ClosingStructureFailureMechanismSectionResult.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/SectionResults/ClosingStructureFailureMechanismSectionResult.cs (.../ClosingStructureFailureMechanismSectionResult.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/SectionResults/ClosingStructureFailureMechanismSectionResult.cs (.../ClosingStructureFailureMechanismSectionResult.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -33,7 +33,7 @@
///
public class ClosingStructureFailureMechanismSectionResult : FailureMechanismSectionResult, IStorable
{
- private RoundedDouble assessmentLayerTwoA;
+ private double assessmentLayerTwoA;
///
/// Creates a new instance of .
@@ -44,7 +44,7 @@
public ClosingStructureFailureMechanismSectionResult(FailureMechanismSection section)
: base(section)
{
- AssessmentLayerTwoA = (RoundedDouble) double.NaN;
+ AssessmentLayerTwoA = double.NaN;
AssessmentLayerThree = (RoundedDouble)double.NaN;
}
@@ -57,7 +57,7 @@
/// Gets or sets the value for the detailed assessment of safety per failure mechanism section as a probability.
///
/// Thrown when is not in range [0,1].
- public RoundedDouble AssessmentLayerTwoA
+ public double AssessmentLayerTwoA
{
get
{
Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/SectionResults/MacrostabilityInwardsFailureMechanismSectionResult.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/SectionResults/MacrostabilityInwardsFailureMechanismSectionResult.cs (.../MacrostabilityInwardsFailureMechanismSectionResult.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/SectionResults/MacrostabilityInwardsFailureMechanismSectionResult.cs (.../MacrostabilityInwardsFailureMechanismSectionResult.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -33,7 +33,7 @@
///
public class MacrostabilityInwardsFailureMechanismSectionResult : FailureMechanismSectionResult, IStorable
{
- private RoundedDouble assessmentLayerTwoA;
+ private double assessmentLayerTwoA;
///
/// Creates a new instance of .
@@ -44,7 +44,7 @@
public MacrostabilityInwardsFailureMechanismSectionResult(FailureMechanismSection section)
: base(section)
{
- AssessmentLayerTwoA = (RoundedDouble)double.NaN;
+ AssessmentLayerTwoA = double.NaN;
AssessmentLayerThree = (RoundedDouble)double.NaN;
}
@@ -57,7 +57,7 @@
/// Gets or sets the value for the detailed assessment of safety per failure mechanism section as a probability.
///
/// Thrown when is not in range [0,1].
- public RoundedDouble AssessmentLayerTwoA
+ public double AssessmentLayerTwoA
{
get
{
Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/SectionResults/MacrostabilityOutwardsFailureMechanismSectionResult.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/SectionResults/MacrostabilityOutwardsFailureMechanismSectionResult.cs (.../MacrostabilityOutwardsFailureMechanismSectionResult.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/SectionResults/MacrostabilityOutwardsFailureMechanismSectionResult.cs (.../MacrostabilityOutwardsFailureMechanismSectionResult.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -33,7 +33,7 @@
///
public class MacrostabilityOutwardsFailureMechanismSectionResult : FailureMechanismSectionResult, IStorable
{
- private RoundedDouble assessmentLayerTwoA;
+ private double assessmentLayerTwoA;
///
/// Creates a new instance of .
@@ -44,7 +44,7 @@
public MacrostabilityOutwardsFailureMechanismSectionResult(FailureMechanismSection section)
: base(section)
{
- AssessmentLayerTwoA = (RoundedDouble)double.NaN;
+ AssessmentLayerTwoA = double.NaN;
AssessmentLayerThree = (RoundedDouble)double.NaN;
}
@@ -57,7 +57,7 @@
/// Gets or sets the value for the detailed assessment of safety per failure mechanism section as a probability.
///
/// Thrown when is not in range [0,1].
- public RoundedDouble AssessmentLayerTwoA
+ public double AssessmentLayerTwoA
{
get
{
Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/SectionResults/StrengthStabilityPointConstructionFailureMechanismSectionResult.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/SectionResults/StrengthStabilityPointConstructionFailureMechanismSectionResult.cs (.../StrengthStabilityPointConstructionFailureMechanismSectionResult.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/SectionResults/StrengthStabilityPointConstructionFailureMechanismSectionResult.cs (.../StrengthStabilityPointConstructionFailureMechanismSectionResult.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -33,7 +33,7 @@
///
public class StrengthStabilityPointConstructionFailureMechanismSectionResult : FailureMechanismSectionResult, IStorable
{
- private RoundedDouble assessmentLayerTwoA;
+ private double assessmentLayerTwoA;
///
/// Creates a new instance of .
@@ -44,15 +44,15 @@
public StrengthStabilityPointConstructionFailureMechanismSectionResult(FailureMechanismSection section)
: base(section)
{
- AssessmentLayerTwoA = (RoundedDouble)double.NaN;
+ AssessmentLayerTwoA = double.NaN;
AssessmentLayerThree = (RoundedDouble)double.NaN;
}
///
/// Gets or sets the value for the detailed assessment of safety per failure mechanism section as a probability.
///
/// Thrown when is not in range [0,1].
- public RoundedDouble AssessmentLayerTwoA
+ public double AssessmentLayerTwoA
{
get
{
Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultRows/ClosingStructureSectionResultRow.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultRows/ClosingStructureSectionResultRow.cs (.../ClosingStructureSectionResultRow.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultRows/ClosingStructureSectionResultRow.cs (.../ClosingStructureSectionResultRow.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -64,8 +64,8 @@
///
/// Thrown when is
/// not in the range [0,1].
- [TypeConverter(typeof(FailureMechanismSectionResultNoProbabilityValueRoundedDoubleConverter))]
- public RoundedDouble AssessmentLayerTwoA
+ [TypeConverter(typeof(FailureMechanismSectionResultNoProbabilityValueDoubleConverter))]
+ public double AssessmentLayerTwoA
{
get
{
Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultRows/MacrostabilityInwardsSectionResultRow.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultRows/MacrostabilityInwardsSectionResultRow.cs (.../MacrostabilityInwardsSectionResultRow.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultRows/MacrostabilityInwardsSectionResultRow.cs (.../MacrostabilityInwardsSectionResultRow.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -64,8 +64,8 @@
///
/// Thrown when is
/// not in the range [0,1].
- [TypeConverter(typeof(FailureMechanismSectionResultNoProbabilityValueRoundedDoubleConverter))]
- public RoundedDouble AssessmentLayerTwoA
+ [TypeConverter(typeof(FailureMechanismSectionResultNoProbabilityValueDoubleConverter))]
+ public double AssessmentLayerTwoA
{
get
{
Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultRows/MacrostabilityOutwardsSectionResultRow.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultRows/MacrostabilityOutwardsSectionResultRow.cs (.../MacrostabilityOutwardsSectionResultRow.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultRows/MacrostabilityOutwardsSectionResultRow.cs (.../MacrostabilityOutwardsSectionResultRow.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -64,8 +64,8 @@
///
/// Thrown when is
/// not in the range [0,1].
- [TypeConverter(typeof(FailureMechanismSectionResultNoProbabilityValueRoundedDoubleConverter))]
- public RoundedDouble AssessmentLayerTwoA
+ [TypeConverter(typeof(FailureMechanismSectionResultNoProbabilityValueDoubleConverter))]
+ public double AssessmentLayerTwoA
{
get
{
Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultRows/StrengthStabilityPointConstructionSectionResultRow.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultRows/StrengthStabilityPointConstructionSectionResultRow.cs (.../StrengthStabilityPointConstructionSectionResultRow.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultRows/StrengthStabilityPointConstructionSectionResultRow.cs (.../StrengthStabilityPointConstructionSectionResultRow.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -47,8 +47,8 @@
///
/// Thrown when is
/// not in the range [0,1].
- [TypeConverter(typeof(FailureMechanismSectionResultNoProbabilityValueRoundedDoubleConverter))]
- public RoundedDouble AssessmentLayerTwoA
+ [TypeConverter(typeof(FailureMechanismSectionResultNoProbabilityValueDoubleConverter))]
+ public double AssessmentLayerTwoA
{
get
{
Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/SectionResults/ClosingStructureFailureMechanismSectionResultTest.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/SectionResults/ClosingStructureFailureMechanismSectionResultTest.cs (.../ClosingStructureFailureMechanismSectionResultTest.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/SectionResults/ClosingStructureFailureMechanismSectionResultTest.cs (.../ClosingStructureFailureMechanismSectionResultTest.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -74,7 +74,7 @@
var result = new ClosingStructureFailureMechanismSectionResult(section);
// Call
- TestDelegate test = () => result.AssessmentLayerTwoA = (RoundedDouble)a;
+ TestDelegate test = () => result.AssessmentLayerTwoA = a;
// Assert
var message = Assert.Throws(test).Message;
@@ -96,13 +96,11 @@
var section = new FailureMechanismSection("Section", new[] { new Point2D(0, 0) });
var result = new ClosingStructureFailureMechanismSectionResult(section);
- var assessmentLayerTwoAValue = (RoundedDouble)a;
-
// Call
- result.AssessmentLayerTwoA = assessmentLayerTwoAValue;
+ result.AssessmentLayerTwoA = a;
// Assert
- Assert.AreEqual(assessmentLayerTwoAValue, result.AssessmentLayerTwoA);
+ Assert.AreEqual(a, result.AssessmentLayerTwoA);
}
}
}
\ No newline at end of file
Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/SectionResults/MacrostabilityInwardsFailureMechanismSectionResultTest.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/SectionResults/MacrostabilityInwardsFailureMechanismSectionResultTest.cs (.../MacrostabilityInwardsFailureMechanismSectionResultTest.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/SectionResults/MacrostabilityInwardsFailureMechanismSectionResultTest.cs (.../MacrostabilityInwardsFailureMechanismSectionResultTest.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -74,7 +74,7 @@
var result = new MacrostabilityInwardsFailureMechanismSectionResult(section);
// Call
- TestDelegate test = () => result.AssessmentLayerTwoA = (RoundedDouble)a;
+ TestDelegate test = () => result.AssessmentLayerTwoA = a;
// Assert
var message = Assert.Throws(test).Message;
@@ -96,13 +96,11 @@
var section = new FailureMechanismSection("Section", new[] { new Point2D(0, 0) });
var result = new MacrostabilityInwardsFailureMechanismSectionResult(section);
- var assessmentLayerTwoAValue = (RoundedDouble)a;
-
// Call
- result.AssessmentLayerTwoA = assessmentLayerTwoAValue;
+ result.AssessmentLayerTwoA = a;
// Assert
- Assert.AreEqual(assessmentLayerTwoAValue, result.AssessmentLayerTwoA);
+ Assert.AreEqual(a, result.AssessmentLayerTwoA);
}
}
}
\ No newline at end of file
Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/SectionResults/MacrostabilityOutwardsFailureMechanismSectionResultTest.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/SectionResults/MacrostabilityOutwardsFailureMechanismSectionResultTest.cs (.../MacrostabilityOutwardsFailureMechanismSectionResultTest.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/SectionResults/MacrostabilityOutwardsFailureMechanismSectionResultTest.cs (.../MacrostabilityOutwardsFailureMechanismSectionResultTest.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -74,7 +74,7 @@
var result = new MacrostabilityOutwardsFailureMechanismSectionResult(section);
// Call
- TestDelegate test = () => result.AssessmentLayerTwoA = (RoundedDouble)a;
+ TestDelegate test = () => result.AssessmentLayerTwoA = a;
// Assert
var message = Assert.Throws(test).Message;
@@ -96,13 +96,11 @@
var section = new FailureMechanismSection("Section", new[] { new Point2D(0, 0) });
var result = new MacrostabilityOutwardsFailureMechanismSectionResult(section);
- var assessmentLayerTwoAValue = (RoundedDouble)a;
-
// Call
- result.AssessmentLayerTwoA = assessmentLayerTwoAValue;
+ result.AssessmentLayerTwoA = a;
// Assert
- Assert.AreEqual(assessmentLayerTwoAValue, result.AssessmentLayerTwoA);
+ Assert.AreEqual(a, result.AssessmentLayerTwoA);
}
}
}
\ No newline at end of file
Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/SectionResults/StrengthStabilityPointConstructionFailureMechanismSectionResultTest.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/SectionResults/StrengthStabilityPointConstructionFailureMechanismSectionResultTest.cs (.../StrengthStabilityPointConstructionFailureMechanismSectionResultTest.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/SectionResults/StrengthStabilityPointConstructionFailureMechanismSectionResultTest.cs (.../StrengthStabilityPointConstructionFailureMechanismSectionResultTest.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -73,7 +73,7 @@
var result = new StrengthStabilityPointConstructionFailureMechanismSectionResult(section);
// Call
- TestDelegate test = () => result.AssessmentLayerTwoA = (RoundedDouble)a;
+ TestDelegate test = () => result.AssessmentLayerTwoA = a;
// Assert
var message = Assert.Throws(test).Message;
@@ -95,13 +95,11 @@
var section = new FailureMechanismSection("Section", new[] { new Point2D(0, 0) });
var result = new StrengthStabilityPointConstructionFailureMechanismSectionResult(section);
- var assessmentLayerTwoAValue = (RoundedDouble)a;
-
// Call
- result.AssessmentLayerTwoA = assessmentLayerTwoAValue;
+ result.AssessmentLayerTwoA = a;
// Assert
- Assert.AreEqual(assessmentLayerTwoAValue, result.AssessmentLayerTwoA);
+ Assert.AreEqual(a, result.AssessmentLayerTwoA);
}
}
}
\ No newline at end of file
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/ClosingStructureSectionResultRowTest.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/ClosingStructureSectionResultRowTest.cs (.../ClosingStructureSectionResultRowTest.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/ClosingStructureSectionResultRowTest.cs (.../ClosingStructureSectionResultRowTest.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -72,7 +72,7 @@
Assert.AreEqual(result.AssessmentLayerThree, row.AssessmentLayerThree);
Assert.IsTrue(TypeUtils.HasTypeConverter(
+ FailureMechanismSectionResultNoProbabilityValueDoubleConverter>(
r => r.AssessmentLayerTwoA));
Assert.IsTrue(TypeUtils.HasTypeConverter(
@@ -113,16 +113,15 @@
public void AssessmentLayerTwoA_ForValidValues_ResultPropertyChanged(double value)
{
// Setup
- var newValue = (RoundedDouble) value;
var section = CreateSection();
var result = new ClosingStructureFailureMechanismSectionResult(section);
var row = new ClosingStructureSectionResultRow(result);
// Call
- row.AssessmentLayerTwoA = newValue;
+ row.AssessmentLayerTwoA = value;
// Assert
- Assert.AreEqual(newValue, row.AssessmentLayerTwoA);
+ Assert.AreEqual(value, row.AssessmentLayerTwoA);
}
[Test]
@@ -133,13 +132,12 @@
public void AssessmentLayerTwoA_ForInvalidValues_ThrowsArgumentException(double value)
{
// Setup
- var newValue = (RoundedDouble)value;
var section = CreateSection();
var result = new ClosingStructureFailureMechanismSectionResult(section);
var row = new ClosingStructureSectionResultRow(result);
// Call
- TestDelegate test = () => row.AssessmentLayerTwoA = newValue;
+ TestDelegate test = () => row.AssessmentLayerTwoA = value;
// Assert
var message = Assert.Throws(test).Message;
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MacrostabilityInwardsSectionResultRowTest.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MacrostabilityInwardsSectionResultRowTest.cs (.../MacrostabilityInwardsSectionResultRowTest.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MacrostabilityInwardsSectionResultRowTest.cs (.../MacrostabilityInwardsSectionResultRowTest.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -70,7 +70,7 @@
Assert.AreEqual(result.AssessmentLayerThree, row.AssessmentLayerThree);
Assert.IsTrue(TypeUtils.HasTypeConverter(
+ FailureMechanismSectionResultNoProbabilityValueDoubleConverter>(
r => r.AssessmentLayerTwoA));
Assert.IsTrue(TypeUtils.HasTypeConverter(
@@ -111,16 +111,15 @@
public void AssessmentLayerTwoA_ForValidValues_ResultPropertyChanged(double value)
{
// Setup
- var newValue = (RoundedDouble) value;
var section = CreateSection();
var result = new MacrostabilityInwardsFailureMechanismSectionResult(section);
var row = new MacrostabilityInwardsSectionResultRow(result);
// Call
- row.AssessmentLayerTwoA = newValue;
+ row.AssessmentLayerTwoA = value;
// Assert
- Assert.AreEqual(newValue, row.AssessmentLayerTwoA);
+ Assert.AreEqual(value, row.AssessmentLayerTwoA);
}
[Test]
@@ -131,13 +130,12 @@
public void AssessmentLayerTwoA_ForInvalidValues_ThrowsArgumentException(double value)
{
// Setup
- var newValue = (RoundedDouble)value;
var section = CreateSection();
var result = new MacrostabilityInwardsFailureMechanismSectionResult(section);
var row = new MacrostabilityInwardsSectionResultRow(result);
// Call
- TestDelegate test = () => row.AssessmentLayerTwoA = newValue;
+ TestDelegate test = () => row.AssessmentLayerTwoA = value;
// Assert
var message = Assert.Throws(test).Message;
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MacrostabilityOutwardsSectionResultRowTest.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MacrostabilityOutwardsSectionResultRowTest.cs (.../MacrostabilityOutwardsSectionResultRowTest.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MacrostabilityOutwardsSectionResultRowTest.cs (.../MacrostabilityOutwardsSectionResultRowTest.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -67,7 +67,7 @@
Assert.AreEqual(result.AssessmentLayerThree, row.AssessmentLayerThree);
Assert.IsTrue(TypeUtils.HasTypeConverter(
+ FailureMechanismSectionResultNoProbabilityValueDoubleConverter>(
r => r.AssessmentLayerTwoA));
Assert.IsTrue(TypeUtils.HasTypeConverter(
@@ -107,16 +107,15 @@
public void AssessmentLayerTwoA_ForValidValues_ResultPropertyChanged(double value)
{
// Setup
- var newValue = (RoundedDouble) value;
var section = CreateSection();
var result = new MacrostabilityOutwardsFailureMechanismSectionResult(section);
var row = new MacrostabilityOutwardsSectionResultRow(result);
// Call
- row.AssessmentLayerTwoA = newValue;
+ row.AssessmentLayerTwoA = value;
// Assert
- Assert.AreEqual(newValue, row.AssessmentLayerTwoA);
+ Assert.AreEqual(value, row.AssessmentLayerTwoA);
}
[Test]
@@ -127,13 +126,12 @@
public void AssessmentLayerTwoA_ForInvalidValues_ThrowsArgumentException(double value)
{
// Setup
- var newValue = (RoundedDouble)value;
var section = CreateSection();
var result = new MacrostabilityOutwardsFailureMechanismSectionResult(section);
var row = new MacrostabilityOutwardsSectionResultRow(result);
// Call
- TestDelegate test = () => row.AssessmentLayerTwoA = newValue;
+ TestDelegate test = () => row.AssessmentLayerTwoA = value;
// Assert
var message = Assert.Throws(test).Message;
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/StrengthStabilityPointConstructionSectionResultRowTest.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/StrengthStabilityPointConstructionSectionResultRowTest.cs (.../StrengthStabilityPointConstructionSectionResultRowTest.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/StrengthStabilityPointConstructionSectionResultRowTest.cs (.../StrengthStabilityPointConstructionSectionResultRowTest.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -65,7 +65,7 @@
Assert.AreEqual(result.AssessmentLayerThree, row.AssessmentLayerThree);
Assert.IsTrue(TypeUtils.HasTypeConverter(
+ FailureMechanismSectionResultNoProbabilityValueDoubleConverter>(
r => r.AssessmentLayerTwoA));
Assert.IsTrue(TypeUtils.HasTypeConverter(
@@ -80,16 +80,15 @@
public void AssessmentLayerTwoA_ForValidValues_ResultPropertyChanged(double value)
{
// Setup
- var newValue = (RoundedDouble) value;
var section = CreateSection();
var result = new StrengthStabilityPointConstructionFailureMechanismSectionResult(section);
var row = new StrengthStabilityPointConstructionSectionResultRow(result);
// Call
- row.AssessmentLayerTwoA = newValue;
+ row.AssessmentLayerTwoA = value;
// Assert
- Assert.AreEqual(newValue, row.AssessmentLayerTwoA);
+ Assert.AreEqual(value, row.AssessmentLayerTwoA);
}
[Test]
@@ -100,13 +99,12 @@
public void AssessmentLayerTwoA_ForInvalidValues_ThrowsArgumentException(double value)
{
// Setup
- var newValue = (RoundedDouble)value;
var section = CreateSection();
var result = new StrengthStabilityPointConstructionFailureMechanismSectionResult(section);
var row = new StrengthStabilityPointConstructionSectionResultRow(result);
// Call
- TestDelegate test = () => row.AssessmentLayerTwoA = newValue;
+ TestDelegate test = () => row.AssessmentLayerTwoA = value;
// Assert
var message = Assert.Throws(test).Message;
Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingFailureMechanismSectionResultRow.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingFailureMechanismSectionResultRow.cs (.../PipingFailureMechanismSectionResultRow.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingFailureMechanismSectionResultRow.cs (.../PipingFailureMechanismSectionResultRow.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -68,25 +68,25 @@
///
/// Gets the value representing the result of the layer 2a assessment.
///
- [TypeConverter(typeof(FailureMechanismSectionResultNoProbabilityValueRoundedDoubleConverter))]
- public RoundedDouble AssessmentLayerTwoA
+ [TypeConverter(typeof(FailureMechanismSectionResultNoProbabilityValueDoubleConverter))]
+ public double AssessmentLayerTwoA
{
get
{
var relevantScenarios = SectionResult.GetCalculationScenarios(calculations).ToArray();
bool relevantScenarioAvailable = relevantScenarios.Length != 0;
- if (relevantScenarioAvailable && Math.Abs(SectionResult.GetTotalContribution(calculations) - 1.0) > tolerance)
+ if (relevantScenarioAvailable && Math.Abs(SectionResult.GetTotalContribution(relevantScenarios) - 1.0) > tolerance)
{
- return (RoundedDouble)double.NaN;
+ return double.NaN;
}
- if (!relevantScenarioAvailable || SectionResult.GetCalculationScenarioStatus(calculations) != CalculationScenarioStatus.Done)
+ if (!relevantScenarioAvailable || SectionResult.GetCalculationScenarioStatus(relevantScenarios) != CalculationScenarioStatus.Done)
{
- return (RoundedDouble)double.NaN;
+ return double.NaN;
}
- return (RoundedDouble)SectionResult.GetAssessmentLayerTwoA(calculations);
+ return SectionResult.GetAssessmentLayerTwoA(relevantScenarios);
}
}
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingFailureMechanismSectionResultRowTest.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9d7a5bd6246ec71a14f1944516d21e06954243f7
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingFailureMechanismSectionResultRowTest.cs (.../PipingFailureMechanismSectionResultRowTest.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingFailureMechanismSectionResultRowTest.cs (.../PipingFailureMechanismSectionResultRowTest.cs) (revision 9d7a5bd6246ec71a14f1944516d21e06954243f7)
@@ -70,7 +70,7 @@
Assert.AreEqual(result.AssessmentLayerThree, row.AssessmentLayerThree);
Assert.IsTrue(TypeUtils.HasTypeConverter(
+ FailureMechanismSectionResultNoProbabilityValueDoubleConverter>(
r => r.AssessmentLayerTwoA));
Assert.IsTrue(TypeUtils.HasTypeConverter(