Index: Demo/Ringtoets/src/Demo.Ringtoets/Demo.Ringtoets.csproj
===================================================================
diff -u -rf2be29fe8c407a4f32cb1bfcbaf4816c1f99c83f -r50731952f4ed66c06d672328387d581277b1d970
--- Demo/Ringtoets/src/Demo.Ringtoets/Demo.Ringtoets.csproj (.../Demo.Ringtoets.csproj) (revision f2be29fe8c407a4f32cb1bfcbaf4816c1f99c83f)
+++ Demo/Ringtoets/src/Demo.Ringtoets/Demo.Ringtoets.csproj (.../Demo.Ringtoets.csproj) (revision 50731952f4ed66c06d672328387d581277b1d970)
@@ -157,6 +157,11 @@
Ringtoets.GrassCoverErosionOutwards.DataFalse
+
+ {9b3ed064-e29f-4d38-85e0-3a82b77ba702}
+ Ringtoets.GrassCoverErosionOutwards.Plugin
+ False
+ {1C0017D8-35B5-4CA0-8FC7-A83F46DBDC99}Ringtoets.HeightStructures.Data
Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsFailureMechanismExtensions.cs
===================================================================
diff -u
--- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsFailureMechanismExtensions.cs (revision 0)
+++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsFailureMechanismExtensions.cs (revision 50731952f4ed66c06d672328387d581277b1d970)
@@ -0,0 +1,53 @@
+// 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 Ringtoets.GrassCoverErosionOutwards.Data;
+using Ringtoets.HydraRing.Data;
+
+namespace Ringtoets.Integration.Plugin
+{
+ ///
+ /// Defines extension methods dealing with instances.
+ ///
+ public static class GrassCoverErosionOutwardsFailureMechanismExtensions
+ {
+ ///
+ /// Sets
+ /// based upon the .
+ ///
+ /// The to update.
+ /// The database to use.
+ public static void SetGrassCoverErosionOutwardsHydraulicBoundaryLocations(this GrassCoverErosionOutwardsFailureMechanism failureMechanism,
+ HydraulicBoundaryDatabase hydraulicBoundaryDatabase)
+ {
+ failureMechanism.GrassCoverErosionOutwardsHydraulicBoundaryLocations.Clear();
+ if (hydraulicBoundaryDatabase == null)
+ {
+ return;
+ }
+
+ foreach (var hydraulicBoundaryLocation in hydraulicBoundaryDatabase.Locations)
+ {
+ failureMechanism.GrassCoverErosionOutwardsHydraulicBoundaryLocations.Add(new GrassCoverErosionOutwardsHydraulicBoundaryLocation(hydraulicBoundaryLocation));
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/Ringtoets.GrassCoverErosionOutwards.Plugin.csproj
===================================================================
diff -u -r3d27194c4194dd405ab3471818957a64a59a0f19 -r50731952f4ed66c06d672328387d581277b1d970
--- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/Ringtoets.GrassCoverErosionOutwards.Plugin.csproj (.../Ringtoets.GrassCoverErosionOutwards.Plugin.csproj) (revision 3d27194c4194dd405ab3471818957a64a59a0f19)
+++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/Ringtoets.GrassCoverErosionOutwards.Plugin.csproj (.../Ringtoets.GrassCoverErosionOutwards.Plugin.csproj) (revision 50731952f4ed66c06d672328387d581277b1d970)
@@ -41,6 +41,7 @@
Properties\GlobalAssembly.cs
+
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/ExportInfos/HydraulicBoundariesGroupContextExportInfoTest.cs
===================================================================
diff -u
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/ExportInfos/HydraulicBoundariesGroupContextExportInfoTest.cs (revision 0)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/ExportInfos/HydraulicBoundariesGroupContextExportInfoTest.cs (revision 50731952f4ed66c06d672328387d581277b1d970)
@@ -0,0 +1,140 @@
+// 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.Base.IO;
+using Core.Common.Gui.Plugin;
+using NUnit.Framework;
+using Rhino.Mocks;
+using Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.IO;
+using Ringtoets.GrassCoverErosionOutwards.Data;
+using Ringtoets.GrassCoverErosionOutwards.Forms.PresentationObjects;
+using Ringtoets.GrassCoverErosionOutwards.Plugin;
+using Ringtoets.HydraRing.Data;
+using Ringtoets.Integration.Plugin;
+using RingtoetsCommonIoResources = Ringtoets.Common.IO.Properties.Resources;
+
+namespace Ringtoets.GrassCoverErosionOutwards.Forms.Test.ExportInfos
+{
+ [TestFixture]
+ public class HydraulicBoundariesGroupContextExportInfoTest
+ {
+ [Test]
+ public void Initialized_Always_ExpectedPropertiesSet()
+ {
+ // Setup
+ var mockRepository = new MockRepository();
+ var assessmentSectionMock = mockRepository.StrictMock();
+ mockRepository.ReplayAll();
+ var failureMechanism = new GrassCoverErosionOutwardsFailureMechanism();
+
+ var context = new HydraulicBoundariesGroupContext(failureMechanism, assessmentSectionMock);
+ string filePath = "test";
+
+ using (GrassCoverErosionOutwardsPlugin plugin = new GrassCoverErosionOutwardsPlugin())
+ {
+ ExportInfo info = GetInfo(plugin);
+
+ // Call
+ IFileExporter fileExporter = info.CreateFileExporter(context, filePath);
+
+ // Assert
+ Assert.IsInstanceOf(fileExporter);
+ mockRepository.VerifyAll();
+ }
+ }
+
+ [Test]
+ public void FileFilter_Always_ReturnsFileFilter()
+ {
+ // Setup
+ using (GrassCoverErosionOutwardsPlugin plugin = new GrassCoverErosionOutwardsPlugin())
+ {
+ ExportInfo info = GetInfo(plugin);
+
+ // Call
+ string fileFilter = info.FileFilter;
+
+ // Assert
+ Assert.AreEqual(RingtoetsCommonIoResources.DataTypeDisplayName_shape_file_filter, fileFilter);
+ }
+ }
+
+ [Test]
+ public void IsEnabled_GrassCoverErosionOutwardsHydraulicBoundaryLocationsEmpty_ReturnsFalse()
+ {
+ // Setup
+ var mockRepository = new MockRepository();
+ var assessmentSectionMock = mockRepository.StrictMock();
+ mockRepository.ReplayAll();
+ var failureMechanism = new GrassCoverErosionOutwardsFailureMechanism();
+
+ var context = new HydraulicBoundariesGroupContext(failureMechanism, assessmentSectionMock);
+
+ using (GrassCoverErosionOutwardsPlugin plugin = new GrassCoverErosionOutwardsPlugin())
+ {
+ ExportInfo info = GetInfo(plugin);
+
+ // Call
+ bool isEnabled = info.IsEnabled(context);
+
+ // Assert
+ Assert.IsFalse(isEnabled);
+ }
+ }
+
+ [Test]
+ public void IsEnabled_GrassCoverErosionOutwardsHydraulicBoundaryLocationsNotEmpty_ReturnsTrue()
+ {
+ // Setup
+ var mockRepository = new MockRepository();
+ var assessmentSectionMock = mockRepository.StrictMock();
+ mockRepository.ReplayAll();
+ var failureMechanism = new GrassCoverErosionOutwardsFailureMechanism();
+ failureMechanism.SetGrassCoverErosionOutwardsHydraulicBoundaryLocations(new HydraulicBoundaryDatabase
+ {
+ Locations =
+ {
+ new HydraulicBoundaryLocation(0, "aName", 0, 0)
+ }
+ });
+
+ var context = new HydraulicBoundariesGroupContext(failureMechanism, assessmentSectionMock);
+
+ using (GrassCoverErosionOutwardsPlugin plugin = new GrassCoverErosionOutwardsPlugin())
+ {
+ ExportInfo info = GetInfo(plugin);
+
+ // Call
+ bool isEnabled = info.IsEnabled(context);
+
+ // Assert
+ Assert.IsTrue(isEnabled);
+ }
+ }
+
+ private static ExportInfo GetInfo(GrassCoverErosionOutwardsPlugin plugin)
+ {
+ return plugin.GetExportInfos().First(ei => ei.DataType == typeof(HydraulicBoundariesGroupContext));
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Ringtoets.GrassCoverErosionOutwards.Forms.Test.csproj
===================================================================
diff -u -r248229db928c9e5556be704ed274226f80b4ef19 -r50731952f4ed66c06d672328387d581277b1d970
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Ringtoets.GrassCoverErosionOutwards.Forms.Test.csproj (.../Ringtoets.GrassCoverErosionOutwards.Forms.Test.csproj) (revision 248229db928c9e5556be704ed274226f80b4ef19)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Ringtoets.GrassCoverErosionOutwards.Forms.Test.csproj (.../Ringtoets.GrassCoverErosionOutwards.Forms.Test.csproj) (revision 50731952f4ed66c06d672328387d581277b1d970)
@@ -61,6 +61,7 @@
Properties\GlobalAssembly.cs
+
@@ -130,6 +131,10 @@
{4D840673-3812-4338-A352-84854E32B8A0}Ringtoets.Common.Forms
+
+ {52BA7627-CBAB-4209-BE77-3B5F31378277}
+ Ringtoets.Common.IO
+ {d951d6da-fe83-4920-9fdb-63bf96480b54}Ringtoets.Common.Service
Fisheye: Tag 50731952f4ed66c06d672328387d581277b1d970 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.Plugin/GrassCoverErosionOutwardsFailureMechanismExtensions.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Ringtoets.Integration.Plugin.csproj
===================================================================
diff -u -rd2b9feaf8aceaa9a96d0e6e19fd6fbbee8987ca6 -r50731952f4ed66c06d672328387d581277b1d970
--- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Ringtoets.Integration.Plugin.csproj (.../Ringtoets.Integration.Plugin.csproj) (revision d2b9feaf8aceaa9a96d0e6e19fd6fbbee8987ca6)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Ringtoets.Integration.Plugin.csproj (.../Ringtoets.Integration.Plugin.csproj) (revision 50731952f4ed66c06d672328387d581277b1d970)
@@ -60,7 +60,6 @@
- True
@@ -108,6 +107,11 @@
Core.Components.Gis.FormsFalse
+
+ {9b3ed064-e29f-4d38-85e0-3a82b77ba702}
+ Ringtoets.GrassCoverErosionOutwards.Plugin
+ False
+ {567E0B69-5280-41CE-ADD6-443725A61C86}Ringtoets.WaveImpactAsphaltCover.Data
Fisheye: Tag 50731952f4ed66c06d672328387d581277b1d970 refers to a dead (removed) revision in file `Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/ExportInfos/HydraulicBoundariesGroupContextExportInfoTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj
===================================================================
diff -u -rd58a7ff7f54c83dfe5d1ef28417c43a83346b5ba -r50731952f4ed66c06d672328387d581277b1d970
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj (.../Ringtoets.Integration.Forms.Test.csproj) (revision d58a7ff7f54c83dfe5d1ef28417c43a83346b5ba)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj (.../Ringtoets.Integration.Forms.Test.csproj) (revision 50731952f4ed66c06d672328387d581277b1d970)
@@ -66,7 +66,6 @@
-