Index: Core/Common/test/Core.Common.TestUtil.Test/TestHelperTest.cs
===================================================================
diff -u -rd2b9feaf8aceaa9a96d0e6e19fd6fbbee8987ca6 -rae04c23f970bb96e54adbfb8c2fe1aaf95d13326
--- Core/Common/test/Core.Common.TestUtil.Test/TestHelperTest.cs (.../TestHelperTest.cs) (revision d2b9feaf8aceaa9a96d0e6e19fd6fbbee8987ca6)
+++ Core/Common/test/Core.Common.TestUtil.Test/TestHelperTest.cs (.../TestHelperTest.cs) (revision ae04c23f970bb96e54adbfb8c2fe1aaf95d13326)
@@ -114,6 +114,9 @@
Assert.IsTrue(Directory.Exists(path));
path = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Piping.Plugin);
Assert.IsTrue(Directory.Exists(path));
+
+ path = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Revetment.IO);
+ Assert.IsTrue(Directory.Exists(path));
}
[Test]
Index: Core/Common/test/Core.Common.TestUtil/TestDataPath.cs
===================================================================
diff -u -rd2b9feaf8aceaa9a96d0e6e19fd6fbbee8987ca6 -rae04c23f970bb96e54adbfb8c2fe1aaf95d13326
--- Core/Common/test/Core.Common.TestUtil/TestDataPath.cs (.../TestDataPath.cs) (revision d2b9feaf8aceaa9a96d0e6e19fd6fbbee8987ca6)
+++ Core/Common/test/Core.Common.TestUtil/TestDataPath.cs (.../TestDataPath.cs) (revision ae04c23f970bb96e54adbfb8c2fe1aaf95d13326)
@@ -92,6 +92,11 @@
public static readonly TestDataPath IO = System.IO.Path.Combine("Ringtoets", "Piping", "test", "Ringtoets.Piping.IO.Test");
public static readonly TestDataPath Plugin = System.IO.Path.Combine("Ringtoets", "Piping", "test", "Ringtoets.Piping.Plugin.Test");
}
+
+ public static class Revetment
+ {
+ public static readonly TestDataPath IO = System.IO.Path.Combine("Ringtoets", "Revetment", "test", "Ringtoets.Revetment.IO.Test");
+ }
}
}
}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/HydraulicBoundaryLocationsExporterTest.cs
===================================================================
diff -u -ra0eac32f05f503713d027f116b0194040418ceb2 -rae04c23f970bb96e54adbfb8c2fe1aaf95d13326
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/HydraulicBoundaryLocationsExporterTest.cs (.../HydraulicBoundaryLocationsExporterTest.cs) (revision a0eac32f05f503713d027f116b0194040418ceb2)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/HydraulicBoundaryLocationsExporterTest.cs (.../HydraulicBoundaryLocationsExporterTest.cs) (revision ae04c23f970bb96e54adbfb8c2fe1aaf95d13326)
@@ -34,7 +34,7 @@
public class HydraulicBoundaryLocationsExporterTest
{
[Test]
- public void ParameteredConstructor_ValidParameters_ExpectedValues()
+ public void Constructor_ValidParameters_ExpectedValues()
{
// Setup
@@ -48,7 +48,7 @@
}
[Test]
- public void ParameteredConstructor_HydraulicBoundaryLocationsNull_ThrowsArgumentNullException()
+ public void Constructor_HydraulicBoundaryLocationsNull_ThrowsArgumentNullException()
{
// Setup
string filePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, "test.shp");
@@ -62,7 +62,7 @@
}
[Test]
- public void ParameteredConstructor_FilePathNull_ThrowArgumentException()
+ public void Constructor_FilePathNull_ThrowArgumentException()
{
// Setup
var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(123, "aName", 1.1, 2.2)
@@ -82,7 +82,7 @@
}
[Test]
- public void ParameteredConstructor_DesignWaterLevelNameNull_ThrowArgumentNullException()
+ public void Constructor_DesignWaterLevelNameNull_ThrowArgumentNullException()
{
// Setup
var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(123, "aName", 1.1, 2.2)
@@ -164,9 +164,13 @@
using (new DirectoryPermissionsRevoker(directoryPath, FileSystemRights.Write))
{
// Call
- var isExported = exporter.Export();
+ bool isExported = true;
+ Action call = () => isExported = exporter.Export();
// Assert
+ string expectedMessage = string.Format("Er is een onverwachte fout opgetreden tijdens het schrijven van het bestand '{0}'. " +
+ "Er zijn geen hydraulische randvoorwaarden locaties ge�xporteerd.", filePath);
+ TestHelper.AssertLogMessageIsGenerated(call, expectedMessage);
Assert.IsFalse(isExported);
}
}
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/ReferenceLineExporterTest.cs
===================================================================
diff -u -r7f759fbabca9c41e75d229269f1b21581b373b5f -rae04c23f970bb96e54adbfb8c2fe1aaf95d13326
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/ReferenceLineExporterTest.cs (.../ReferenceLineExporterTest.cs) (revision 7f759fbabca9c41e75d229269f1b21581b373b5f)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/ReferenceLineExporterTest.cs (.../ReferenceLineExporterTest.cs) (revision ae04c23f970bb96e54adbfb8c2fe1aaf95d13326)
@@ -116,9 +116,12 @@
using (new DirectoryPermissionsRevoker(directoryPath, FileSystemRights.Write))
{
// Call
- bool isExported = exporter.Export();
+ bool isExported = true;
+ Action call = () => isExported = exporter.Export();
// Assert
+ string expectedMessage = string.Format("Er is een onverwachte fout opgetreden tijdens het schrijven van het bestand '{0}'.\r\nEr is geen referentielijn geëxporteerd.", filePath);
+ TestHelper.AssertLogMessageIsGenerated(call, expectedMessage);
Assert.IsFalse(isExported);
}
}
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/ExportInfos/ReferenceLineContextExportInfoTest.cs
===================================================================
diff -u -r718348fd1a88ab775f495dad750379e4cbedb25f -rae04c23f970bb96e54adbfb8c2fe1aaf95d13326
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/ExportInfos/ReferenceLineContextExportInfoTest.cs (.../ReferenceLineContextExportInfoTest.cs) (revision 718348fd1a88ab775f495dad750379e4cbedb25f)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/ExportInfos/ReferenceLineContextExportInfoTest.cs (.../ReferenceLineContextExportInfoTest.cs) (revision ae04c23f970bb96e54adbfb8c2fe1aaf95d13326)
@@ -48,7 +48,7 @@
using (RingtoetsPlugin plugin = new RingtoetsPlugin())
{
- ExportInfo info = GetInfo(plugin);
+ ExportInfo info = GetExportInfo(plugin);
// Call
IFileExporter fileExporter = info.CreateFileExporter(context, filePath);
@@ -64,13 +64,13 @@
// Setup
using (RingtoetsPlugin plugin = new RingtoetsPlugin())
{
- ExportInfo info = GetInfo(plugin);
+ ExportInfo info = GetExportInfo(plugin);
// Call
string fileFilter = info.FileFilter;
// Assert
- Assert.AreEqual(RingtoetsCommonIoResources.DataTypeDisplayName_shape_file_filter, fileFilter);
+ Assert.AreEqual("Shapebestand (*.shp)|*.shp", fileFilter);
}
}
@@ -83,7 +83,7 @@
using (RingtoetsPlugin plugin = new RingtoetsPlugin())
{
- ExportInfo info = GetInfo(plugin);
+ ExportInfo info = GetExportInfo(plugin);
// Call
bool isEnabled = info.IsEnabled(context);
@@ -105,7 +105,7 @@
using (RingtoetsPlugin plugin = new RingtoetsPlugin())
{
- ExportInfo info = GetInfo(plugin);
+ ExportInfo info = GetExportInfo(plugin);
// Call
bool isEnabled = info.IsEnabled(context);
@@ -115,7 +115,7 @@
}
}
- private static ExportInfo GetInfo(RingtoetsPlugin plugin)
+ private static ExportInfo GetExportInfo(RingtoetsPlugin plugin)
{
return plugin.GetExportInfos().First(ei => ei.DataType == typeof(ReferenceLineContext));
}
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/ExportInfos/StabilityStoneCoverWaveConditionsCalculationContextExportInfoTest.cs
===================================================================
diff -u
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/ExportInfos/StabilityStoneCoverWaveConditionsCalculationContextExportInfoTest.cs (revision 0)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/ExportInfos/StabilityStoneCoverWaveConditionsCalculationContextExportInfoTest.cs (revision ae04c23f970bb96e54adbfb8c2fe1aaf95d13326)
@@ -0,0 +1,152 @@
+// 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.Revetment.Data;
+using Ringtoets.Revetment.IO;
+using Ringtoets.StabilityStoneCover.Data;
+using Ringtoets.StabilityStoneCover.Forms.PresentationObjects;
+using Ringtoets.StabilityStoneCover.Plugin;
+
+namespace Ringtoets.Integration.Forms.Test.ExportInfos
+{
+ [TestFixture]
+ public class StabilityStoneCoverWaveConditionsCalculationContextExportInfoTest
+ {
+ [Test]
+ public void Initialized_Always_ExpectedPropertiesSet()
+ {
+ // Setup
+ var mocks = new MockRepository();
+ var assessmentSection = mocks.Stub();
+ mocks.ReplayAll();
+
+ var failureMechanism = new StabilityStoneCoverFailureMechanism();
+
+ // Call
+ var context = new StabilityStoneCoverWaveConditionsCalculationContext(new StabilityStoneCoverWaveConditionsCalculation(),
+ failureMechanism, assessmentSection);
+ using (StabilityStoneCoverPlugin plugin = new StabilityStoneCoverPlugin())
+ {
+ ExportInfo info = GetExportInfo(plugin);
+
+ // Call
+ IFileExporter fileExporter = info.CreateFileExporter(context, "test");
+
+ // Assert
+ Assert.IsInstanceOf(fileExporter);
+ }
+ mocks.VerifyAll();
+ }
+
+ [Test]
+ public void FileFilter_Always_ReturnsFileFilter()
+ {
+ // Setup
+ using (StabilityStoneCoverPlugin plugin = new StabilityStoneCoverPlugin())
+ {
+ ExportInfo info = GetExportInfo(plugin);
+
+ // Call
+ string fileFilter = info.FileFilter;
+
+ // Assert
+ Assert.AreEqual("Comma-separated values (*.csv)|*.csv", fileFilter);
+ }
+ }
+
+ [Test]
+ public void IsEnabled_StabilityStoneCoverWaveConditionsCalculationHasOutputFalse_ReturnsFalse()
+ {
+ // Setup
+ var mocks = new MockRepository();
+ var assessmentSection = mocks.Stub();
+ mocks.ReplayAll();
+
+ var failureMechanism = new StabilityStoneCoverFailureMechanism();
+
+ // Call
+ var context = new StabilityStoneCoverWaveConditionsCalculationContext(new StabilityStoneCoverWaveConditionsCalculation(),
+ failureMechanism, assessmentSection);
+ using (StabilityStoneCoverPlugin plugin = new StabilityStoneCoverPlugin())
+ {
+ ExportInfo info = GetExportInfo(plugin);
+
+ // Call
+ bool isEnabled = info.IsEnabled(context);
+
+ // Assert
+ Assert.IsFalse(isEnabled);
+ }
+ mocks.VerifyAll();
+ }
+
+ [Test]
+ public void IsEnabled_StabilityStoneCoverWaveConditionsCalculationHasOutputTrue_ReturnsTrue()
+ {
+ // Setup
+ var mocks = new MockRepository();
+ var assessmentSection = mocks.Stub();
+ mocks.ReplayAll();
+
+ var failureMechanism = new StabilityStoneCoverFailureMechanism();
+ var columnsOutput = new[]
+ {
+ new WaveConditionsOutput(1, 0, 3, 5),
+ new WaveConditionsOutput(8, 2, 6, 1)
+ };
+
+ var blocksOutput = new[]
+ {
+ new WaveConditionsOutput(6, 2, 9, 4),
+ new WaveConditionsOutput(4, 1, 7, 3)
+ };
+
+ // Call
+ var context = new StabilityStoneCoverWaveConditionsCalculationContext(new StabilityStoneCoverWaveConditionsCalculation
+ {
+ Output = new StabilityStoneCoverWaveConditionsOutput(columnsOutput, blocksOutput)
+ },
+ failureMechanism, assessmentSection);
+ using (StabilityStoneCoverPlugin plugin = new StabilityStoneCoverPlugin())
+ {
+ ExportInfo info = GetExportInfo(plugin);
+
+ // Call
+ bool isEnabled = info.IsEnabled(context);
+
+ // Assert
+ Assert.IsTrue(isEnabled);
+ }
+ mocks.VerifyAll();
+ }
+
+ private static ExportInfo GetExportInfo(StabilityStoneCoverPlugin plugin)
+ {
+ return plugin.GetExportInfos().First(ei => ei.DataType == typeof(StabilityStoneCoverWaveConditionsCalculationContext));
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/ExportInfos/StabilityStoneCoverWaveConditionsCalculationGroupContextExportInfoTest.cs
===================================================================
diff -u
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/ExportInfos/StabilityStoneCoverWaveConditionsCalculationGroupContextExportInfoTest.cs (revision 0)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/ExportInfos/StabilityStoneCoverWaveConditionsCalculationGroupContextExportInfoTest.cs (revision ae04c23f970bb96e54adbfb8c2fe1aaf95d13326)
@@ -0,0 +1,181 @@
+// 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.Data.Calculation;
+using Ringtoets.Revetment.Data;
+using Ringtoets.Revetment.IO;
+using Ringtoets.StabilityStoneCover.Data;
+using Ringtoets.StabilityStoneCover.Forms.PresentationObjects;
+using Ringtoets.StabilityStoneCover.Plugin;
+
+namespace Ringtoets.Integration.Forms.Test.ExportInfos
+{
+ [TestFixture]
+ public class StabilityStoneCoverWaveConditionsCalculationGroupContextExportInfoTest
+ {
+ [Test]
+ public void Initialized_Always_ExpectedPropertiesSet()
+ {
+ // Setup
+ var mocks = new MockRepository();
+ var assessmentSection = mocks.Stub();
+ mocks.ReplayAll();
+
+ var failureMechanism = new StabilityStoneCoverFailureMechanism();
+ var calculationGroup = new CalculationGroup();
+
+ // Call
+ var context = new StabilityStoneCoverWaveConditionsCalculationGroupContext(calculationGroup, failureMechanism, assessmentSection);
+ using (StabilityStoneCoverPlugin plugin = new StabilityStoneCoverPlugin())
+ {
+ ExportInfo info = GetExportInfo(plugin);
+
+ // Call
+ IFileExporter fileExporter = info.CreateFileExporter(context, "test");
+
+ // Assert
+ Assert.IsInstanceOf(fileExporter);
+ }
+ mocks.VerifyAll();
+ }
+
+ [Test]
+ public void FileFilter_Always_ReturnsFileFilter()
+ {
+ // Setup
+ using (StabilityStoneCoverPlugin plugin = new StabilityStoneCoverPlugin())
+ {
+ ExportInfo info = GetExportInfo(plugin);
+
+ // Call
+ string fileFilter = info.FileFilter;
+
+ // Assert
+ Assert.AreEqual("Comma-separated values (*.csv)|*.csv", fileFilter);
+ }
+ }
+
+ [Test]
+ public void IsEnabled_NoStabilityStoneCoverWaveConditionsCalculation_ReturnsFalse()
+ {
+ // Setup
+ var mocks = new MockRepository();
+ var assessmentSection = mocks.Stub();
+ mocks.ReplayAll();
+
+ var failureMechanism = new StabilityStoneCoverFailureMechanism();
+ var calculationGroup = new CalculationGroup();
+
+ // Call
+ var context = new StabilityStoneCoverWaveConditionsCalculationGroupContext(calculationGroup, failureMechanism, assessmentSection);
+ using (StabilityStoneCoverPlugin plugin = new StabilityStoneCoverPlugin())
+ {
+ ExportInfo info = GetExportInfo(plugin);
+
+ // Call
+ bool isEnabled = info.IsEnabled(context);
+
+ // Assert
+ Assert.IsFalse(isEnabled);
+ }
+ mocks.VerifyAll();
+ }
+
+ [Test]
+ public void IsEnabled_StabilityStoneCoverWaveConditionsCalculationHasOutputFalse_ReturnsFalse()
+ {
+ // Setup
+ var mocks = new MockRepository();
+ var assessmentSection = mocks.Stub();
+ mocks.ReplayAll();
+
+ var failureMechanism = new StabilityStoneCoverFailureMechanism();
+ var calculationGroup = new CalculationGroup();
+ calculationGroup.Children.Add(new StabilityStoneCoverWaveConditionsCalculation());
+
+ // Call
+ var context = new StabilityStoneCoverWaveConditionsCalculationGroupContext(calculationGroup, failureMechanism, assessmentSection);
+ using (StabilityStoneCoverPlugin plugin = new StabilityStoneCoverPlugin())
+ {
+ ExportInfo info = GetExportInfo(plugin);
+
+ // Call
+ bool isEnabled = info.IsEnabled(context);
+
+ // Assert
+ Assert.IsFalse(isEnabled);
+ }
+ mocks.VerifyAll();
+ }
+
+ [Test]
+ public void IsEnabled_StabilityStoneCoverWaveConditionsCalculationHasOutputTrue_ReturnsTrue()
+ {
+ // Setup
+ var mocks = new MockRepository();
+ var assessmentSection = mocks.Stub();
+ mocks.ReplayAll();
+
+ var failureMechanism = new StabilityStoneCoverFailureMechanism();
+ var calculationGroup = new CalculationGroup();
+ var columnsOutput = new[]
+ {
+ new WaveConditionsOutput(1, 0, 3, 5),
+ new WaveConditionsOutput(8, 2, 6, 1)
+ };
+
+ var blocksOutput = new[]
+ {
+ new WaveConditionsOutput(6, 2, 9, 4),
+ new WaveConditionsOutput(4, 1, 7, 3)
+ };
+ calculationGroup.Children.Add(new StabilityStoneCoverWaveConditionsCalculation
+ {
+ Output = new StabilityStoneCoverWaveConditionsOutput(columnsOutput, blocksOutput)
+ });
+
+ // Call
+ var context = new StabilityStoneCoverWaveConditionsCalculationGroupContext(calculationGroup, failureMechanism, assessmentSection);
+ using (StabilityStoneCoverPlugin plugin = new StabilityStoneCoverPlugin())
+ {
+ ExportInfo info = GetExportInfo(plugin);
+
+ // Call
+ bool isEnabled = info.IsEnabled(context);
+
+ // Assert
+ Assert.IsTrue(isEnabled);
+ }
+ mocks.VerifyAll();
+ }
+
+ private static ExportInfo GetExportInfo(StabilityStoneCoverPlugin plugin)
+ {
+ return plugin.GetExportInfos().First(ei => ei.DataType == typeof(StabilityStoneCoverWaveConditionsCalculationGroupContext));
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj
===================================================================
diff -u -r5b132f482c79bbf041e6f8ebc20bd79b3f5037e8 -rae04c23f970bb96e54adbfb8c2fe1aaf95d13326
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj (.../Ringtoets.Integration.Forms.Test.csproj) (revision 5b132f482c79bbf041e6f8ebc20bd79b3f5037e8)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj (.../Ringtoets.Integration.Forms.Test.csproj) (revision ae04c23f970bb96e54adbfb8c2fe1aaf95d13326)
@@ -69,6 +69,8 @@
+
+
@@ -199,6 +201,18 @@
{74CBA865-9338-447F-BAD9-28312446AE84}Ringtoets.HydraRing.Calculation.TestUtil
+
+ {87C2C553-C0BC-40BF-B1EA-B83BFF357F27}
+ Ringtoets.Revetment.Data
+
+
+ {E3347B16-BB18-41C1-8D34-FBCBF20DB695}
+ Ringtoets.Revetment.IO
+
+
+ {9DDC42CC-A2CC-4900-A711-AA1DD6D3A94A}
+ Ringtoets.StabilityStoneCover.Plugin
+ {567E0B69-5280-41CE-ADD6-443725A61C86}Ringtoets.WaveImpactAsphaltCover.Data
Index: Ringtoets/Revetment/src/Ringtoets.Revetment.IO/CoverType.cs
===================================================================
diff -u
--- Ringtoets/Revetment/src/Ringtoets.Revetment.IO/CoverType.cs (revision 0)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.IO/CoverType.cs (revision ae04c23f970bb96e54adbfb8c2fe1aaf95d13326)
@@ -0,0 +1,46 @@
+// 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.Utils.Attributes;
+using Ringtoets.Revetment.IO.Properties;
+
+namespace Ringtoets.Revetment.IO
+{
+ ///
+ /// Specifies the type of dike cover.
+ ///
+ public enum CoverType
+ {
+ ///
+ /// Dike cover made of blocks.
+ ///
+ ///
+ [ResourcesDisplayName(typeof(Resources), "CoverType_Blocks")]
+ Blocks = 1,
+
+ ///
+ /// Dike cover made of columns.
+ ///
+ ///
+ [ResourcesDisplayName(typeof(Resources), "CoverType_Columns")]
+ Columns = 2
+ }
+}
\ No newline at end of file
Index: Ringtoets/Revetment/src/Ringtoets.Revetment.IO/ExportableWaveConditions.cs
===================================================================
diff -u
--- Ringtoets/Revetment/src/Ringtoets.Revetment.IO/ExportableWaveConditions.cs (revision 0)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.IO/ExportableWaveConditions.cs (revision ae04c23f970bb96e54adbfb8c2fe1aaf95d13326)
@@ -0,0 +1,130 @@
+// 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.Data;
+using Ringtoets.Revetment.Data;
+
+namespace Ringtoets.Revetment.IO
+{
+ ///
+ /// Class for storing the wave conditions data to be exported.
+ ///
+ public class ExportableWaveConditions
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The name of the parent calculation.
+ /// The input parameters of the parent calculation.
+ /// The output parameters of the parent calculation.
+ /// The type of dike cover.
+ /// Thrown when is null.
+ /// Thrown when is null.
+ public ExportableWaveConditions(string name, WaveConditionsInput waveConditionsInput, WaveConditionsOutput waveConditionsOutput, CoverType coverType)
+ {
+ if (name == null)
+ {
+ throw new ArgumentNullException("name");
+ }
+ if (waveConditionsInput.HydraulicBoundaryLocation == null)
+ {
+ throw new ArgumentException("HydraulicBoundaryLocation is null.", "waveConditionsInput");
+ }
+
+ CalculationName = name;
+ LocationName = waveConditionsInput.HydraulicBoundaryLocation.Name;
+ LocationXCoordinate = waveConditionsInput.HydraulicBoundaryLocation.Location.X;
+ LocationYCoordinate = waveConditionsInput.HydraulicBoundaryLocation.Location.Y;
+ UseForeshore = waveConditionsInput.UseForeshore;
+ if (UseForeshore)
+ {
+ ForeshoreName = waveConditionsInput.ForeshoreProfile.Name;
+ }
+ HasBreakWater = UseForeshore && waveConditionsInput.ForeshoreProfile.HasBreakWater;
+ CoverType = coverType;
+ WaterLevel = waveConditionsOutput.WaterLevel;
+ WaveHeight = waveConditionsOutput.WaveHeight;
+ WavePeriod = waveConditionsOutput.WavePeakPeriod;
+ WaveAngle = waveConditionsOutput.WaveAngle;
+ }
+
+ ///
+ /// Gets the wave angle.
+ ///
+ public RoundedDouble WaveAngle { get; private set; }
+
+ ///
+ /// Gets the wave period.
+ ///
+ public RoundedDouble WavePeriod { get; private set; }
+
+ ///
+ /// Gets the wave height.
+ ///
+ public RoundedDouble WaveHeight { get; private set; }
+
+ ///
+ /// Gets the water level.
+ ///
+ public RoundedDouble WaterLevel { get; private set; }
+
+ ///
+ /// Gets the type of dike cover.
+ ///
+ public CoverType CoverType { get; private set; }
+
+ ///
+ /// Gets a value indicating whether there is a foreshore.
+ ///
+ public bool UseForeshore { get; private set; }
+
+ ///
+ /// Gets a value indicating whether there is a breakwater.
+ ///
+ public bool HasBreakWater { get; private set; }
+
+ ///
+ /// Gets the name of the foreshore.
+ ///
+ public string ForeshoreName { get; private set; }
+
+ ///
+ /// Gets the y coordinate of the location.
+ ///
+ public double LocationYCoordinate { get; private set; }
+
+ ///
+ /// Gets the x coordinate of the location.
+ ///
+ public double LocationXCoordinate { get; private set; }
+
+ ///
+ /// Gets the name of the location.
+ ///
+ public string LocationName { get; private set; }
+
+ ///
+ /// Gets the name of the calculation.
+ ///
+ public string CalculationName { get; private set; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Revetment/src/Ringtoets.Revetment.IO/ExportableWaveConditionsFactory.cs
===================================================================
diff -u
--- Ringtoets/Revetment/src/Ringtoets.Revetment.IO/ExportableWaveConditionsFactory.cs (revision 0)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.IO/ExportableWaveConditionsFactory.cs (revision ae04c23f970bb96e54adbfb8c2fe1aaf95d13326)
@@ -0,0 +1,74 @@
+// 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 System.Collections.Generic;
+using Ringtoets.Revetment.Data;
+
+namespace Ringtoets.Revetment.IO
+{
+ ///
+ /// Class for constructing objects.
+ ///
+ public static class ExportableWaveConditionsFactory
+ {
+ ///
+ /// Create a collection of .
+ ///
+ /// The name of the calculation to which the objects belong.
+ /// The used in the calculations.
+ /// The objects resulting from columns calculations.
+ /// The objects resulting from blocks calculations.
+ /// A container of objects.
+ /// Thrown when , or
+ /// is null.
+ public static IEnumerable CreateExportableWaveConditionsCollection(
+ string name, WaveConditionsInput waveConditionsInput, IEnumerable columnsOutput, IEnumerable blocksOutput)
+ {
+ if (name == null)
+ {
+ throw new ArgumentNullException("name");
+ }
+ if (columnsOutput == null)
+ {
+ throw new ArgumentNullException("columnsOutput");
+ }
+ if (blocksOutput == null)
+ {
+ throw new ArgumentNullException("blocksOutput");
+ }
+
+ var exportableWaveConditionsCollection = new List();
+
+ foreach (WaveConditionsOutput waveConditionsOutput in columnsOutput)
+ {
+ exportableWaveConditionsCollection.Add(new ExportableWaveConditions(name, waveConditionsInput, waveConditionsOutput, CoverType.Columns));
+ }
+
+ foreach (WaveConditionsOutput blocksConditionsOutput in blocksOutput)
+ {
+ exportableWaveConditionsCollection.Add(new ExportableWaveConditions(name, waveConditionsInput, blocksConditionsOutput, CoverType.Blocks));
+ }
+
+ return exportableWaveConditionsCollection;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Properties/AssemblyInfo.cs
===================================================================
diff -u -rd87124c5da4427f504d613ce58e017ec0987f9e8 -rae04c23f970bb96e54adbfb8c2fe1aaf95d13326
--- Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Properties/AssemblyInfo.cs (.../AssemblyInfo.cs) (revision d87124c5da4427f504d613ce58e017ec0987f9e8)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Properties/AssemblyInfo.cs (.../AssemblyInfo.cs) (revision ae04c23f970bb96e54adbfb8c2fe1aaf95d13326)
@@ -1,4 +1,25 @@
-using System.Reflection;
+// 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.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Ringtoets.Revetment.IO")]
Index: Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Properties/Resources.Designer.cs
===================================================================
diff -u
--- Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Properties/Resources.Designer.cs (revision 0)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Properties/Resources.Designer.cs (revision ae04c23f970bb96e54adbfb8c2fe1aaf95d13326)
@@ -0,0 +1,120 @@
+// 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.
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Ringtoets.Revetment.IO.Properties {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Ringtoets.Revetment.IO.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Steen (blokken).
+ ///
+ internal static string CoverType_Blocks {
+ get {
+ return ResourceManager.GetString("CoverType_Blocks", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Steen (zuilen).
+ ///
+ internal static string CoverType_Columns {
+ get {
+ return ResourceManager.GetString("CoverType_Columns", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to {0} Er zijn geen golfrandvoorwaarden geëxporteerd..
+ ///
+ internal static string WaveConditionsExporter_Error_Exception_0_no_WaveConditions_exported {
+ get {
+ return ResourceManager.GetString("WaveConditionsExporter_Error_Exception_0_no_WaveConditions_exported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Naam berekening, Naam HR locatie, X HR locatie, Y HR locatie, Naam voorland, Dam aanwezig, Voorland aanwezig, Waterstand, Type bekleding, Golfhoogte, Golfperiode, Golfrichting.
+ ///
+ internal static string WaveConditionsWriter_HeaderLine {
+ get {
+ return ResourceManager.GetString("WaveConditionsWriter_HeaderLine", resourceCulture);
+ }
+ }
+ }
+}
Index: Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Properties/Resources.resx
===================================================================
diff -u
--- Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Properties/Resources.resx (revision 0)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Properties/Resources.resx (revision ae04c23f970bb96e54adbfb8c2fe1aaf95d13326)
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Steen (blokken)
+
+
+ Steen (zuilen)
+
+
+ {0} Er zijn geen golfrandvoorwaarden geëxporteerd.
+
+
+ Naam berekening, Naam HR locatie, X HR locatie, Y HR locatie, Naam voorland, Dam aanwezig, Voorland aanwezig, Waterstand, Type bekleding, Golfhoogte, Golfperiode, Golfrichting
+
+
\ No newline at end of file
Index: Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Ringtoets.Revetment.IO.csproj
===================================================================
diff -u -rd87124c5da4427f504d613ce58e017ec0987f9e8 -rae04c23f970bb96e54adbfb8c2fe1aaf95d13326
--- Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Ringtoets.Revetment.IO.csproj (.../Ringtoets.Revetment.IO.csproj) (revision d87124c5da4427f504d613ce58e017ec0987f9e8)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Ringtoets.Revetment.IO.csproj (.../Ringtoets.Revetment.IO.csproj) (revision ae04c23f970bb96e54adbfb8c2fe1aaf95d13326)
@@ -1,6 +1,6 @@
-
+ {E3347B16-BB18-41C1-8D34-FBCBF20DB695}Library
@@ -23,7 +23,7 @@
TRACEprompt
-
+ TRACEtruetrue
@@ -32,15 +32,71 @@
AllRules.ruleset
+
+ ..\..\..\..\packages\log4net.2.0.4\lib\net40-full\log4net.dll
+ True
+
Properties\GlobalAssembly.cs
+
+
+
+
+ True
+ True
+ Resources.resx
+
+
+
+
+
+ Copying.licenseheader
+
+
+
+
+
+ {3bbfd65b-b277-4e50-ae6d-bd24c3434609}
+ Core.Common.Base
+ False
+
+
+ {E344867E-9AC9-44C8-88A5-8185681679A9}
+ Core.Common.IO
+
+
+ {F49BD8B2-332A-4C91-A196-8CCE0A2C7D98}
+ Core.Common.Utils
+
+
+ {d4200f43-3f72-4f42-af0a-8ced416a38ec}
+ Ringtoets.Common.Data
+ False
+
+
+ {70f8cc9c-5bc8-4fb2-b201-eae7fa8088c2}
+ Ringtoets.HydraRing.Data
+ False
+
+
+ {87C2C553-C0BC-40BF-B1EA-B83BFF357F27}
+ Ringtoets.Revetment.Data
+
+
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+
+
+
\ No newline at end of file
Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Service/Properties/Resources.Designer.cs
===================================================================
diff -u -r5b3041efe0fd2d334984d6c730815242b30229aa -rae04c23f970bb96e54adbfb8c2fe1aaf95d13326
--- Ringtoets/Revetment/src/Ringtoets.Revetment.Service/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 5b3041efe0fd2d334984d6c730815242b30229aa)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.Service/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision ae04c23f970bb96e54adbfb8c2fe1aaf95d13326)
@@ -1,4 +1,25 @@
-//------------------------------------------------------------------------------
+// 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.
+
+//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Service/packages.config
===================================================================
diff -u -r5cdaf6a62202805aa0abe5636e372a66b1bec723 -rae04c23f970bb96e54adbfb8c2fe1aaf95d13326
--- Ringtoets/Revetment/src/Ringtoets.Revetment.Service/packages.config (.../packages.config) (revision 5cdaf6a62202805aa0abe5636e372a66b1bec723)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.Service/packages.config (.../packages.config) (revision ae04c23f970bb96e54adbfb8c2fe1aaf95d13326)
@@ -1,5 +1,4 @@
-
+
+
+
\ No newline at end of file
Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Service.Test/packages.config
===================================================================
diff -u -r6b50fb2fea7791e79e16b211135be4090f2d3c69 -rae04c23f970bb96e54adbfb8c2fe1aaf95d13326
--- Ringtoets/Revetment/test/Ringtoets.Revetment.Service.Test/packages.config (.../packages.config) (revision 6b50fb2fea7791e79e16b211135be4090f2d3c69)
+++ Ringtoets/Revetment/test/Ringtoets.Revetment.Service.Test/packages.config (.../packages.config) (revision ae04c23f970bb96e54adbfb8c2fe1aaf95d13326)
@@ -1,5 +1,4 @@
-