Index: Ringtoets/Common/src/Ringtoets.Common.Data/Calculation/ProbabilisticOutput.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Data/Calculation/ProbabilisticOutput.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Calculation/ProbabilisticOutput.cs (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -0,0 +1,108 @@
+// 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 Core.Common.Base;
+using Core.Common.Base.Data;
+
+namespace Ringtoets.Common.Data.Calculation
+{
+ ///
+ /// This class contains the results of a probabilistic calculation.
+ ///
+ public class ProbabilisticOutput : Observable, ICalculationOutput
+ {
+ private RoundedDouble probability;
+ private RoundedDouble reliability;
+ private RoundedDouble factorOfSafety;
+
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The required (maximum allowed) probability of failure.
+ /// The required (maximum allowed) reliability of the failure mechanism.
+ /// The calculated probability of failing.
+ /// The calculated reliability of the failure mechanism.
+ /// The factor of safety for the failure mechanisms.
+ public ProbabilisticOutput(double requiredProbability, double requiredReliability, double probability, double reliability, double factorOfSafety)
+ {
+ RequiredProbability = new RoundedDouble(2, requiredProbability);
+ RequiredReliability = new RoundedDouble(3, requiredReliability);
+ this.probability = new RoundedDouble(2, probability);
+ this.reliability = new RoundedDouble(3, reliability);
+ this.factorOfSafety = new RoundedDouble(3, factorOfSafety);
+ }
+
+ ///
+ /// Gets the required probability of the failure mechanism.
+ ///
+ public RoundedDouble RequiredProbability { get; private set; }
+
+ ///
+ /// Get the required reliability of the failure mechanism.
+ ///
+ public RoundedDouble RequiredReliability { get; private set; }
+
+ ///
+ /// Gets the factor of safety of the failure mechanism.
+ ///
+ public RoundedDouble FactorOfSafety
+ {
+ get
+ {
+ return factorOfSafety;
+ }
+ set
+ {
+ factorOfSafety = value.ToPrecision(factorOfSafety.NumberOfDecimalPlaces);
+ }
+ }
+
+ ///
+ /// Gets the reliability of the failure mechanism.
+ ///
+ public RoundedDouble Reliability
+ {
+ get
+ {
+ return reliability;
+ }
+ set
+ {
+ reliability = value.ToPrecision(reliability.NumberOfDecimalPlaces);
+ }
+ }
+
+ ///
+ /// Gets the probability of failing.
+ ///
+ public RoundedDouble Probability
+ {
+ get
+ {
+ return probability;
+ }
+ set
+ {
+ probability = value.ToPrecision(probability.NumberOfDecimalPlaces);
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Data/Probability/NormProbabilityInput.cs
===================================================================
diff -u -r4936ea40e490dd8a3ed500e1c5a8f8390ff31491 -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/Common/src/Ringtoets.Common.Data/Probability/NormProbabilityInput.cs (.../NormProbabilityInput.cs) (revision 4936ea40e490dd8a3ed500e1c5a8f8390ff31491)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Probability/NormProbabilityInput.cs (.../NormProbabilityInput.cs) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -29,6 +29,7 @@
///
public class NormProbabilityInput
{
+ private double contribution;
private int n;
///
@@ -37,12 +38,15 @@
public NormProbabilityInput()
{
N = 2;
+ Norm = 0;
+ Contribution = double.NaN;
}
///
/// Gets or sets the 'N' parameter used to factor in the 'length effect'.
///
- /// Thrown when the is not in interval [1-20].
+ /// Thrown when the is not in interval
+ /// [1-20].
public int N
{
get
@@ -58,5 +62,32 @@
n = value;
}
}
+
+ ///
+ /// Gets or sets the contribution of failure mechanism as a percentage (0-100) to the total of the
+ /// failure probability of the assessment section.
+ ///
+ /// Thrown when the is not
+ /// in interval [1-100].
+ public double Contribution
+ {
+ get
+ {
+ return contribution;
+ }
+ set
+ {
+ if (value < 0 || value > 100)
+ {
+ throw new ArgumentOutOfRangeException("value", Resources.Contribution_Value_should_be_in_interval_0_100);
+ }
+ contribution = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the return period to assess for.
+ ///
+ public int Norm { get; set; }
}
}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj
===================================================================
diff -u -r4936ea40e490dd8a3ed500e1c5a8f8390ff31491 -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision 4936ea40e490dd8a3ed500e1c5a8f8390ff31491)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -43,6 +43,7 @@
+
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Calculation/ProbabilisticOutputTest.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Calculation/ProbabilisticOutputTest.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Calculation/ProbabilisticOutputTest.cs (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -0,0 +1,103 @@
+// 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 Core.Common.Base;
+using Core.Common.Base.Data;
+using NUnit.Framework;
+using Ringtoets.Common.Data.Calculation;
+
+namespace Ringtoets.Common.Data.Test.Calculation
+{
+ [TestFixture]
+ public class ProbabilisticOutputTest
+ {
+ [Test]
+ public void Constructor_ExpectedValues()
+ {
+ // Setup
+ var random = new Random(5);
+ var requiredProbability = new RoundedDouble(2, random.NextDouble());
+ var requiredReliability = new RoundedDouble(3, random.NextDouble());
+ var probability = new RoundedDouble(2, random.NextDouble());
+ var reliability = new RoundedDouble(3, random.NextDouble());
+ var factorOfSafety = new RoundedDouble(3, random.NextDouble());
+
+ // Call
+ var output = new ProbabilisticOutput(requiredProbability, requiredReliability, probability, reliability, factorOfSafety);
+
+ // Assert
+ Assert.IsInstanceOf(output);
+ Assert.IsInstanceOf(output);
+ Assert.IsNotNull(output);
+ Assert.AreEqual(requiredProbability, output.RequiredProbability);
+ Assert.AreEqual(requiredReliability, output.RequiredReliability);
+ Assert.AreEqual(probability, output.Probability);
+ Assert.AreEqual(reliability, output.Reliability);
+ Assert.AreEqual(factorOfSafety, output.FactorOfSafety);
+ }
+
+ [Test]
+ public void FactorOfSafety_BigRoundedDouble_ReturnsExpectedValues()
+ {
+ // Setup
+ var bigRoundedDouble = new RoundedDouble(15, 9.12345678901234567);
+ var output = new ProbabilisticOutput(0.0, 0.0, 0.0, 0.0, bigRoundedDouble);
+
+ // Call
+ output.FactorOfSafety = bigRoundedDouble;
+
+ // Assert
+ var expectedRoundedDouble = new RoundedDouble(3, bigRoundedDouble);
+ Assert.AreEqual(expectedRoundedDouble, output.FactorOfSafety);
+ }
+
+ [Test]
+ public void Reliability_BigRoundedDouble_ReturnsExpectedValues()
+ {
+ // Setup
+ var bigRoundedDouble = new RoundedDouble(15, 9.12345678901234567);
+ var output = new ProbabilisticOutput(0.0, 0.0, 0.0, bigRoundedDouble, 0.0);
+
+ // Call
+ output.Reliability = bigRoundedDouble;
+
+ // Assert
+ var expectedRoundedDouble = new RoundedDouble(3, bigRoundedDouble);
+ Assert.AreEqual(expectedRoundedDouble, output.Reliability);
+ }
+
+ [Test]
+ public void Probability_BigRoundedDouble_ReturnsExpectedValues()
+ {
+ // Setup
+ var bigRoundedDouble = new RoundedDouble(15, 9.12345678901234567);
+ var output = new ProbabilisticOutput(0.0, 0.0, bigRoundedDouble, 0.0, 0.0);
+
+ // Call
+ output.Probability = bigRoundedDouble;
+
+ // Assert
+ var expectedRoundedDouble = new RoundedDouble(2, bigRoundedDouble);
+ Assert.AreEqual(expectedRoundedDouble, output.Probability);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Probability/NormProbabilityInputTest.cs
===================================================================
diff -u -rfbbee7721490bed57feff74bd27afc3f5cc46849 -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Probability/NormProbabilityInputTest.cs (.../NormProbabilityInputTest.cs) (revision fbbee7721490bed57feff74bd27afc3f5cc46849)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Probability/NormProbabilityInputTest.cs (.../NormProbabilityInputTest.cs) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -37,7 +37,9 @@
var normProbabilityInput = new NormProbabilityInput();
// Assert
+ Assert.AreEqual(double.NaN, normProbabilityInput.Contribution);
Assert.AreEqual(2, normProbabilityInput.N);
+ Assert.AreEqual(0, normProbabilityInput.Norm);
}
[Test]
@@ -60,7 +62,7 @@
[Test]
[TestCase(0)]
[TestCase(21)]
- public void N_ValueOutsideValidRegion_ThrowsArgumentException(int value)
+ public void N_ValueOutsideValidRegion_ThrowsArgumentOutOfRangeException(int value)
{
// Setup
var normProbabilityInput = new NormProbabilityInput();
@@ -69,7 +71,41 @@
TestDelegate test = () => normProbabilityInput.N = value;
// Assert
- TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, Resources.N_Value_should_be_in_interval_1_20);
+ TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test,
+ Resources.N_Value_should_be_in_interval_1_20);
}
+
+ [Test]
+ [TestCase(0)]
+ [TestCase(50)]
+ [TestCase(100)]
+ public void Contribution_ValueInsideValidRegion_DoesNotThrow(int value)
+ {
+ // Setup
+ var normProbabilityInput = new NormProbabilityInput();
+
+ // Call
+ TestDelegate test = () => normProbabilityInput.Contribution = value;
+
+ // Assert
+ Assert.DoesNotThrow(test);
+ Assert.AreEqual(value, normProbabilityInput.Contribution);
+ }
+
+ [Test]
+ [TestCase(-1)]
+ [TestCase(101)]
+ public void Contribution_ValueOutsideValidRegion_ThrowsArgumentOutOfRangeException(int value)
+ {
+ // Setup
+ var normProbabilityInput = new NormProbabilityInput();
+
+ // Call
+ TestDelegate test = () => normProbabilityInput.Contribution = value;
+
+ // Assert
+ TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test,
+ Resources.Contribution_Value_should_be_in_interval_0_100);
+ }
}
}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj
===================================================================
diff -u -r2fca3f7ae1037eaa9c355b64d7cd0c390143ea8f -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision 2fca3f7ae1037eaa9c355b64d7cd0c390143ea8f)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -59,6 +59,7 @@
+
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsCalculation.cs
===================================================================
diff -u -r4936ea40e490dd8a3ed500e1c5a8f8390ff31491 -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsCalculation.cs (.../GrassCoverErosionInwardsCalculation.cs) (revision 4936ea40e490dd8a3ed500e1c5a8f8390ff31491)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsCalculation.cs (.../GrassCoverErosionInwardsCalculation.cs) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -74,9 +74,9 @@
public NormProbabilityInput NormProbabilityInput { get; private set; }
///
- /// Gets or sets , which contains the results of a grass cover erosion inwards calculation.
+ /// Gets or sets , which contains the results of a probabilistic calculation.
///
- public GrassCoverErosionInwardsOutput Output { get; set; }
+ public ProbabilisticOutput Output { get; set; }
public string Comments { get; set; }
Fisheye: Tag 8047e7fd59525ed424105aaefc4ee88b9ae8def6 refers to a dead (removed) revision in file `Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsOutput.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/Ringtoets.GrassCoverErosionInwards.Data.csproj
===================================================================
diff -u -rd2f9b4f26f69988ea1c55caaa58af0831152458f -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/Ringtoets.GrassCoverErosionInwards.Data.csproj (.../Ringtoets.GrassCoverErosionInwards.Data.csproj) (revision d2f9b4f26f69988ea1c55caaa58af0831152458f)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/Ringtoets.GrassCoverErosionInwards.Data.csproj (.../Ringtoets.GrassCoverErosionInwards.Data.csproj) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -53,7 +53,6 @@
-
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PresentationObjects/EmptyGrassCoverErosionInwardsOutput.cs
===================================================================
diff -u -r510b9a49197f9bba205844d0311092236356207c -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PresentationObjects/EmptyGrassCoverErosionInwardsOutput.cs (.../EmptyGrassCoverErosionInwardsOutput.cs) (revision 510b9a49197f9bba205844d0311092236356207c)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PresentationObjects/EmptyGrassCoverErosionInwardsOutput.cs (.../EmptyGrassCoverErosionInwardsOutput.cs) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -19,12 +19,13 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
+using Ringtoets.Common.Data.Calculation;
using Ringtoets.GrassCoverErosionInwards.Data;
namespace Ringtoets.GrassCoverErosionInwards.Forms.PresentationObjects
{
///
- /// This class represents the placeholder for a for a
+ /// This class represents the placeholder for a for a
/// that has not been calculated yet.
///
public class EmptyGrassCoverErosionInwardsOutput {}
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsOutputProperties.cs
===================================================================
diff -u -ra6b3a4921ffd42f54f6be60ebc2eef3c12cab10e -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsOutputProperties.cs (.../GrassCoverErosionInwardsOutputProperties.cs) (revision a6b3a4921ffd42f54f6be60ebc2eef3c12cab10e)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsOutputProperties.cs (.../GrassCoverErosionInwardsOutputProperties.cs) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -23,15 +23,15 @@
using Core.Common.Gui.Attributes;
using Core.Common.Gui.PropertyBag;
using Core.Common.Utils.Attributes;
-using Ringtoets.GrassCoverErosionInwards.Data;
+using Ringtoets.Common.Data.Calculation;
using Ringtoets.GrassCoverErosionInwards.Forms.Properties;
namespace Ringtoets.GrassCoverErosionInwards.Forms.PropertyClasses
{
///
- /// ViewModel of for properties panel.
+ /// ViewModel of for properties panel.
///
- public class GrassCoverErosionInwardsOutputProperties : ObjectProperties
+ public class GrassCoverErosionInwardsOutputProperties : ObjectProperties
{
[PropertyOrder(1)]
[ResourcesCategory(typeof(Resources), "Categories_GrassCoverErosionInwards")]
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsGuiPlugin.cs
===================================================================
diff -u -re2986d74885385074ad0f6d164a722c0c7e39a8b -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsGuiPlugin.cs (.../GrassCoverErosionInwardsGuiPlugin.cs) (revision e2986d74885385074ad0f6d164a722c0c7e39a8b)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsGuiPlugin.cs (.../GrassCoverErosionInwardsGuiPlugin.cs) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -65,7 +65,7 @@
yield return new PropertyInfo();
yield return new PropertyInfo();
yield return new PropertyInfo();
- yield return new PropertyInfo();
+ yield return new PropertyInfo();
}
public override IEnumerable GetViewInfos()
@@ -124,7 +124,7 @@
.Build()
};
- yield return new TreeNodeInfo
+ yield return new TreeNodeInfo
{
Text = pipingOutput => RingtoetsCommonFormsResources.CalculationOutput_DisplayName,
Image = pipingOutput => RingtoetsCommonFormsResources.GeneralOutputIcon,
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsOutputCalculationService.cs
===================================================================
diff -u -rf20288f5df3fbdd587cdc8e0edd1dfd479d8f2be -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsOutputCalculationService.cs (.../GrassCoverErosionInwardsOutputCalculationService.cs) (revision f20288f5df3fbdd587cdc8e0edd1dfd479d8f2be)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsOutputCalculationService.cs (.../GrassCoverErosionInwardsOutputCalculationService.cs) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -21,14 +21,15 @@
using System;
using MathNet.Numerics.Distributions;
+using Ringtoets.Common.Data.Calculation;
using Ringtoets.Common.Data.FailureMechanism;
using Ringtoets.GrassCoverErosionInwards.Data;
using Ringtoets.Integration.Data;
namespace Ringtoets.GrassCoverErosionInwards.Service
{
///
- /// This class is responsible for calculating the parameters required for .
+ /// This class is responsible for calculating the parameters required for .
///
public class GrassCoverErosionInwardsOutputCalculationService
{
@@ -53,7 +54,7 @@
}
///
- /// Calculates the given the , , and .
+ /// Calculates the given the , , and .
///
/// The calculation which is used.
/// The amount of contribution as a percentage [0-100] for the as part of the overall verdict.
@@ -70,11 +71,11 @@
calculator.Calculate();
- calculation.Output = new GrassCoverErosionInwardsOutput(1/calculator.requiredProbability,
- calculator.requiredReliability,
- 1/calculator.probability,
- calculator.reliability,
- calculator.factorOfSafety);
+ calculation.Output = new ProbabilisticOutput(1/calculator.requiredProbability,
+ calculator.requiredReliability,
+ 1/calculator.probability,
+ calculator.reliability,
+ calculator.factorOfSafety);
}
private void Calculate()
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/GrassCoverErosionInwardsCalculationTest.cs
===================================================================
diff -u -r4936ea40e490dd8a3ed500e1c5a8f8390ff31491 -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/GrassCoverErosionInwardsCalculationTest.cs (.../GrassCoverErosionInwardsCalculationTest.cs) (revision 4936ea40e490dd8a3ed500e1c5a8f8390ff31491)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/GrassCoverErosionInwardsCalculationTest.cs (.../GrassCoverErosionInwardsCalculationTest.cs) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -127,7 +127,7 @@
var normProbabilityInput = new NormProbabilityInput();
var calculation = new GrassCoverErosionInwardsCalculation(generalInput, normProbabilityInput)
{
- Output = new TestGrassCoverErosionInwardsOutput()
+ Output = new TestProbabilisticOutput()
};
// Call
@@ -160,7 +160,7 @@
var normProbabilityInput = new NormProbabilityInput();
var calculation = new GrassCoverErosionInwardsCalculation(generalInput, normProbabilityInput)
{
- Output = new TestGrassCoverErosionInwardsOutput()
+ Output = new TestProbabilisticOutput()
};
// Call & Assert
@@ -207,7 +207,7 @@
public void GetObservableOutput_Always_ReturnsOutput()
{
// Setup
- var output = new GrassCoverErosionInwardsOutput(2.0, 3.0, 1.4, 50.3, 16.3);
+ var output = new ProbabilisticOutput(2.0, 3.0, 1.4, 50.3, 16.3);
var generalInput = new GeneralGrassCoverErosionInwardsInput();
var normProbabilityInput = new NormProbabilityInput();
var calculation = new GrassCoverErosionInwardsCalculation(generalInput, normProbabilityInput)
@@ -247,9 +247,9 @@
Assert.AreEqual(expectedDikeHeight, inputParameters.DikeHeight);
}
- private class TestGrassCoverErosionInwardsOutput : GrassCoverErosionInwardsOutput
+ private class TestProbabilisticOutput : ProbabilisticOutput
{
- public TestGrassCoverErosionInwardsOutput() : base(0, 0, 0, 0, 0) {}
+ public TestProbabilisticOutput() : base(0, 0, 0, 0, 0) {}
}
}
}
\ No newline at end of file
Fisheye: Tag 8047e7fd59525ed424105aaefc4ee88b9ae8def6 refers to a dead (removed) revision in file `Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/GrassCoverErosionInwardsOutputTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/Ringtoets.GrassCoverErosionInwards.Data.Test.csproj
===================================================================
diff -u -r2fca3f7ae1037eaa9c355b64d7cd0c390143ea8f -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/Ringtoets.GrassCoverErosionInwards.Data.Test.csproj (.../Ringtoets.GrassCoverErosionInwards.Data.Test.csproj) (revision 2fca3f7ae1037eaa9c355b64d7cd0c390143ea8f)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/Ringtoets.GrassCoverErosionInwards.Data.Test.csproj (.../Ringtoets.GrassCoverErosionInwards.Data.Test.csproj) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -62,7 +62,6 @@
-
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsOutputPropertiesTest.cs
===================================================================
diff -u -rb4cbcfd46dd1c01cb8e873b3ccff0002b8f78e61 -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsOutputPropertiesTest.cs (.../GrassCoverErosionInwardsOutputPropertiesTest.cs) (revision b4cbcfd46dd1c01cb8e873b3ccff0002b8f78e61)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsOutputPropertiesTest.cs (.../GrassCoverErosionInwardsOutputPropertiesTest.cs) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -24,7 +24,7 @@
using Core.Common.Gui.PropertyBag;
using NUnit.Framework;
using Rhino.Mocks;
-using Ringtoets.GrassCoverErosionInwards.Data;
+using Ringtoets.Common.Data.Calculation;
using Ringtoets.GrassCoverErosionInwards.Forms.PropertyClasses;
namespace Ringtoets.GrassCoverErosionInwards.Forms.Test.PropertyClasses
@@ -47,7 +47,7 @@
var properties = new GrassCoverErosionInwardsOutputProperties();
// Assert
- Assert.IsInstanceOf>(properties);
+ Assert.IsInstanceOf>(properties);
Assert.IsNull(properties.Data);
}
@@ -63,7 +63,7 @@
double reliability = random.NextDouble();
double factorOfSafety = random.NextDouble();
- var output = new GrassCoverErosionInwardsOutput(requiredProbability, requiredReliability, probability, reliability, factorOfSafety);
+ var output = new ProbabilisticOutput(requiredProbability, requiredReliability, probability, reliability, factorOfSafety);
// Call
var properties = new GrassCoverErosionInwardsOutputProperties
@@ -91,7 +91,7 @@
double reliability = random.NextDouble();
double factorOfSafety = random.NextDouble();
- var output = new GrassCoverErosionInwardsOutput(requiredProbability, requiredReliability, probability, reliability, factorOfSafety);
+ var output = new ProbabilisticOutput(requiredProbability, requiredReliability, probability, reliability, factorOfSafety);
// Call
var properties = new GrassCoverErosionInwardsOutputProperties
@@ -109,7 +109,7 @@
public void PropertyAttributes_ReturnExpectedValues()
{
// Setup
- var output = new GrassCoverErosionInwardsOutput(double.NaN, double.NaN, double.NaN, double.NaN, double.NaN);
+ var output = new ProbabilisticOutput(double.NaN, double.NaN, double.NaN, double.NaN, double.NaN);
// Call
var properties = new GrassCoverErosionInwardsOutputProperties
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs
===================================================================
diff -u -r4936ea40e490dd8a3ed500e1c5a8f8390ff31491 -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs) (revision 4936ea40e490dd8a3ed500e1c5a8f8390ff31491)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -140,7 +140,7 @@
var calculation = new GrassCoverErosionInwardsCalculation(new GeneralGrassCoverErosionInwardsInput(), new NormProbabilityInput())
{
- Output = new GrassCoverErosionInwardsOutput(0, 0, 0, 0, 0)
+ Output = new ProbabilisticOutput(0, 0, 0, 0, 0)
};
var failureMechanism = new GrassCoverErosionInwardsFailureMechanism();
var calculationContext = new GrassCoverErosionInwardsCalculationContext(calculation, failureMechanism, assessmentSectionMock);
@@ -159,7 +159,7 @@
Assert.IsNotNull(grassCoverErosionInwardsInputContext);
Assert.AreSame(calculationContext.WrappedData.InputParameters, grassCoverErosionInwardsInputContext.WrappedData);
- var output = children[2] as GrassCoverErosionInwardsOutput;
+ var output = children[2] as ProbabilisticOutput;
Assert.IsNotNull(output);
mocks.VerifyAll();
@@ -449,7 +449,7 @@
var calculation = new GrassCoverErosionInwardsCalculation(new GeneralGrassCoverErosionInwardsInput(),
new NormProbabilityInput())
{
- Output = new GrassCoverErosionInwardsOutput(double.NaN, double.NaN, double.NaN, double.NaN, double.NaN),
+ Output = new ProbabilisticOutput(double.NaN, double.NaN, double.NaN, double.NaN, double.NaN),
InputParameters =
{
HydraulicBoundaryLocation = hydraulicBoundaryLocation
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsOutputTreeNodeInfoTest.cs
===================================================================
diff -u -r1d2df58f537b31f1a7938eb42b329451aa2fa4e0 -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsOutputTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsOutputTreeNodeInfoTest.cs) (revision 1d2df58f537b31f1a7938eb42b329451aa2fa4e0)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsOutputTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsOutputTreeNodeInfoTest.cs) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -26,7 +26,7 @@
using Core.Common.TestUtil;
using NUnit.Framework;
using Rhino.Mocks;
-using Ringtoets.GrassCoverErosionInwards.Data;
+using Ringtoets.Common.Data.Calculation;
using Ringtoets.GrassCoverErosionInwards.Plugin;
using GrassCoverErosionInwardsFormsResources = Ringtoets.GrassCoverErosionInwards.Forms.Properties.Resources;
using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources;
@@ -45,14 +45,14 @@
{
mocksRepository = new MockRepository();
plugin = new GrassCoverErosionInwardsGuiPlugin();
- info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(GrassCoverErosionInwardsOutput));
+ info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(ProbabilisticOutput));
}
[Test]
public void Initialized_Always_ExpectedPropertiesSet()
{
// Assert
- Assert.AreEqual(typeof(GrassCoverErosionInwardsOutput), info.TagType);
+ Assert.AreEqual(typeof(ProbabilisticOutput), info.TagType);
Assert.IsNotNull(info.Text);
Assert.IsNotNull(info.Image);
Assert.IsNotNull(info.ContextMenuStrip);
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/GrassCoverErosionInwardsGuiPluginTest.cs
===================================================================
diff -u -r3280840f72a6c61740b803385f3af8ec1f6ede91 -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/GrassCoverErosionInwardsGuiPluginTest.cs (.../GrassCoverErosionInwardsGuiPluginTest.cs) (revision 3280840f72a6c61740b803385f3af8ec1f6ede91)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/GrassCoverErosionInwardsGuiPluginTest.cs (.../GrassCoverErosionInwardsGuiPluginTest.cs) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -27,6 +27,7 @@
using Core.Common.Gui.Plugin;
using NUnit.Framework;
using Rhino.Mocks;
+using Ringtoets.Common.Data.Calculation;
using Ringtoets.Common.Forms.PresentationObjects;
using Ringtoets.GrassCoverErosionInwards.Data;
using Ringtoets.GrassCoverErosionInwards.Forms.PresentationObjects;
@@ -81,7 +82,7 @@
Assert.IsNull(inputContextProperties.GetObjectPropertiesData);
Assert.IsNull(inputContextProperties.AfterCreate);
- var outputContextProperties = propertyInfos.Single(pi => pi.DataType == typeof(GrassCoverErosionInwardsOutput));
+ var outputContextProperties = propertyInfos.Single(pi => pi.DataType == typeof(ProbabilisticOutput));
Assert.AreEqual(typeof(GrassCoverErosionInwardsOutputProperties), outputContextProperties.PropertyObjectType);
Assert.IsNull(outputContextProperties.AdditionalDataCheck);
Assert.IsNull(outputContextProperties.GetObjectPropertiesData);
@@ -119,7 +120,7 @@
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(FailureMechanismSectionResultContext)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(GrassCoverErosionInwardsInputContext)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(EmptyGrassCoverErosionInwardsOutput)));
- Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(GrassCoverErosionInwardsOutput)));
+ Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(ProbabilisticOutput)));
}
mocks.VerifyAll();
}
Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresCalculation.cs
===================================================================
diff -u -rb60b7e12cf211bdbe11e0a54734fa097e8ef2146 -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresCalculation.cs (.../HeightStructuresCalculation.cs) (revision b60b7e12cf211bdbe11e0a54734fa097e8ef2146)
+++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresCalculation.cs (.../HeightStructuresCalculation.cs) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -27,7 +27,7 @@
namespace Ringtoets.HeightStructures.Data
{
///
- /// This class holds the height structures information which can be made visible in the graphical interface of the application.
+ /// This class holds information about a calculation for the .
///
public class HeightStructuresCalculation : Observable, ICalculation
{
@@ -48,9 +48,9 @@
public HeightStructuresInput InputParameters { get; private set; }
///
- /// Gets or sets , which contains the results of a height structures calculation.
+ /// Gets or sets , which contains the results of a height structures calculation.
///
- public HeightStructuresOutput Output { get; set; }
+ public ProbabilisticOutput Output { get; set; }
public string Name { get; set; }
Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresFailureMechanism.cs
===================================================================
diff -u -rb60b7e12cf211bdbe11e0a54734fa097e8ef2146 -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresFailureMechanism.cs (.../HeightStructuresFailureMechanism.cs) (revision b60b7e12cf211bdbe11e0a54734fa097e8ef2146)
+++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresFailureMechanism.cs (.../HeightStructuresFailureMechanism.cs) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -56,6 +56,18 @@
}
}
+ public override double Contribution
+ {
+ get
+ {
+ return NormProbabilityInput.Contribution;
+ }
+ set
+ {
+ NormProbabilityInput.Contribution = value;
+ }
+ }
+
///
/// Gets the length-effect parameters.
///
Fisheye: Tag 8047e7fd59525ed424105aaefc4ee88b9ae8def6 refers to a dead (removed) revision in file `Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresOutput.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/Ringtoets.HeightStructures.Data.csproj
===================================================================
diff -u -rb784ac8be54e88a798f4b7b7ad54ffe47b587e20 -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/Ringtoets.HeightStructures.Data.csproj (.../Ringtoets.HeightStructures.Data.csproj) (revision b784ac8be54e88a798f4b7b7ad54ffe47b587e20)
+++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/Ringtoets.HeightStructures.Data.csproj (.../Ringtoets.HeightStructures.Data.csproj) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -44,7 +44,6 @@
-
True
Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresGuiPlugin.cs
===================================================================
diff -u -r3280840f72a6c61740b803385f3af8ec1f6ede91 -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresGuiPlugin.cs (.../HeightStructuresGuiPlugin.cs) (revision 3280840f72a6c61740b803385f3af8ec1f6ede91)
+++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresGuiPlugin.cs (.../HeightStructuresGuiPlugin.cs) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -95,7 +95,7 @@
.Build()
};
- yield return new TreeNodeInfo
+ yield return new TreeNodeInfo
{
Text = pipingOutput => RingtoetsCommonFormsResources.CalculationOutput_DisplayName,
Image = pipingOutput => RingtoetsCommonFormsResources.GeneralOutputIcon,
Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresCalculationTest.cs
===================================================================
diff -u -rb60b7e12cf211bdbe11e0a54734fa097e8ef2146 -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresCalculationTest.cs (.../HeightStructuresCalculationTest.cs) (revision b60b7e12cf211bdbe11e0a54734fa097e8ef2146)
+++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresCalculationTest.cs (.../HeightStructuresCalculationTest.cs) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -65,7 +65,7 @@
var generalInput = new GeneralHeightStructuresInput();
var calculation = new HeightStructuresCalculation(generalInput)
{
- Output = new HeightStructuresOutput()
+ Output = new TestHeightStructuresOutput()
};
// Call
@@ -96,7 +96,7 @@
var generalInput = new GeneralHeightStructuresInput();
var calculation = new HeightStructuresCalculation(generalInput)
{
- Output = new HeightStructuresOutput()
+ Output = new TestHeightStructuresOutput()
};
// Call & Assert
@@ -124,7 +124,7 @@
var generalInput = new GeneralHeightStructuresInput();
var calculation = new HeightStructuresCalculation(generalInput)
{
- Output = new HeightStructuresOutput()
+ Output = new TestHeightStructuresOutput()
};
// Call
@@ -133,5 +133,10 @@
// Assert
Assert.AreSame(calculation.Output, output);
}
+
+ private class TestHeightStructuresOutput : ProbabilisticOutput
+ {
+ public TestHeightStructuresOutput() : base(0, 0, 0, 0, 0) {}
+ }
}
}
\ No newline at end of file
Fisheye: Tag 8047e7fd59525ed424105aaefc4ee88b9ae8def6 refers to a dead (removed) revision in file `Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresOutputTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/Ringtoets.HeightStructures.Data.Test.csproj
===================================================================
diff -u -rb784ac8be54e88a798f4b7b7ad54ffe47b587e20 -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/Ringtoets.HeightStructures.Data.Test.csproj (.../Ringtoets.HeightStructures.Data.Test.csproj) (revision b784ac8be54e88a798f4b7b7ad54ffe47b587e20)
+++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/Ringtoets.HeightStructures.Data.Test.csproj (.../Ringtoets.HeightStructures.Data.Test.csproj) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -54,7 +54,6 @@
-
Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs
===================================================================
diff -u -rb60b7e12cf211bdbe11e0a54734fa097e8ef2146 -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationContextTreeNodeInfoTest.cs) (revision b60b7e12cf211bdbe11e0a54734fa097e8ef2146)
+++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationContextTreeNodeInfoTest.cs) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -128,7 +128,7 @@
var failureMechanism = new HeightStructuresFailureMechanism();
var calculation = new HeightStructuresCalculation(failureMechanism.GeneralInput)
{
- Output = new HeightStructuresOutput()
+ Output = new TestHeightStructuresOutput()
};
var calculationContext = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSectionMock);
@@ -147,7 +147,7 @@
Assert.IsNotNull(heightStructuresInputContext);
Assert.AreSame(calculationContext.WrappedData.InputParameters, heightStructuresInputContext.WrappedData);
- var output = children[2] as HeightStructuresOutput;
+ var output = children[2] as ProbabilisticOutput;
Assert.IsNotNull(output);
mocks.VerifyAll();
@@ -270,5 +270,10 @@
private const int contextMenuCalculateIndex = 0;
private const int contextMenuClearIndex = 1;
+
+ private class TestHeightStructuresOutput : ProbabilisticOutput
+ {
+ public TestHeightStructuresOutput() : base(0, 0, 0, 0, 0) {}
+ }
}
}
\ No newline at end of file
Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresOutputTreeNodeInfoTest.cs
===================================================================
diff -u -r1d2df58f537b31f1a7938eb42b329451aa2fa4e0 -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresOutputTreeNodeInfoTest.cs (.../HeightStructuresOutputTreeNodeInfoTest.cs) (revision 1d2df58f537b31f1a7938eb42b329451aa2fa4e0)
+++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresOutputTreeNodeInfoTest.cs (.../HeightStructuresOutputTreeNodeInfoTest.cs) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -26,6 +26,7 @@
using Core.Common.TestUtil;
using NUnit.Framework;
using Rhino.Mocks;
+using Ringtoets.Common.Data.Calculation;
using Ringtoets.HeightStructures.Data;
using Ringtoets.HeightStructures.Plugin;
using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources;
@@ -44,14 +45,14 @@
{
mocksRepository = new MockRepository();
plugin = new HeightStructuresGuiPlugin();
- info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(HeightStructuresOutput));
+ info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(ProbabilisticOutput));
}
[Test]
public void Initialized_Always_ExpectedPropertiesSet()
{
// Assert
- Assert.AreEqual(typeof(HeightStructuresOutput), info.TagType);
+ Assert.AreEqual(typeof(ProbabilisticOutput), info.TagType);
Assert.IsNotNull(info.Text);
Assert.IsNotNull(info.Image);
Assert.IsNotNull(info.ContextMenuStrip);
Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/HeightStructuresGuiPluginTest.cs
===================================================================
diff -u -r3280840f72a6c61740b803385f3af8ec1f6ede91 -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/HeightStructuresGuiPluginTest.cs (.../HeightStructuresGuiPluginTest.cs) (revision 3280840f72a6c61740b803385f3af8ec1f6ede91)
+++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/HeightStructuresGuiPluginTest.cs (.../HeightStructuresGuiPluginTest.cs) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -27,6 +27,7 @@
using Core.Common.Gui.Plugin;
using NUnit.Framework;
using Rhino.Mocks;
+using Ringtoets.Common.Data.Calculation;
using Ringtoets.Common.Forms.PresentationObjects;
using Ringtoets.HeightStructures.Data;
using Ringtoets.HeightStructures.Forms.PresentationObjects;
@@ -75,7 +76,7 @@
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(HeightStructuresCalculationGroupContext)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(HeightStructuresCalculationContext)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(HeightStructuresInputContext)));
- Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(HeightStructuresOutput)));
+ Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(ProbabilisticOutput)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(EmptyHeightStructuresOutput)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(FailureMechanismSectionResultContext)));
}
Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSection.cs
===================================================================
diff -u -r261bbc6b1f16b951a12123626a914fe764ac31d0 -r8047e7fd59525ed424105aaefc4ee88b9ae8def6
--- Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSection.cs (.../AssessmentSection.cs) (revision 261bbc6b1f16b951a12123626a914fe764ac31d0)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSection.cs (.../AssessmentSection.cs) (revision 8047e7fd59525ed424105aaefc4ee88b9ae8def6)
@@ -42,7 +42,7 @@
{
private ReferenceLine referenceLine;
- private FailureMechanismContribution contritbution;
+ private FailureMechanismContribution contribution;
///
/// Initializes a new instance of the class.
@@ -66,7 +66,7 @@
StrengthStabilityPointConstruction = new StrengthStabilityPointConstructionFailureMechanism();
PipingStructure = new PipingStructureFailureMechanism();
DuneErosion = new DuneErosionFailureMechanism();
-
+
FailureMechanismContribution = new FailureMechanismContribution(GetFailureMechanisms(), 30, 30000);
ChangeComposition(composition);
}
@@ -154,12 +154,13 @@
{
get
{
- return contritbution;
+ return contribution;
}
private set
{
- contritbution = value;
+ contribution = value;
PipingFailureMechanism.NormProbabilityInput.Norm = value.Norm;
+ HeightStructures.NormProbabilityInput.Norm = value.Norm;
}
}