Index: Core/Common/test/Core.Common.TestUtil.Test/TestHelperTest.cs
===================================================================
diff -u -rd58a7ff7f54c83dfe5d1ef28417c43a83346b5ba -r1afcd478d6992b815486c2697f3d5ce76c90b975
--- Core/Common/test/Core.Common.TestUtil.Test/TestHelperTest.cs (.../TestHelperTest.cs) (revision d58a7ff7f54c83dfe5d1ef28417c43a83346b5ba)
+++ Core/Common/test/Core.Common.TestUtil.Test/TestHelperTest.cs (.../TestHelperTest.cs) (revision 1afcd478d6992b815486c2697f3d5ce76c90b975)
@@ -120,6 +120,9 @@
path = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Revetment.IO);
Assert.IsTrue(Directory.Exists(path));
+
+ path = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.WaveImpactAsphaltCover.IO);
+ Assert.IsTrue(Directory.Exists(path));
}
[Test]
Index: Core/Common/test/Core.Common.TestUtil/TestDataPath.cs
===================================================================
diff -u -rd58a7ff7f54c83dfe5d1ef28417c43a83346b5ba -r1afcd478d6992b815486c2697f3d5ce76c90b975
--- Core/Common/test/Core.Common.TestUtil/TestDataPath.cs (.../TestDataPath.cs) (revision d58a7ff7f54c83dfe5d1ef28417c43a83346b5ba)
+++ Core/Common/test/Core.Common.TestUtil/TestDataPath.cs (.../TestDataPath.cs) (revision 1afcd478d6992b815486c2697f3d5ce76c90b975)
@@ -102,6 +102,11 @@
{
public static readonly TestDataPath IO = System.IO.Path.Combine("Ringtoets", "Revetment", "test", "Ringtoets.Revetment.IO.Test");
}
+
+ public static class WaveImpactAsphaltCover
+ {
+ public static readonly TestDataPath IO = System.IO.Path.Combine("Ringtoets", "WaveImpactAsphaltCover", "test", "Ringtoets.WaveImpactAsphaltCover.IO.Test");
+ }
}
}
}
\ No newline at end of file
Index: Ringtoets/Revetment/src/Ringtoets.Revetment.IO/ExportableWaveConditionsFactory.cs
===================================================================
diff -u -rd42451749e8feec1c96555eb81b1cd7d67e30146 -r1afcd478d6992b815486c2697f3d5ce76c90b975
--- Ringtoets/Revetment/src/Ringtoets.Revetment.IO/ExportableWaveConditionsFactory.cs (.../ExportableWaveConditionsFactory.cs) (revision d42451749e8feec1c96555eb81b1cd7d67e30146)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.IO/ExportableWaveConditionsFactory.cs (.../ExportableWaveConditionsFactory.cs) (revision 1afcd478d6992b815486c2697f3d5ce76c90b975)
@@ -85,8 +85,12 @@
/// The used in the calculations.
/// The objects resulting from the calculations.
/// A container of objects.
- /// Thrown when any parameter is null or
- /// when is null for .
+ /// Thrown when:
+ ///
+ /// - any parameter is null
+ /// - any item in is null
+ ///
+ ///
/// Thrown when
/// is null for .
public static IEnumerable CreateExportableWaveConditionsCollection(string name, WaveConditionsInput waveConditionsInput, IEnumerable output)
Index: Ringtoets/Revetment/test/Ringtoets.Revetment.IO.Test/ExportableWaveConditionsFactoryTest.cs
===================================================================
diff -u -rd42451749e8feec1c96555eb81b1cd7d67e30146 -r1afcd478d6992b815486c2697f3d5ce76c90b975
--- Ringtoets/Revetment/test/Ringtoets.Revetment.IO.Test/ExportableWaveConditionsFactoryTest.cs (.../ExportableWaveConditionsFactoryTest.cs) (revision d42451749e8feec1c96555eb81b1cd7d67e30146)
+++ Ringtoets/Revetment/test/Ringtoets.Revetment.IO.Test/ExportableWaveConditionsFactoryTest.cs (.../ExportableWaveConditionsFactoryTest.cs) (revision 1afcd478d6992b815486c2697f3d5ce76c90b975)
@@ -181,15 +181,18 @@
[Test]
public void CreateExportableWaveConditionsCollectionThreeParameters_ValidData_ReturnsValidCollection()
{
+ // Setup
+ var waveConditionsInput = new WaveConditionsInput
+ {
+ HydraulicBoundaryLocation = new HydraulicBoundaryLocation(0, "hblName", 1.0, 8.0),
+ ForeshoreProfile = new ForeshoreProfile(new Point2D(8.7, 7.8), Enumerable.Empty(), null, new ForeshoreProfile.ConstructionProperties()),
+ UseForeshore = true
+ };
+
// Call
ExportableWaveConditions[] exportableWaveConditionsCollection =
ExportableWaveConditionsFactory.CreateExportableWaveConditionsCollection("ewcName",
- new WaveConditionsInput
- {
- HydraulicBoundaryLocation = new HydraulicBoundaryLocation(0, "hblName", 1.0, 8.0),
- ForeshoreProfile = new ForeshoreProfile(new Point2D(8.7, 7.8), Enumerable.Empty(), null, new ForeshoreProfile.ConstructionProperties()),
- UseForeshore = true
- },
+ waveConditionsInput,
waveConditionsOutputCollection).ToArray();
// Assert
Index: Ringtoets/WaveImpactAsphaltCover/src/Ringtoets.WaveImpactAsphaltCover.IO/WaveImpactAsphaltCoverWaveConditionsExporter.cs
===================================================================
diff -u -rd42451749e8feec1c96555eb81b1cd7d67e30146 -r1afcd478d6992b815486c2697f3d5ce76c90b975
--- Ringtoets/WaveImpactAsphaltCover/src/Ringtoets.WaveImpactAsphaltCover.IO/WaveImpactAsphaltCoverWaveConditionsExporter.cs (.../WaveImpactAsphaltCoverWaveConditionsExporter.cs) (revision d42451749e8feec1c96555eb81b1cd7d67e30146)
+++ Ringtoets/WaveImpactAsphaltCover/src/Ringtoets.WaveImpactAsphaltCover.IO/WaveImpactAsphaltCoverWaveConditionsExporter.cs (.../WaveImpactAsphaltCoverWaveConditionsExporter.cs) (revision 1afcd478d6992b815486c2697f3d5ce76c90b975)
@@ -23,6 +23,7 @@
using System.Collections.Generic;
using System.Linq;
using Core.Common.IO.Exceptions;
+using Ringtoets.HydraRing.Data;
using Ringtoets.Revetment.IO;
using Ringtoets.WaveImpactAsphaltCover.Data;
@@ -38,8 +39,7 @@
///
///
/// The file path to export to.
- /// Thrown when or
- /// is null.
+ /// Thrown when any parameter is null.
/// Thrown when is invalid.
/// Thrown when the file could not be written.
public WaveImpactAsphaltCoverWaveConditionsExporter(IEnumerable calculations, string filePath)
Index: Ringtoets/WaveImpactAsphaltCover/src/Ringtoets.WaveImpactAsphaltCover.Plugin/WaveImpactAsphaltCoverPlugin.cs
===================================================================
diff -u -r7719a619d76f39384209dba87f836da02cf2846a -r1afcd478d6992b815486c2697f3d5ce76c90b975
--- Ringtoets/WaveImpactAsphaltCover/src/Ringtoets.WaveImpactAsphaltCover.Plugin/WaveImpactAsphaltCoverPlugin.cs (.../WaveImpactAsphaltCoverPlugin.cs) (revision 7719a619d76f39384209dba87f836da02cf2846a)
+++ Ringtoets/WaveImpactAsphaltCover/src/Ringtoets.WaveImpactAsphaltCover.Plugin/WaveImpactAsphaltCoverPlugin.cs (.../WaveImpactAsphaltCoverPlugin.cs) (revision 1afcd478d6992b815486c2697f3d5ce76c90b975)
@@ -136,7 +136,11 @@
{
yield return new ExportInfo
{
- CreateFileExporter = (context, filePath) => new WaveImpactAsphaltCoverWaveConditionsExporter(context.WrappedData.GetCalculations().Cast(), filePath),
+ CreateFileExporter = (context, filePath) =>
+ {
+ var calculations = context.WrappedData.GetCalculations().Cast();
+ return new WaveImpactAsphaltCoverWaveConditionsExporter(calculations, filePath);
+ },
IsEnabled = context => context.WrappedData.GetCalculations().Cast().Any(c => c.HasOutput),
FileFilter = RingtoetsCommonFormsResources.DataTypeDisplayName_csv_file_filter
};
Index: Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.IO.Test/Ringtoets.WaveImpactAsphaltCover.IO.Test.csproj
===================================================================
diff -u -rd42451749e8feec1c96555eb81b1cd7d67e30146 -r1afcd478d6992b815486c2697f3d5ce76c90b975
--- Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.IO.Test/Ringtoets.WaveImpactAsphaltCover.IO.Test.csproj (.../Ringtoets.WaveImpactAsphaltCover.IO.Test.csproj) (revision d42451749e8feec1c96555eb81b1cd7d67e30146)
+++ Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.IO.Test/Ringtoets.WaveImpactAsphaltCover.IO.Test.csproj (.../Ringtoets.WaveImpactAsphaltCover.IO.Test.csproj) (revision 1afcd478d6992b815486c2697f3d5ce76c90b975)
@@ -57,6 +57,32 @@
+
+
+ {3bbfd65b-b277-4e50-ae6d-bd24c3434609}
+ Core.Common.Base
+
+
+ {D749EE4C-CE50-4C17-BF01-9A953028C126}
+ Core.Common.TestUtil
+
+
+ {d4200f43-3f72-4f42-af0a-8ced416a38ec}
+ Ringtoets.Common.Data
+
+
+ {E3347B16-BB18-41C1-8D34-FBCBF20DB695}
+ Ringtoets.Revetment.IO
+
+
+ {567e0b69-5280-41ce-add6-443725a61c86}
+ Ringtoets.WaveImpactAsphaltCover.Data
+
+
+ {B388D2BA-FC6E-4EE2-B9B5-38D35F340FF5}
+ Ringtoets.WaveImpactAsphaltCover.IO
+
+
+
\ No newline at end of file
Index: Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test/WaveImpactAsphaltCoverPluginTest.cs
===================================================================
diff -u -r0d7efa62d16c64a925c63172e4d1bf1a4e0bf94f -r1afcd478d6992b815486c2697f3d5ce76c90b975
--- Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test/WaveImpactAsphaltCoverPluginTest.cs (.../WaveImpactAsphaltCoverPluginTest.cs) (revision 0d7efa62d16c64a925c63172e4d1bf1a4e0bf94f)
+++ Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test/WaveImpactAsphaltCoverPluginTest.cs (.../WaveImpactAsphaltCoverPluginTest.cs) (revision 1afcd478d6992b815486c2697f3d5ce76c90b975)
@@ -108,5 +108,21 @@
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(WaveImpactAsphaltCoverWaveConditionsOutput)));
}
}
+
+ [Test]
+ public void GetExportInfos_ReturnsSupportedExportInfos()
+ {
+ // Setup
+ using (var plugin = new WaveImpactAsphaltCoverPlugin())
+ {
+ // Call
+ ExportInfo[] exportInfos = plugin.GetExportInfos().ToArray();
+
+ // Assert
+ Assert.AreEqual(2, exportInfos.Length);
+ Assert.IsTrue(exportInfos.Any(ei => ei.DataType == typeof(WaveImpactAsphaltCoverWaveConditionsCalculationGroupContext)));
+ Assert.IsTrue(exportInfos.Any(ei => ei.DataType == typeof(WaveImpactAsphaltCoverWaveConditionsCalculationContext)));
+ }
+ }
}
}
\ No newline at end of file