Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsCalculation.cs
===================================================================
diff -u -rfa2a0dff6598123689fc7a69745440215879a243 -rdf02e9274a94d8763da204833a4d93f984e242c6
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsCalculation.cs (.../GrassCoverErosionInwardsCalculation.cs) (revision fa2a0dff6598123689fc7a69745440215879a243)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsCalculation.cs (.../GrassCoverErosionInwardsCalculation.cs) (revision df02e9274a94d8763da204833a4d93f984e242c6)
@@ -48,7 +48,7 @@
///
/// Gets or sets , which contains the results of a probabilistic calculation.
///
- public ProbabilityAssessmentOutput Output { get; set; }
+ public GrassCoverErosionInwardsOutput 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 -r4e1b4ed200c6a9ad02e582e4596233188c64483f -rdf02e9274a94d8763da204833a4d93f984e242c6
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/Ringtoets.GrassCoverErosionInwards.Data.csproj (.../Ringtoets.GrassCoverErosionInwards.Data.csproj) (revision 4e1b4ed200c6a9ad02e582e4596233188c64483f)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/Ringtoets.GrassCoverErosionInwards.Data.csproj (.../Ringtoets.GrassCoverErosionInwards.Data.csproj) (revision df02e9274a94d8763da204833a4d93f984e242c6)
@@ -43,6 +43,7 @@
+
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Properties/Resources.Designer.cs
===================================================================
diff -u -rfa2a0dff6598123689fc7a69745440215879a243 -rdf02e9274a94d8763da204833a4d93f984e242c6
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision fa2a0dff6598123689fc7a69745440215879a243)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision df02e9274a94d8763da204833a4d93f984e242c6)
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:4.0.30319.17929
+// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -534,6 +534,42 @@
}
///
+ /// Looks up a localized string similar to Is het resultaat van de overtopping deelberekening dominant over de overflow deelberekening..
+ ///
+ public static string GrassCoverErosionInwardsOutput_IsOvertoppingDominant_Description {
+ get {
+ return ResourceManager.GetString("GrassCoverErosionInwardsOutput_IsOvertoppingDominant_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Overtopping dominant [-].
+ ///
+ public static string GrassCoverErosionInwardsOutput_IsOvertoppingDominant_Displayname {
+ get {
+ return ResourceManager.GetString("GrassCoverErosionInwardsOutput_IsOvertoppingDominant_Displayname", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to De golfhoogte van de overtopping deelberekening..
+ ///
+ public static string GrassCoverErosionInwardsOutput_WaveHeight_Description {
+ get {
+ return ResourceManager.GetString("GrassCoverErosionInwardsOutput_WaveHeight_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Golfhoogte (Hs) [-].
+ ///
+ public static string GrassCoverErosionInwardsOutput_WaveHeight_Displayname {
+ get {
+ return ResourceManager.GetString("GrassCoverErosionInwardsOutput_WaveHeight_Displayname", resourceCulture);
+ }
+ }
+
+ ///
/// Looks up a localized string similar to Berekening.
///
public static string GrassCoverErosionInwardsScenariosView_AddDataGridColumns_Calculation {
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Properties/Resources.resx
===================================================================
diff -u -rfa2a0dff6598123689fc7a69745440215879a243 -rdf02e9274a94d8763da204833a4d93f984e242c6
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Properties/Resources.resx (.../Resources.resx) (revision fa2a0dff6598123689fc7a69745440215879a243)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Properties/Resources.resx (.../Resources.resx) (revision df02e9274a94d8763da204833a4d93f984e242c6)
@@ -289,4 +289,16 @@
Berekening
+
+ Is het resultaat van de overtopping deelberekening dominant over de overflow deelberekening.
+
+
+ Overtopping dominant [-]
+
+
+ De golfhoogte van de overtopping deelberekening.
+
+
+ Golfhoogte (Hs) [-]
+
\ No newline at end of file
Fisheye: Tag 7cfeb195650f713f29c53e9926499fa63e4c79ea refers to a dead (removed) revision in file `Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsOutputProperties.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Ringtoets.GrassCoverErosionInwards.Forms.csproj
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -rdf02e9274a94d8763da204833a4d93f984e242c6
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Ringtoets.GrassCoverErosionInwards.Forms.csproj (.../Ringtoets.GrassCoverErosionInwards.Forms.csproj) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Ringtoets.GrassCoverErosionInwards.Forms.csproj (.../Ringtoets.GrassCoverErosionInwards.Forms.csproj) (revision df02e9274a94d8763da204833a4d93f984e242c6)
@@ -64,6 +64,7 @@
+
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsGuiPlugin.cs
===================================================================
diff -u -r626c54ec06c0074be690c1a7046081293b0289a8 -rdf02e9274a94d8763da204833a4d93f984e242c6
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsGuiPlugin.cs (.../GrassCoverErosionInwardsGuiPlugin.cs) (revision 626c54ec06c0074be690c1a7046081293b0289a8)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsGuiPlugin.cs (.../GrassCoverErosionInwardsGuiPlugin.cs) (revision df02e9274a94d8763da204833a4d93f984e242c6)
@@ -35,6 +35,7 @@
using Ringtoets.Common.Data.Probability;
using Ringtoets.Common.Forms.Helpers;
using Ringtoets.Common.Forms.PresentationObjects;
+using Ringtoets.Common.Forms.PropertyClasses;
using Ringtoets.Common.Forms.TreeNodeInfos;
using Ringtoets.GrassCoverErosionInwards.Data;
using Ringtoets.GrassCoverErosionInwards.Forms;
@@ -62,6 +63,7 @@
yield return new PropertyInfo();
yield return new PropertyInfo();
yield return new PropertyInfo();
+ yield return new PropertyInfo();
}
public override IEnumerable GetViewInfos()
@@ -192,7 +194,7 @@
.Build()
};
- yield return new TreeNodeInfo
+ yield return new TreeNodeInfo
{
Text = output => RingtoetsCommonFormsResources.CalculationOutput_DisplayName,
Image = output => RingtoetsCommonFormsResources.GeneralOutputIcon,
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationActivity.cs
===================================================================
diff -u -r5e6eacaf76f765ba77febee673e9e94895e46feb -rdf02e9274a94d8763da204833a4d93f984e242c6
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationActivity.cs (.../GrassCoverErosionInwardsCalculationActivity.cs) (revision 5e6eacaf76f765ba77febee673e9e94895e46feb)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationActivity.cs (.../GrassCoverErosionInwardsCalculationActivity.cs) (revision df02e9274a94d8763da204833a4d93f984e242c6)
@@ -32,7 +32,7 @@
///
/// for running a grass cover erosion inwards calculation.
///
- public class GrassCoverErosionInwardsCalculationActivity : HydraRingActivity
+ public class GrassCoverErosionInwardsCalculationActivity : HydraRingActivity
{
private readonly GrassCoverErosionInwardsCalculation calculation;
private readonly string hlcdDirectory;
@@ -80,10 +80,15 @@
{
PerformFinish(() =>
{
- calculation.Output = ProbabilityAssessmentService.Calculate(assessmentSection.FailureMechanismContribution.Norm,
- failureMechanism.Contribution,
- failureMechanism.GeneralInput.N,
- Output.Beta);
+ calculation.Output = new GrassCoverErosionInwardsOutput(
+ Output.WaveHeight,
+ Output.IsOvertoppingDominant,
+ ProbabilityAssessmentService.Calculate(
+ assessmentSection.FailureMechanismContribution.Norm,
+ failureMechanism.Contribution,
+ failureMechanism.GeneralInput.N,
+ Output.Beta)
+ );
}, calculation);
}
}
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationService.cs
===================================================================
diff -u -r150366ef474f9522b3af857c29e3eac484910700 -rdf02e9274a94d8763da204833a4d93f984e242c6
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationService.cs (.../GrassCoverErosionInwardsCalculationService.cs) (revision 150366ef474f9522b3af857c29e3eac484910700)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationService.cs (.../GrassCoverErosionInwardsCalculationService.cs) (revision df02e9274a94d8763da204833a4d93f984e242c6)
@@ -66,12 +66,13 @@
/// The id of the ring to perform the calculation for.
/// Calculation input parameters that apply to all instances.
/// A on a successful calculation, null otherwise.
- internal static ExceedanceProbabilityCalculationOutput Calculate(GrassCoverErosionInwardsCalculation calculation,
+ internal static GrassCoverErosionInwardsCalculationServiceOutput Calculate(GrassCoverErosionInwardsCalculation calculation,
string hlcdDirectory, FailureMechanismSection failureMechanismSection,
string ringId, GeneralGrassCoverErosionInwardsInput generalInput)
{
OvertoppingCalculationInput input = CreateInput(calculation, failureMechanismSection, generalInput);
var exceedanceProbabilityCalculationParser = new ExceedanceProbabilityCalculationParser();
+ var waveHeightCalculationParser = new WaveHeightCalculationParser();
CalculationServiceHelper.PerformCalculation(
calculation.Name,
@@ -83,20 +84,29 @@
HydraRingTimeIntegrationSchemeType.FerryBorgesCastanheta,
HydraRingUncertaintiesType.All,
input,
- new[]
+ new IHydraRingFileParser[]
{
- exceedanceProbabilityCalculationParser
+ exceedanceProbabilityCalculationParser,
+ waveHeightCalculationParser
});
- VerifyOutput(exceedanceProbabilityCalculationParser.Output, calculation.Name);
+ VerifyOutput(exceedanceProbabilityCalculationParser.Output, waveHeightCalculationParser.Output, calculation.Name);
});
- return exceedanceProbabilityCalculationParser.Output;
+ if (exceedanceProbabilityCalculationParser.Output == null || waveHeightCalculationParser.Output == null)
+ {
+ return null;
+ }
+
+ return new GrassCoverErosionInwardsCalculationServiceOutput(
+ exceedanceProbabilityCalculationParser.Output.Beta,
+ waveHeightCalculationParser.Output.WaveHeight,
+ waveHeightCalculationParser.Output.IsOvertoppingDominant);
}
- private static void VerifyOutput(ExceedanceProbabilityCalculationOutput output, string name)
+ private static void VerifyOutput(ExceedanceProbabilityCalculationOutput exceedanceOutput, WaveHeightCalculationOutput waveHeightOutput, string name)
{
- if (output == null)
+ if (exceedanceOutput == null || waveHeightOutput == null)
{
log.ErrorFormat(Resources.GrassCoverErosionInwardsCalculationService_Calculate_Error_in_grass_cover_erosion_inwards_0_calculation, name);
}
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationServiceOutput.cs
===================================================================
diff -u
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationServiceOutput.cs (revision 0)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationServiceOutput.cs (revision df02e9274a94d8763da204833a4d93f984e242c6)
@@ -0,0 +1,58 @@
+// 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.
+
+namespace Ringtoets.GrassCoverErosionInwards.Service
+{
+ ///
+ /// Class containing the results for a Grass Cover Erosion Inwards calculation.
+ ///
+ public class GrassCoverErosionInwardsCalculationServiceOutput
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The beta result of the calculation.
+ /// The wave height result of the calculation.
+ /// The value indicating wheter overtopping was dominant in the calculation.
+ public GrassCoverErosionInwardsCalculationServiceOutput(double beta, double waveHeight, bool isOvertoppingDominant)
+ {
+ Beta = beta;
+ WaveHeight = waveHeight;
+ IsOvertoppingDominant = isOvertoppingDominant;
+ }
+
+ ///
+ /// Gets the beta result.
+ ///
+ public double Beta { get; private set; }
+
+ ///
+ /// Gets the wave height that was a result of the wave height calculation.
+ ///
+ public double WaveHeight { get; private set; }
+
+ ///
+ /// Gets whether the overtopping sub failure mechanism was dominant over
+ /// the overflow sub failure mechanism.
+ ///
+ public bool IsOvertoppingDominant { get; private set; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/Ringtoets.GrassCoverErosionInwards.Service.csproj
===================================================================
diff -u -r3d9b418d483c122040e11a7e074d666c64e9d7b5 -rdf02e9274a94d8763da204833a4d93f984e242c6
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/Ringtoets.GrassCoverErosionInwards.Service.csproj (.../Ringtoets.GrassCoverErosionInwards.Service.csproj) (revision 3d9b418d483c122040e11a7e074d666c64e9d7b5)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/Ringtoets.GrassCoverErosionInwards.Service.csproj (.../Ringtoets.GrassCoverErosionInwards.Service.csproj) (revision df02e9274a94d8763da204833a4d93f984e242c6)
@@ -44,6 +44,7 @@
Properties\GlobalAssembly.cs
+
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/GrassCoverErosionInwardsCalculationTest.cs
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -rdf02e9274a94d8763da204833a4d93f984e242c6
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/GrassCoverErosionInwardsCalculationTest.cs (.../GrassCoverErosionInwardsCalculationTest.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/GrassCoverErosionInwardsCalculationTest.cs (.../GrassCoverErosionInwardsCalculationTest.cs) (revision df02e9274a94d8763da204833a4d93f984e242c6)
@@ -157,7 +157,7 @@
public void GetObservableOutput_Always_ReturnsOutput()
{
// Setup
- var output = new ProbabilityAssessmentOutput(0.2, 3.0, 0.4, 50.3, 16.3);
+ var output = new TestGrassCoverErosionInwardsOutput();
var calculation = new GrassCoverErosionInwardsCalculation
{
Output = output
@@ -170,9 +170,9 @@
Assert.AreSame(output, calculationOutput);
}
- private class TestGrassCoverErosionInwardsOutput : ProbabilityAssessmentOutput
+ private class TestGrassCoverErosionInwardsOutput : GrassCoverErosionInwardsOutput
{
- public TestGrassCoverErosionInwardsOutput() : base(0, 0, 0, 0, 0) {}
+ public TestGrassCoverErosionInwardsOutput() : base(0.0, true, new ProbabilityAssessmentOutput(0, 0, 0, 0, 0)) {}
}
}
}
\ No newline at end of file
Fisheye: Tag 7cfeb195650f713f29c53e9926499fa63e4c79ea refers to a dead (removed) revision in file `Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsOutputPropertiesTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj
===================================================================
diff -u -rd4ed1c771cbd7c3ddc66c6f916eaf6e63bff6efe -rdf02e9274a94d8763da204833a4d93f984e242c6
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj (.../Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj) (revision d4ed1c771cbd7c3ddc66c6f916eaf6e63bff6efe)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj (.../Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj) (revision df02e9274a94d8763da204833a4d93f984e242c6)
@@ -66,6 +66,7 @@
True
Resources.resx
+
@@ -86,12 +87,12 @@
-
+
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs
===================================================================
diff -u -rccb1ae6dd94418a50100552563a0d81008fddfab -rdf02e9274a94d8763da204833a4d93f984e242c6
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs) (revision ccb1ae6dd94418a50100552563a0d81008fddfab)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs) (revision df02e9274a94d8763da204833a4d93f984e242c6)
@@ -150,7 +150,7 @@
var calculation = new GrassCoverErosionInwardsCalculation
{
- Output = new ProbabilityAssessmentOutput(0, 0, 0, 0, 0)
+ Output = new GrassCoverErosionInwardsOutput(0, true, new ProbabilityAssessmentOutput(0, 0, 0, 0, 0))
};
var failureMechanism = new GrassCoverErosionInwardsFailureMechanism();
var calculationContext = new GrassCoverErosionInwardsCalculationContext(calculation, failureMechanism, assessmentSectionMock);
@@ -169,7 +169,7 @@
Assert.IsNotNull(grassCoverErosionInwardsInputContext);
Assert.AreSame(calculationContext.WrappedData.InputParameters, grassCoverErosionInwardsInputContext.WrappedData);
- var output = children[2] as ProbabilityAssessmentOutput;
+ var output = children[2] as GrassCoverErosionInwardsOutput;
Assert.IsNotNull(output);
}
@@ -602,7 +602,7 @@
var calculation = new GrassCoverErosionInwardsCalculation
{
- Output = new ProbabilityAssessmentOutput(double.NaN, double.NaN, double.NaN, double.NaN, double.NaN),
+ Output = new GrassCoverErosionInwardsOutput(0, true, new ProbabilityAssessmentOutput(double.NaN, double.NaN, double.NaN, double.NaN, double.NaN)),
InputParameters =
{
HydraulicBoundaryLocation = hydraulicBoundaryLocation,
Fisheye: Tag a97bb5cc5d80058a536b95a62c4cde7c89d6ef76 refers to a dead (removed) revision in file `Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsOutputTreeNodeInfoTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag df02e9274a94d8763da204833a4d93f984e242c6 refers to a dead (removed) revision in file `Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/ProbabilityAssessmentOutputTreeNodeInfoTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Integration.Test/GrassCoverErosionInwardsCalculationServiceIntegrationTest.cs
===================================================================
diff -u -r4f11123aadb507f2ae9093b614360ab1973edd6e -rdf02e9274a94d8763da204833a4d93f984e242c6
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Integration.Test/GrassCoverErosionInwardsCalculationServiceIntegrationTest.cs (.../GrassCoverErosionInwardsCalculationServiceIntegrationTest.cs) (revision 4f11123aadb507f2ae9093b614360ab1973edd6e)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Integration.Test/GrassCoverErosionInwardsCalculationServiceIntegrationTest.cs (.../GrassCoverErosionInwardsCalculationServiceIntegrationTest.cs) (revision df02e9274a94d8763da204833a4d93f984e242c6)
@@ -224,7 +224,7 @@
};
var failureMechanismSection = assessmentSection.GrassCoverErosionInwards.Sections.First();
- ExceedanceProbabilityCalculationOutput output = null;
+ GrassCoverErosionInwardsCalculationServiceOutput output = null;
// Call
Action call = () => output = GrassCoverErosionInwardsCalculationService.Calculate(calculation,
@@ -266,7 +266,7 @@
};
var failureMechanismSection = assessmentSection.GrassCoverErosionInwards.Sections.First();
- ExceedanceProbabilityCalculationOutput output = null;
+ GrassCoverErosionInwardsCalculationServiceOutput output = null;
// Call
Action call = () => output = GrassCoverErosionInwardsCalculationService.Calculate(calculation,
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/GrassCoverErosionInwardsGuiPluginTest.cs
===================================================================
diff -u -r9bd00cf5c538409ebb1c1c68f90ca0146e93d155 -rdf02e9274a94d8763da204833a4d93f984e242c6
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/GrassCoverErosionInwardsGuiPluginTest.cs (.../GrassCoverErosionInwardsGuiPluginTest.cs) (revision 9bd00cf5c538409ebb1c1c68f90ca0146e93d155)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/GrassCoverErosionInwardsGuiPluginTest.cs (.../GrassCoverErosionInwardsGuiPluginTest.cs) (revision df02e9274a94d8763da204833a4d93f984e242c6)
@@ -63,7 +63,7 @@
PropertyInfo[] propertyInfos = guiPlugin.GetPropertyInfos().ToArray();
// assert
- Assert.AreEqual(3, propertyInfos.Length);
+ Assert.AreEqual(4, propertyInfos.Length);
var failureMechanismContextProperties = propertyInfos.Single(pi => pi.DataType == typeof(GrassCoverErosionInwardsFailureMechanismContext));
Assert.AreEqual(typeof(GrassCoverErosionInwardsFailureMechanismContextProperties), failureMechanismContextProperties.PropertyObjectType);
@@ -83,6 +83,12 @@
Assert.IsNull(inputContextProperties.GetObjectPropertiesData);
Assert.IsNull(inputContextProperties.AfterCreate);
+ var outputProperties = propertyInfos.Single(pi => pi.DataType == typeof(GrassCoverErosionInwardsOutput));
+ Assert.AreEqual(typeof(GrassCoverErosionInwardsOutputProperties), outputProperties.PropertyObjectType);
+ Assert.IsNull(outputProperties.AdditionalDataCheck);
+ Assert.IsNull(outputProperties.GetObjectPropertiesData);
+ Assert.IsNull(outputProperties.AfterCreate);
+
mocks.VerifyAll();
}
}
@@ -118,7 +124,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(EmptyProbabilityAssessmentOutput)));
- Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(ProbabilityAssessmentOutput)));
+ Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(GrassCoverErosionInwardsOutput)));
}
mocks.VerifyAll();
}
Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Parsers/WaveHeightCalculationParser.cs
===================================================================
diff -u -r150366ef474f9522b3af857c29e3eac484910700 -rdf02e9274a94d8763da204833a4d93f984e242c6
--- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Parsers/WaveHeightCalculationParser.cs (.../WaveHeightCalculationParser.cs) (revision 150366ef474f9522b3af857c29e3eac484910700)
+++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Parsers/WaveHeightCalculationParser.cs (.../WaveHeightCalculationParser.cs) (revision df02e9274a94d8763da204833a4d93f984e242c6)
@@ -28,6 +28,9 @@
namespace Ringtoets.HydraRing.Calculation.Parsers
{
+ ///
+ /// Class for parsing wave height results from a Grass Cover Erosion Inwards calculation.
+ ///
public class WaveHeightCalculationParser : IHydraRingFileParser
{
private class GeneralResult
@@ -60,12 +63,18 @@
private readonly List overflowResults;
private int governingWindDirection;
+ ///
+ /// Creates a new instance of .
+ ///
public WaveHeightCalculationParser()
{
overtoppingResults = new List();
overflowResults = new List();
}
+ ///
+ /// Gets the output that was parsed from the output file.
+ ///
public WaveHeightCalculationOutput Output { get; private set; }
public void Parse(string workingDirectory, int sectionId)
Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Parsers/ExceedanceProbabilityCalculationParserTest.cs
===================================================================
diff -u -r150366ef474f9522b3af857c29e3eac484910700 -rdf02e9274a94d8763da204833a4d93f984e242c6
--- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Parsers/ExceedanceProbabilityCalculationParserTest.cs (.../ExceedanceProbabilityCalculationParserTest.cs) (revision 150366ef474f9522b3af857c29e3eac484910700)
+++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Parsers/ExceedanceProbabilityCalculationParserTest.cs (.../ExceedanceProbabilityCalculationParserTest.cs) (revision df02e9274a94d8763da204833a4d93f984e242c6)
@@ -32,9 +32,15 @@
[TestFixture]
public class ExceedanceProbabilityCalculationParserTest
{
- private const string workingDirectory = "tempDir";
+ private string workingDirectory;
private readonly string testDataPath = Path.Combine(TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.Calculation, "Parsers"), "ExceedanceProbabilityCalculationParser");
+ [SetUp]
+ public void SetUp()
+ {
+ workingDirectory = Path.GetRandomFileName();
+ }
+
[Test]
public void DefaultConstructor_SetDefaultValues()
{
Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Parsers/TargetProbabilityCalculationParserTest.cs
===================================================================
diff -u -r150366ef474f9522b3af857c29e3eac484910700 -rdf02e9274a94d8763da204833a4d93f984e242c6
--- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Parsers/TargetProbabilityCalculationParserTest.cs (.../TargetProbabilityCalculationParserTest.cs) (revision 150366ef474f9522b3af857c29e3eac484910700)
+++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Parsers/TargetProbabilityCalculationParserTest.cs (.../TargetProbabilityCalculationParserTest.cs) (revision df02e9274a94d8763da204833a4d93f984e242c6)
@@ -30,9 +30,15 @@
[TestFixture]
public class TargetProbabilityCalculationParserTest
{
- private const string workingDirectory = "tempDir";
+ private string workingDirectory;
private readonly string testDataPath = Path.Combine(TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.Calculation, "Parsers"), "TargetProbabilityCalculationParser");
+ [SetUp]
+ public void SetUp()
+ {
+ workingDirectory = Path.GetRandomFileName();
+ }
+
[Test]
public void DefaultConstructor_SetDefaultValues()
{
Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Parsers/WaveHeightCalculationParserTest.cs
===================================================================
diff -u -r150366ef474f9522b3af857c29e3eac484910700 -rdf02e9274a94d8763da204833a4d93f984e242c6
--- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Parsers/WaveHeightCalculationParserTest.cs (.../WaveHeightCalculationParserTest.cs) (revision 150366ef474f9522b3af857c29e3eac484910700)
+++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Parsers/WaveHeightCalculationParserTest.cs (.../WaveHeightCalculationParserTest.cs) (revision df02e9274a94d8763da204833a4d93f984e242c6)
@@ -19,7 +19,6 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
-using System;
using System.IO;
using Core.Common.TestUtil;
using NUnit.Framework;
@@ -31,9 +30,15 @@
[TestFixture]
public class WaveHeightCalculationParserTest
{
- private readonly string workingDirectory = "tempDir";
+ private string workingDirectory;
private readonly string testDataPath = Path.Combine(TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.Calculation, "Parsers"), "WaveHeightCalculationParser");
+ [SetUp]
+ public void SetUp()
+ {
+ workingDirectory = Path.GetRandomFileName();
+ }
+
[Test]
public void DefaultConstructor_SetDefaultValues()
{
Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsGuiPlugin.cs
===================================================================
diff -u -r59fdaa6c22f0c665ee9331cc4361e3944914f8a2 -rdf02e9274a94d8763da204833a4d93f984e242c6
--- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsGuiPlugin.cs (.../RingtoetsGuiPlugin.cs) (revision 59fdaa6c22f0c665ee9331cc4361e3944914f8a2)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsGuiPlugin.cs (.../RingtoetsGuiPlugin.cs) (revision df02e9274a94d8763da204833a4d93f984e242c6)
@@ -421,6 +421,17 @@
.AddOpenItem()
.Build()
};
+
+ yield return new TreeNodeInfo
+ {
+ Text = output => RingtoetsCommonFormsResources.CalculationOutput_DisplayName,
+ Image = output => RingtoetsCommonFormsResources.GeneralOutputIcon,
+ ContextMenuStrip = (nodeData, parentData, treeViewControl) => Gui.Get(nodeData, treeViewControl)
+ .AddExportItem()
+ .AddSeparator()
+ .AddPropertiesItem()
+ .Build()
+ };
}
private static ViewInfo, IEnumerable, TView>
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj
===================================================================
diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -rdf02e9274a94d8763da204833a4d93f984e242c6
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj (.../Ringtoets.Integration.Forms.Test.csproj) (revision ce94b8228bc7e51779b3754217580f13cb35e475)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj (.../Ringtoets.Integration.Forms.Test.csproj) (revision df02e9274a94d8763da204833a4d93f984e242c6)
@@ -69,6 +69,7 @@
+
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/ProbabilityAssessmentOutputTreeNodeInfoTest.cs
===================================================================
diff -u
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/ProbabilityAssessmentOutputTreeNodeInfoTest.cs (revision 0)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/ProbabilityAssessmentOutputTreeNodeInfoTest.cs (revision df02e9274a94d8763da204833a4d93f984e242c6)
@@ -0,0 +1,139 @@
+// 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.Linq;
+using Core.Common.Controls.TreeView;
+using Core.Common.Gui;
+using Core.Common.Gui.ContextMenu;
+using Core.Common.TestUtil;
+using NUnit.Framework;
+using Rhino.Mocks;
+using Ringtoets.Common.Data.Probability;
+using Ringtoets.Integration.Plugin;
+using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources;
+
+namespace Ringtoets.Integration.Forms.Test.TreeNodeInfos
+{
+ [TestFixture]
+ public class ProbabilityAssessmentOutputTreeNodeInfoTest
+ {
+ private MockRepository mocksRepository;
+ private RingtoetsGuiPlugin plugin;
+ private TreeNodeInfo info;
+
+ [SetUp]
+ public void SetUp()
+ {
+ mocksRepository = new MockRepository();
+ plugin = new RingtoetsGuiPlugin();
+ info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(ProbabilityAssessmentOutput));
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ plugin.Dispose();
+ mocksRepository.VerifyAll();
+ }
+
+ [Test]
+ public void Initialized_Always_ExpectedPropertiesSet()
+ {
+ // Setup
+ mocksRepository.ReplayAll();
+
+ // Assert
+ Assert.AreEqual(typeof(ProbabilityAssessmentOutput), info.TagType);
+ Assert.IsNotNull(info.Text);
+ Assert.IsNotNull(info.Image);
+ Assert.IsNotNull(info.ContextMenuStrip);
+ Assert.IsNull(info.ForeColor);
+ Assert.IsNull(info.EnsureVisibleOnCreate);
+ Assert.IsNull(info.ChildNodeObjects);
+ Assert.IsNull(info.CanRename);
+ Assert.IsNull(info.OnNodeRenamed);
+ Assert.IsNull(info.CanRemove);
+ Assert.IsNull(info.OnNodeRemoved);
+ Assert.IsNull(info.CanCheck);
+ Assert.IsNull(info.IsChecked);
+ Assert.IsNull(info.OnNodeChecked);
+ Assert.IsNull(info.CanDrag);
+ Assert.IsNull(info.CanDrop);
+ Assert.IsNull(info.CanInsert);
+ Assert.IsNull(info.OnDrop);
+ }
+
+ [Test]
+ public void Text_Always_ReturnsFromResource()
+ {
+ // Setup
+ mocksRepository.ReplayAll();
+
+ // Call
+ var text = info.Text(null);
+
+ // Assert
+ Assert.AreEqual(RingtoetsCommonFormsResources.CalculationOutput_DisplayName, text);
+ }
+
+ [Test]
+ public void Image_Always_ReturnsGeneralOutputIcon()
+ {
+ // Setup
+ mocksRepository.ReplayAll();
+
+ // Call
+ var image = info.Image(null);
+
+ // Assert
+ TestHelper.AssertImagesAreEqual(RingtoetsCommonFormsResources.GeneralOutputIcon, image);
+ }
+
+ [Test]
+ public void ContextMenuStrip_Always_CallsContextMenuBuilderMethods()
+ {
+ // Setup
+ var guiMock = mocksRepository.StrictMock();
+ guiMock.Stub(g => g.ProjectOpened += null).IgnoreArguments();
+ guiMock.Stub(g => g.ProjectOpened -= null).IgnoreArguments();
+ var menuBuilderMock = mocksRepository.StrictMock();
+
+ menuBuilderMock.Expect(mb => mb.AddExportItem()).Return(menuBuilderMock);
+ menuBuilderMock.Expect(mb => mb.AddSeparator()).Return(menuBuilderMock);
+ menuBuilderMock.Expect(mb => mb.AddPropertiesItem()).Return(menuBuilderMock);
+ menuBuilderMock.Expect(mb => mb.Build()).Return(null);
+
+
+ using (var treeViewControl = new TreeViewControl())
+ {
+ guiMock.Expect(cmp => cmp.Get(null, treeViewControl)).Return(menuBuilderMock);
+ mocksRepository.ReplayAll();
+
+ plugin.Gui = guiMock;
+
+ // Call
+ info.ContextMenuStrip(null, null, treeViewControl);
+ }
+ // Assert
+ // Assert expectancies called in TearDown()
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsGuiPluginTest.cs
===================================================================
diff -u -r20415b2886919a103cb4677f56a8f61abbb7aa8a -rdf02e9274a94d8763da204833a4d93f984e242c6
--- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsGuiPluginTest.cs (.../RingtoetsGuiPluginTest.cs) (revision 20415b2886919a103cb4677f56a8f61abbb7aa8a)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsGuiPluginTest.cs (.../RingtoetsGuiPluginTest.cs) (revision df02e9274a94d8763da204833a4d93f984e242c6)
@@ -355,7 +355,7 @@
TreeNodeInfo[] treeNodeInfos = guiPlugin.GetTreeNodeInfos().ToArray();
// Assert
- Assert.AreEqual(23, treeNodeInfos.Length);
+ Assert.AreEqual(24, treeNodeInfos.Length);
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(IAssessmentSection)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(ReferenceLineContext)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(FailureMechanismContext)));
@@ -379,6 +379,7 @@
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(FailureMechanismSectionResultContext)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(FailureMechanismSectionResultContext)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(CommentContext)));
+ Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(ProbabilityAssessmentOutput)));
}
mocks.VerifyAll();
}