Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/Ringtoets.GrassCoverErosionInwards.Plugin.Test.csproj
===================================================================
diff -u -ra2ee5918454ce223de0692add24a3cba72a90498 -r10c4bc363c570e20b905fcccbd55a2098ccfaa93
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/Ringtoets.GrassCoverErosionInwards.Plugin.Test.csproj (.../Ringtoets.GrassCoverErosionInwards.Plugin.Test.csproj) (revision a2ee5918454ce223de0692add24a3cba72a90498)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/Ringtoets.GrassCoverErosionInwards.Plugin.Test.csproj (.../Ringtoets.GrassCoverErosionInwards.Plugin.Test.csproj) (revision 10c4bc363c570e20b905fcccbd55a2098ccfaa93)
@@ -90,6 +90,9 @@
+
+
+
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/ViewInfos/DikeHeightOutputGeneralResultFaultTreeIllustrationPointViewInfoTest.cs
===================================================================
diff -u
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/ViewInfos/DikeHeightOutputGeneralResultFaultTreeIllustrationPointViewInfoTest.cs (revision 0)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/ViewInfos/DikeHeightOutputGeneralResultFaultTreeIllustrationPointViewInfoTest.cs (revision 10c4bc363c570e20b905fcccbd55a2098ccfaa93)
@@ -0,0 +1,85 @@
+// Copyright (C) Stichting Deltares 2017. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System.Linq;
+using Core.Common.Gui.Plugin;
+using Core.Common.TestUtil;
+using NUnit.Framework;
+using Ringtoets.GrassCoverErosionInwards.Data;
+using Ringtoets.GrassCoverErosionInwards.Forms.PresentationObjects;
+using Ringtoets.GrassCoverErosionInwards.Forms.Views;
+using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources;
+
+namespace Ringtoets.GrassCoverErosionInwards.Plugin.Test.ViewInfos
+{
+ [TestFixture]
+ public class DikeHeightOutputGeneralResultFaultTreeIllustrationPointViewInfoTest
+ {
+ private GrassCoverErosionInwardsPlugin plugin;
+ private ViewInfo info;
+
+ [SetUp]
+ public void SetUp()
+ {
+ plugin = new GrassCoverErosionInwardsPlugin();
+ info = plugin.GetViewInfos().First(tni => tni.ViewType == typeof(DikeHeightOutputGeneralResultFaultTreeIllustrationPointView));
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ plugin.Dispose();
+ }
+
+ [Test]
+ public void Initialized_Always_ExpectedPropertiesSet()
+ {
+ // Assert
+ Assert.AreEqual(typeof(DikeHeightOutputContext), info.DataType);
+ Assert.AreEqual(typeof(GrassCoverErosionInwardsCalculation), info.ViewDataType);
+ TestHelper.AssertImagesAreEqual(RingtoetsCommonFormsResources.GeneralOutputIcon, info.Image);
+ }
+
+ [Test]
+ public void GetViewName_Always_ReturnsDikeHeightOutputDisplayName()
+ {
+ // Call
+ string viewName = info.GetViewName(null, null);
+
+ // Assert
+ Assert.AreEqual("HBN", viewName);
+ }
+
+ [Test]
+ public void GetViewData_Always_ReturnsWrappedGrassCoverErosionInwardsCalculation()
+ {
+ // Setup
+ var calculation = new GrassCoverErosionInwardsCalculation();
+ var context = new DikeHeightOutputContext(calculation);
+
+ // Call
+ object viewData = info.GetViewData(context);
+
+ // Assert
+ Assert.AreSame(calculation, viewData);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/ViewInfos/OvertoppingOutputGeneralResultFaultTreeIllustrationPointViewInfoTest.cs
===================================================================
diff -u
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/ViewInfos/OvertoppingOutputGeneralResultFaultTreeIllustrationPointViewInfoTest.cs (revision 0)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/ViewInfos/OvertoppingOutputGeneralResultFaultTreeIllustrationPointViewInfoTest.cs (revision 10c4bc363c570e20b905fcccbd55a2098ccfaa93)
@@ -0,0 +1,85 @@
+// Copyright (C) Stichting Deltares 2017. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System.Linq;
+using Core.Common.Gui.Plugin;
+using Core.Common.TestUtil;
+using NUnit.Framework;
+using Ringtoets.GrassCoverErosionInwards.Data;
+using Ringtoets.GrassCoverErosionInwards.Forms.PresentationObjects;
+using Ringtoets.GrassCoverErosionInwards.Forms.Views;
+using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources;
+
+namespace Ringtoets.GrassCoverErosionInwards.Plugin.Test.ViewInfos
+{
+ [TestFixture]
+ public class OvertoppingOutputGeneralResultFaultTreeIllustrationPointViewInfoTest
+ {
+ private GrassCoverErosionInwardsPlugin plugin;
+ private ViewInfo info;
+
+ [SetUp]
+ public void SetUp()
+ {
+ plugin = new GrassCoverErosionInwardsPlugin();
+ info = plugin.GetViewInfos().First(tni => tni.ViewType == typeof(OvertoppingOutputGeneralResultFaultTreeIllustrationPointView));
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ plugin.Dispose();
+ }
+
+ [Test]
+ public void Initialized_Always_ExpectedPropertiesSet()
+ {
+ // Assert
+ Assert.AreEqual(typeof(OvertoppingOutputContext), info.DataType);
+ Assert.AreEqual(typeof(GrassCoverErosionInwardsCalculation), info.ViewDataType);
+ TestHelper.AssertImagesAreEqual(RingtoetsCommonFormsResources.GeneralOutputIcon, info.Image);
+ }
+
+ [Test]
+ public void GetViewName_Always_ReturnsOvertoppingOutputDisplayName()
+ {
+ // Call
+ string viewName = info.GetViewName(null, null);
+
+ // Assert
+ Assert.AreEqual("Sterkte berekening", viewName);
+ }
+
+ [Test]
+ public void GetViewData_Always_ReturnsWrappedGrassCoverErosionInwardsCalculation()
+ {
+ // Setup
+ var calculation = new GrassCoverErosionInwardsCalculation();
+ var context = new OvertoppingOutputContext(calculation);
+
+ // Call
+ object viewData = info.GetViewData(context);
+
+ // Assert
+ Assert.AreSame(calculation, viewData);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/ViewInfos/OvertoppingRateOutputGeneralResultFaultTreeIllustrationPointViewInfoTest.cs
===================================================================
diff -u
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/ViewInfos/OvertoppingRateOutputGeneralResultFaultTreeIllustrationPointViewInfoTest.cs (revision 0)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/ViewInfos/OvertoppingRateOutputGeneralResultFaultTreeIllustrationPointViewInfoTest.cs (revision 10c4bc363c570e20b905fcccbd55a2098ccfaa93)
@@ -0,0 +1,85 @@
+// Copyright (C) Stichting Deltares 2017. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System.Linq;
+using Core.Common.Gui.Plugin;
+using Core.Common.TestUtil;
+using NUnit.Framework;
+using Ringtoets.GrassCoverErosionInwards.Data;
+using Ringtoets.GrassCoverErosionInwards.Forms.PresentationObjects;
+using Ringtoets.GrassCoverErosionInwards.Forms.Views;
+using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources;
+
+namespace Ringtoets.GrassCoverErosionInwards.Plugin.Test.ViewInfos
+{
+ [TestFixture]
+ public class OvertoppingRateOutputGeneralResultFaultTreeIllustrationPointViewInfoTest
+ {
+ private GrassCoverErosionInwardsPlugin plugin;
+ private ViewInfo info;
+
+ [SetUp]
+ public void SetUp()
+ {
+ plugin = new GrassCoverErosionInwardsPlugin();
+ info = plugin.GetViewInfos().First(tni => tni.ViewType == typeof(OvertoppingRateOutputGeneralResultFaultTreeIllustrationPointView));
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ plugin.Dispose();
+ }
+
+ [Test]
+ public void Initialized_Always_ExpectedPropertiesSet()
+ {
+ // Assert
+ Assert.AreEqual(typeof(OvertoppingRateOutputContext), info.DataType);
+ Assert.AreEqual(typeof(GrassCoverErosionInwardsCalculation), info.ViewDataType);
+ TestHelper.AssertImagesAreEqual(RingtoetsCommonFormsResources.GeneralOutputIcon, info.Image);
+ }
+
+ [Test]
+ public void GetViewName_Always_ReturnsOvertoppingRateOutputDisplayName()
+ {
+ // Call
+ string viewName = info.GetViewName(null, null);
+
+ // Assert
+ Assert.AreEqual("Overslagdebiet", viewName);
+ }
+
+ [Test]
+ public void GetViewData_Always_ReturnsWrappedGrassCoverErosionInwardsCalculation()
+ {
+ // Setup
+ var calculation = new GrassCoverErosionInwardsCalculation();
+ var context = new OvertoppingRateOutputContext(calculation);
+
+ // Call
+ object viewData = info.GetViewData(context);
+
+ // Assert
+ Assert.AreSame(calculation, viewData);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/ViewInfos/GeneralResultFaultTreeIllustrationPointViewInfoTest.cs
===================================================================
diff -u -rebbeffd91eaea94fc32dad0d24b11b1db8d57b9b -r10c4bc363c570e20b905fcccbd55a2098ccfaa93
--- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/ViewInfos/GeneralResultFaultTreeIllustrationPointViewInfoTest.cs (.../GeneralResultFaultTreeIllustrationPointViewInfoTest.cs) (revision ebbeffd91eaea94fc32dad0d24b11b1db8d57b9b)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/ViewInfos/GeneralResultFaultTreeIllustrationPointViewInfoTest.cs (.../GeneralResultFaultTreeIllustrationPointViewInfoTest.cs) (revision 10c4bc363c570e20b905fcccbd55a2098ccfaa93)
@@ -75,17 +75,11 @@
[Test]
public void GetViewName_Always_ReturnsCalculationOutputDisplayName()
{
- // Setup
- using (var view = new GeneralResultFaultTreeIllustrationPointView(() => new TestGeneralResultFaultTreeIllustrationPoint()))
- {
- var calculation = new TestStructuresCalculation();
+ // Call
+ string viewName = info.GetViewName(null, null);
- // Call
- string viewName = info.GetViewName(view, calculation);
-
- // Assert
- Assert.AreEqual("Resultaat", viewName);
- }
+ // Assert
+ Assert.AreEqual("Resultaat", viewName);
}
[Test]
@@ -102,8 +96,7 @@
Assert.AreSame(calculation, viewData);
}
- [Ignore("Just a base class")]
- public class ShouldCloseGeneralResultFaultTreeIllustrationPointViewForStructuresTester : ShouldCloseViewWithCalculationDataTester
+ public abstract class ShouldCloseGeneralResultFaultTreeIllustrationPointViewForStructuresTester : ShouldCloseViewWithCalculationDataTester
{
protected override bool PerformShouldCloseViewWithCalculationDataMethod(IView view, object o)
{