Index: Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/Views/DikeHeightOutputGeneralResultFaultTreeIllustrationPointView.cs
===================================================================
diff -u -r1f76045f08612f7b8259c460771c7cdbdb5447a7 -r7da32973d26d568b9f5fce1de5a35dc62c40320f
--- Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/Views/DikeHeightOutputGeneralResultFaultTreeIllustrationPointView.cs (.../DikeHeightOutputGeneralResultFaultTreeIllustrationPointView.cs) (revision 1f76045f08612f7b8259c460771c7cdbdb5447a7)
+++ Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/Views/DikeHeightOutputGeneralResultFaultTreeIllustrationPointView.cs (.../DikeHeightOutputGeneralResultFaultTreeIllustrationPointView.cs) (revision 7da32973d26d568b9f5fce1de5a35dc62c40320f)
@@ -35,11 +35,14 @@
///
/// Creates a new instance of .
///
+ /// The calculation to show the illustration points for.
/// A for obtaining the illustration point
/// data ( with objects)
/// that must be presented.
- /// Thrown when is null.
- public DikeHeightOutputGeneralResultFaultTreeIllustrationPointView(Func> getGeneralResultFunc)
- : base(getGeneralResultFunc) {}
+ /// Thrown when any parameter is null.
+ public DikeHeightOutputGeneralResultFaultTreeIllustrationPointView(
+ GrassCoverErosionInwardsCalculation calculation,
+ Func> getGeneralResultFunc)
+ : base(calculation, getGeneralResultFunc) {}
}
}
\ No newline at end of file
Index: Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsPlugin.cs
===================================================================
diff -u -rfd572b1d0d0be95b5218314d9022665514b68caf -r7da32973d26d568b9f5fce1de5a35dc62c40320f
--- Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsPlugin.cs (.../GrassCoverErosionInwardsPlugin.cs) (revision fd572b1d0d0be95b5218314d9022665514b68caf)
+++ Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsPlugin.cs (.../GrassCoverErosionInwardsPlugin.cs) (revision 7da32973d26d568b9f5fce1de5a35dc62c40320f)
@@ -236,7 +236,7 @@
GetViewData = context => context.WrappedData,
CloseForData = RiskeerPluginHelper.ShouldCloseViewWithCalculationData,
CreateInstance = context => new DikeHeightOutputGeneralResultFaultTreeIllustrationPointView(
- () => context.WrappedData.Output?.DikeHeightOutput?.GeneralResult)
+ context.WrappedData, () => context.WrappedData.Output?.DikeHeightOutput?.GeneralResult)
};
yield return new ViewInfo
Index: Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Forms.Test/Views/DikeHeightOutputGeneralResultFaultTreeIllustrationPointViewTest.cs
===================================================================
diff -u -rf1a99bd6f1bfda45d8b7b4dbb8d7b7e51fcc718f -r7da32973d26d568b9f5fce1de5a35dc62c40320f
--- Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Forms.Test/Views/DikeHeightOutputGeneralResultFaultTreeIllustrationPointViewTest.cs (.../DikeHeightOutputGeneralResultFaultTreeIllustrationPointViewTest.cs) (revision f1a99bd6f1bfda45d8b7b4dbb8d7b7e51fcc718f)
+++ Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Forms.Test/Views/DikeHeightOutputGeneralResultFaultTreeIllustrationPointViewTest.cs (.../DikeHeightOutputGeneralResultFaultTreeIllustrationPointViewTest.cs) (revision 7da32973d26d568b9f5fce1de5a35dc62c40320f)
@@ -23,6 +23,7 @@
using NUnit.Framework;
using Riskeer.Common.Data.TestUtil.IllustrationPoints;
using Riskeer.Common.Forms.Views;
+using Riskeer.GrassCoverErosionInwards.Data;
using Riskeer.GrassCoverErosionInwards.Forms.Views;
namespace Riskeer.GrassCoverErosionInwards.Forms.Test.Views
@@ -35,7 +36,9 @@
public void Constructor_ExpectedValues()
{
// Call
- var view = new DikeHeightOutputGeneralResultFaultTreeIllustrationPointView(() => new TestGeneralResultFaultTreeIllustrationPoint());
+ var view = new DikeHeightOutputGeneralResultFaultTreeIllustrationPointView(
+ new GrassCoverErosionInwardsCalculation(),
+ () => new TestGeneralResultFaultTreeIllustrationPoint());
// Assert
Assert.IsInstanceOf(view);
Index: Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Plugin.Test/ViewInfos/DikeHeightOutputGeneralResultFaultTreeIllustrationPointViewInfoTest.cs
===================================================================
diff -u -rf1a99bd6f1bfda45d8b7b4dbb8d7b7e51fcc718f -r7da32973d26d568b9f5fce1de5a35dc62c40320f
--- Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Plugin.Test/ViewInfos/DikeHeightOutputGeneralResultFaultTreeIllustrationPointViewInfoTest.cs (.../DikeHeightOutputGeneralResultFaultTreeIllustrationPointViewInfoTest.cs) (revision f1a99bd6f1bfda45d8b7b4dbb8d7b7e51fcc718f)
+++ Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Plugin.Test/ViewInfos/DikeHeightOutputGeneralResultFaultTreeIllustrationPointViewInfoTest.cs (.../DikeHeightOutputGeneralResultFaultTreeIllustrationPointViewInfoTest.cs) (revision 7da32973d26d568b9f5fce1de5a35dc62c40320f)
@@ -35,20 +35,13 @@
public class DikeHeightOutputGeneralResultFaultTreeIllustrationPointViewInfoTest :
GrassCoverErosionInwardsOutputViewInfoTestBase
{
- protected override string ViewName
- {
- get
- {
- return "HBN";
- }
- }
+ protected override string ViewName => "HBN";
protected override IView GetView(ICalculation data)
{
- return new DikeHeightOutputGeneralResultFaultTreeIllustrationPointView(() => new TestGeneralResultFaultTreeIllustrationPoint())
- {
- Data = data
- };
+ return new DikeHeightOutputGeneralResultFaultTreeIllustrationPointView(
+ (GrassCoverErosionInwardsCalculationScenario) data,
+ () => new TestGeneralResultFaultTreeIllustrationPoint());
}
protected override DikeHeightOutputContext GetContext(GrassCoverErosionInwardsCalculation calculation)