Index: Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.IO/Exporters/GrassCoverErosionOutwardsWaveConditionsExporter.cs =================================================================== diff -u -rd8abf0bc87b96f09e34f2d7a45248cf124b782fa -rcb4afa462fa239009c16d8bec3b95dfde32013e2 --- Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.IO/Exporters/GrassCoverErosionOutwardsWaveConditionsExporter.cs (.../GrassCoverErosionOutwardsWaveConditionsExporter.cs) (revision d8abf0bc87b96f09e34f2d7a45248cf124b782fa) +++ Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.IO/Exporters/GrassCoverErosionOutwardsWaveConditionsExporter.cs (.../GrassCoverErosionOutwardsWaveConditionsExporter.cs) (revision cb4afa462fa239009c16d8bec3b95dfde32013e2) @@ -53,6 +53,11 @@ throw new ArgumentNullException(nameof(calculations)); } + if (getTargetProbabilityFunc == null) + { + throw new ArgumentNullException(nameof(getTargetProbabilityFunc)); + } + var exportableWaveConditions = new List(); IEnumerable exportableCalculations = Index: Riskeer/GrassCoverErosionOutwards/test/Riskeer.GrassCoverErosionOutwards.IO.Test/Exporters/GrassCoverErosionOutwardsWaveConditionsExporterTest.cs =================================================================== diff -u -r87bd836d55d336e37e3d80f9a1521feb83ddc475 -rcb4afa462fa239009c16d8bec3b95dfde32013e2 --- Riskeer/GrassCoverErosionOutwards/test/Riskeer.GrassCoverErosionOutwards.IO.Test/Exporters/GrassCoverErosionOutwardsWaveConditionsExporterTest.cs (.../GrassCoverErosionOutwardsWaveConditionsExporterTest.cs) (revision 87bd836d55d336e37e3d80f9a1521feb83ddc475) +++ Riskeer/GrassCoverErosionOutwards/test/Riskeer.GrassCoverErosionOutwards.IO.Test/Exporters/GrassCoverErosionOutwardsWaveConditionsExporterTest.cs (.../GrassCoverErosionOutwardsWaveConditionsExporterTest.cs) (revision cb4afa462fa239009c16d8bec3b95dfde32013e2) @@ -42,35 +42,35 @@ private readonly string testFilePath = TestHelper.GetScratchPadPath($"{nameof(GrassCoverErosionOutwardsWaveConditionsExporterTest)}.csv"); [Test] - public void Constructor_ValidParameters_ExpectedValues() + public void Constructor_CalculationNull_ThrowArgumentNullException() { // Call - var waveConditionsExporter = new GrassCoverErosionOutwardsWaveConditionsExporter(new GrassCoverErosionOutwardsWaveConditionsCalculation[0], testFilePath); + void Call() => new GrassCoverErosionOutwardsWaveConditionsExporter(null, testFilePath, i => "1/100"); // Assert - Assert.IsInstanceOf(waveConditionsExporter); + var exception = Assert.Throws(Call); + Assert.AreEqual("calculations", exception.ParamName); } [Test] - public void Constructor_CalculationNull_ThrowArgumentNullException() + public void Constructor_GetTargetProbabilityFuncNull_ThrowArgumentNullException() { // Call - TestDelegate call = () => new GrassCoverErosionOutwardsWaveConditionsExporter(null, testFilePath); + void Call() => new GrassCoverErosionOutwardsWaveConditionsExporter(Array.Empty(), testFilePath, null); // Assert - var exception = Assert.Throws(call); - Assert.AreEqual("calculations", exception.ParamName); + var exception = Assert.Throws(Call); + Assert.AreEqual("getTargetProbabilityFunc", exception.ParamName); } [Test] - public void Constructor_FilePathNull_ThrowArgumentNullException() + public void Constructor_ValidParameters_ExpectedValues() { // Call - TestDelegate call = () => new GrassCoverErosionOutwardsWaveConditionsExporter(new GrassCoverErosionOutwardsWaveConditionsCalculation[0], null); + var waveConditionsExporter = new GrassCoverErosionOutwardsWaveConditionsExporter(Array.Empty(), testFilePath, i => "1/100"); // Assert - var exception = Assert.Throws(call); - Assert.AreEqual("filePath", exception.ParamName); + Assert.IsInstanceOf(waveConditionsExporter); } [Test] @@ -88,7 +88,7 @@ new GrassCoverErosionOutwardsWaveConditionsCalculation() }; - var exporter = new GrassCoverErosionOutwardsWaveConditionsExporter(calculationsWithoutOutput, filePath); + var exporter = new GrassCoverErosionOutwardsWaveConditionsExporter(calculationsWithoutOutput, filePath, i => "1/100"); // Call bool isExported = exporter.Export(); @@ -97,7 +97,7 @@ Assert.IsTrue(isExported); Assert.IsTrue(File.Exists(filePath)); string fileContent = File.ReadAllText(filePath); - string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Categoriegrens, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}"; + string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Doelkans, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}"; Assert.AreEqual(expectedText, fileContent); } } @@ -120,7 +120,7 @@ } }; - var exporter = new GrassCoverErosionOutwardsWaveConditionsExporter(calculations, filePath); + var exporter = new GrassCoverErosionOutwardsWaveConditionsExporter(calculations, filePath, i => "1/100"); // Call bool isExported = exporter.Export(); @@ -129,7 +129,7 @@ Assert.IsTrue(isExported); Assert.IsTrue(File.Exists(filePath)); string fileContent = File.ReadAllText(filePath); - string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Categoriegrens, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}"; + string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Doelkans, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}"; Assert.AreEqual(expectedText, fileContent); } } @@ -174,7 +174,7 @@ } }; - var exporter = new GrassCoverErosionOutwardsWaveConditionsExporter(calculations, filePath); + var exporter = new GrassCoverErosionOutwardsWaveConditionsExporter(calculations, filePath, i => "1/100"); // Call bool isExported = exporter.Export(); @@ -183,9 +183,9 @@ Assert.IsTrue(isExported); Assert.IsTrue(File.Exists(filePath)); string fileContent = File.ReadAllText(filePath); - string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Categoriegrens, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}" + - $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Gras (golfoploop), IVv, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}" + - $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Gras (golfklap), IVv, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}"; + string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Doelkans, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}" + + $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Gras (golfoploop), 1/100, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}" + + $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Gras (golfklap), 1/100, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}"; Assert.AreEqual(expectedText, fileContent); } } @@ -231,7 +231,7 @@ } }; - var exporter = new GrassCoverErosionOutwardsWaveConditionsExporter(calculations, filePath); + var exporter = new GrassCoverErosionOutwardsWaveConditionsExporter(calculations, filePath, i => "1/100"); // Call bool isExported = exporter.Export(); @@ -240,8 +240,8 @@ Assert.IsTrue(isExported); Assert.IsTrue(File.Exists(filePath)); string fileContent = File.ReadAllText(filePath); - string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Categoriegrens, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}" + - $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Gras (golfoploop), IVv, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}"; + string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Doelkans, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}" + + $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Gras (golfoploop), 1/100, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}"; Assert.AreEqual(expectedText, fileContent); } } @@ -287,7 +287,7 @@ } }; - var exporter = new GrassCoverErosionOutwardsWaveConditionsExporter(calculations, filePath); + var exporter = new GrassCoverErosionOutwardsWaveConditionsExporter(calculations, filePath, i => "1/100"); // Call bool isExported = exporter.Export(); @@ -296,8 +296,8 @@ Assert.IsTrue(isExported); Assert.IsTrue(File.Exists(filePath)); string fileContent = File.ReadAllText(filePath); - string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Categoriegrens, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}" + - $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Gras (golfklap), IVv, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}"; + string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Doelkans, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}" + + $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Gras (golfklap), 1/100, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}"; Assert.AreEqual(expectedText, fileContent); } } @@ -343,7 +343,7 @@ } }; - var exporter = new GrassCoverErosionOutwardsWaveConditionsExporter(calculations, filePath); + var exporter = new GrassCoverErosionOutwardsWaveConditionsExporter(calculations, filePath, i => "1/100"); // Call bool isExported = exporter.Export(); @@ -352,8 +352,8 @@ Assert.IsTrue(isExported); Assert.IsTrue(File.Exists(filePath)); string fileContent = File.ReadAllText(filePath); - string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Categoriegrens, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}" + - $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Gras (golfklap voor toets op maat), IVv, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}"; + string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Doelkans, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}" + + $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Gras (golfklap voor toets op maat), 1/100, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}"; Assert.AreEqual(expectedText, fileContent); } } @@ -399,7 +399,7 @@ } }; - var exporter = new GrassCoverErosionOutwardsWaveConditionsExporter(calculations, filePath); + var exporter = new GrassCoverErosionOutwardsWaveConditionsExporter(calculations, filePath, i => "1/100"); // Call bool isExported = exporter.Export(); @@ -408,9 +408,9 @@ Assert.IsTrue(isExported); Assert.IsTrue(File.Exists(filePath)); string fileContent = File.ReadAllText(filePath); - string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Categoriegrens, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}" + - $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Gras (golfoploop), IVv, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}" + - $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Gras (golfklap voor toets op maat), IVv, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}"; + string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Doelkans, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}" + + $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Gras (golfoploop), 1/100, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}" + + $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Gras (golfklap voor toets op maat), 1/100, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}"; Assert.AreEqual(expectedText, fileContent); } } @@ -456,7 +456,7 @@ } }; - var exporter = new GrassCoverErosionOutwardsWaveConditionsExporter(calculations, filePath); + var exporter = new GrassCoverErosionOutwardsWaveConditionsExporter(calculations, filePath, i => "1/100"); // Call bool isExported = exporter.Export(); @@ -465,10 +465,10 @@ Assert.IsTrue(isExported); Assert.IsTrue(File.Exists(filePath)); string fileContent = File.ReadAllText(filePath); - string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Categoriegrens, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}" + - $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Gras (golfoploop), IVv, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}" + - $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Gras (golfklap), IVv, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}" + - $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Gras (golfklap voor toets op maat), IVv, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}"; + string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Doelkans, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}" + + $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Gras (golfoploop), 1/100, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}" + + $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Gras (golfklap), 1/100, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}" + + $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Gras (golfklap voor toets op maat), 1/100, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}"; Assert.AreEqual(expectedText, fileContent); } } Index: Riskeer/Revetment/src/Riskeer.Revetment.IO/WaveConditions/ExportableWaveConditions.cs =================================================================== diff -u -rd8abf0bc87b96f09e34f2d7a45248cf124b782fa -rcb4afa462fa239009c16d8bec3b95dfde32013e2 --- Riskeer/Revetment/src/Riskeer.Revetment.IO/WaveConditions/ExportableWaveConditions.cs (.../ExportableWaveConditions.cs) (revision d8abf0bc87b96f09e34f2d7a45248cf124b782fa) +++ Riskeer/Revetment/src/Riskeer.Revetment.IO/WaveConditions/ExportableWaveConditions.cs (.../ExportableWaveConditions.cs) (revision cb4afa462fa239009c16d8bec3b95dfde32013e2) @@ -74,6 +74,11 @@ throw new ArgumentNullException(nameof(categoryBoundaryName)); } + if (getTargetProbabilityFunc == null) + { + throw new ArgumentNullException(nameof(getTargetProbabilityFunc)); + } + if (waveConditionsInput.HydraulicBoundaryLocation == null) { throw new ArgumentException(@"HydraulicBoundaryLocation is null.", nameof(waveConditionsInput)); Index: Riskeer/Revetment/src/Riskeer.Revetment.IO/WaveConditions/ExportableWaveConditionsFactory.cs =================================================================== diff -u -rd8abf0bc87b96f09e34f2d7a45248cf124b782fa -rcb4afa462fa239009c16d8bec3b95dfde32013e2 --- Riskeer/Revetment/src/Riskeer.Revetment.IO/WaveConditions/ExportableWaveConditionsFactory.cs (.../ExportableWaveConditionsFactory.cs) (revision d8abf0bc87b96f09e34f2d7a45248cf124b782fa) +++ Riskeer/Revetment/src/Riskeer.Revetment.IO/WaveConditions/ExportableWaveConditionsFactory.cs (.../ExportableWaveConditionsFactory.cs) (revision cb4afa462fa239009c16d8bec3b95dfde32013e2) @@ -61,6 +61,11 @@ throw new ArgumentNullException(nameof(coverType)); } + if (getTargetProbabilityFunc == null) + { + throw new ArgumentNullException(nameof(getTargetProbabilityFunc)); + } + return CreateExportableWaveConditionsCollection(name, waveConditionsInput, output, coverType, GetCategoryBoundaryName(waveConditionsInput.CategoryType), getTargetProbabilityFunc); } @@ -93,6 +98,11 @@ throw new ArgumentNullException(nameof(coverType)); } + if (getTargetProbabilityFunc == null) + { + throw new ArgumentNullException(nameof(getTargetProbabilityFunc)); + } + return CreateExportableWaveConditionsCollection(name, waveConditionsInput, output, coverType, GetCategoryBoundaryName(waveConditionsInput.CategoryType), getTargetProbabilityFunc); } Index: Riskeer/Revetment/test/Riskeer.Revetment.IO.Test/WaveConditions/ExportableWaveConditionsFactoryTest.cs =================================================================== diff -u -r7491928192a7ecf23958f85fbd4669ec17085c95 -rcb4afa462fa239009c16d8bec3b95dfde32013e2 --- Riskeer/Revetment/test/Riskeer.Revetment.IO.Test/WaveConditions/ExportableWaveConditionsFactoryTest.cs (.../ExportableWaveConditionsFactoryTest.cs) (revision 7491928192a7ecf23958f85fbd4669ec17085c95) +++ Riskeer/Revetment/test/Riskeer.Revetment.IO.Test/WaveConditions/ExportableWaveConditionsFactoryTest.cs (.../ExportableWaveConditionsFactoryTest.cs) (revision cb4afa462fa239009c16d8bec3b95dfde32013e2) @@ -47,58 +47,58 @@ public void CreateExportableWaveConditionsCollectionWithFailureMechanismCategoryWaveConditionsInput_NameNull_ThrowArgumentNullException() { // Call - TestDelegate call = () => ExportableWaveConditionsFactory.CreateExportableWaveConditionsCollection(null, - new FailureMechanismCategoryWaveConditionsInput(), - waveConditionsOutputCollection, CoverType.GrassWaveRunUp); + void Call() => ExportableWaveConditionsFactory.CreateExportableWaveConditionsCollection(null, new FailureMechanismCategoryWaveConditionsInput(), waveConditionsOutputCollection, CoverType.GrassWaveRunUp, i => "1/100"); // Assert - var exception = Assert.Throws(call); + var exception = Assert.Throws(Call); Assert.AreEqual("name", exception.ParamName); } [Test] public void CreateExportableWaveConditionsCollectionWithFailureMechanismCategoryWaveConditionsInput_WaveConditionsInputNull_ThrowArgumentNullException() { // Call - TestDelegate call = () => ExportableWaveConditionsFactory.CreateExportableWaveConditionsCollection("aName", - (FailureMechanismCategoryWaveConditionsInput) null, - waveConditionsOutputCollection, - CoverType.GrassWaveRunUp); + void Call() => ExportableWaveConditionsFactory.CreateExportableWaveConditionsCollection("aName", (FailureMechanismCategoryWaveConditionsInput) null, waveConditionsOutputCollection, CoverType.GrassWaveRunUp, i => "1/100"); // Assert - var exception = Assert.Throws(call); + var exception = Assert.Throws(Call); Assert.AreEqual("waveConditionsInput", exception.ParamName); } [Test] public void CreateExportableWaveConditionsCollectionWithFailureMechanismCategoryWaveConditionsInput_OutputNull_ThrowArgumentNullException() { // Call - TestDelegate call = () => ExportableWaveConditionsFactory.CreateExportableWaveConditionsCollection("aName", - new FailureMechanismCategoryWaveConditionsInput(), - null, - CoverType.GrassWaveRunUp); + void Call() => ExportableWaveConditionsFactory.CreateExportableWaveConditionsCollection("aName", new FailureMechanismCategoryWaveConditionsInput(), null, CoverType.GrassWaveRunUp, i => "1/100"); // Assert - var exception = Assert.Throws(call); + var exception = Assert.Throws(Call); Assert.AreEqual("output", exception.ParamName); } [Test] public void CreateExportableWaveConditionsCollectionWithFailureMechanismCategoryWaveConditionsInput_CoverTypeNull_ThrowArgumentNullException() { // Call - TestDelegate call = () => ExportableWaveConditionsFactory.CreateExportableWaveConditionsCollection("aName", - new FailureMechanismCategoryWaveConditionsInput(), - waveConditionsOutputCollection, - null); + void Call() => ExportableWaveConditionsFactory.CreateExportableWaveConditionsCollection("aName", new FailureMechanismCategoryWaveConditionsInput(), waveConditionsOutputCollection, null, i => "1/100"); // Assert - var exception = Assert.Throws(call); + var exception = Assert.Throws(Call); Assert.AreEqual("coverType", exception.ParamName); } [Test] + public void CreateExportableWaveConditionsCollectionWithFailureMechanismCategoryWaveConditionsInput_GetTargetProbabilityFuncNull_ThrowArgumentNullException() + { + // Call + void Call() => ExportableWaveConditionsFactory.CreateExportableWaveConditionsCollection("aName", new FailureMechanismCategoryWaveConditionsInput(), waveConditionsOutputCollection, CoverType.GrassWaveRunUp, null); + + // Assert + var exception = Assert.Throws(Call); + Assert.AreEqual("getTargetProbabilityFunc", exception.ParamName); + } + + [Test] [TestCaseSource(nameof(GetCoverTypes))] public void CreateExportableWaveConditionsCollectionWithFailureMechanismCategoryWaveConditionsInput_ValidDataWithCoverType_ReturnsValidCollection(CoverType coverType) { @@ -116,7 +116,8 @@ ExportableWaveConditionsFactory.CreateExportableWaveConditionsCollection("ewcName", waveConditionsInput, waveConditionsOutputCollection, - coverType).ToArray(); + coverType, + i => "1/100").ToArray(); // Assert Assert.AreEqual(1, exportableWaveConditionsCollection.Length); @@ -129,7 +130,7 @@ Assert.AreEqual(false, exportableWaveConditions.UseBreakWater); Assert.AreEqual(true, exportableWaveConditions.UseForeshore); Assert.AreEqual(coverType, exportableWaveConditions.CoverType); - Assert.AreEqual("Iv", exportableWaveConditions.CategoryBoundaryName); + Assert.AreEqual("1/100", exportableWaveConditions.TargetProbability); Assert.AreEqual(2, exportableWaveConditions.WaterLevel.NumberOfDecimalPlaces); Assert.AreEqual(2, exportableWaveConditions.WaveHeight.NumberOfDecimalPlaces); Assert.AreEqual(2, exportableWaveConditions.WavePeriod.NumberOfDecimalPlaces); @@ -145,59 +146,58 @@ public void CreateExportableWaveConditionsCollectionWithAssessmentSectionCategoryWaveConditionsInput_NameNull_ThrowArgumentNullException() { // Call - TestDelegate call = () => ExportableWaveConditionsFactory.CreateExportableWaveConditionsCollection(null, - new AssessmentSectionCategoryWaveConditionsInput(), - waveConditionsOutputCollection, - CoverType.Asphalt); + void Call() => ExportableWaveConditionsFactory.CreateExportableWaveConditionsCollection(null, new AssessmentSectionCategoryWaveConditionsInput(), waveConditionsOutputCollection, CoverType.Asphalt, i => "1/100"); // Assert - var exception = Assert.Throws(call); + var exception = Assert.Throws(Call); Assert.AreEqual("name", exception.ParamName); } [Test] public void CreateExportableWaveConditionsCollectionWithAssessmentSectionCategoryWaveConditionsInput_WaveConditionsInputNull_ThrowArgumentNullException() { // Call - TestDelegate call = () => ExportableWaveConditionsFactory.CreateExportableWaveConditionsCollection("aName", - (AssessmentSectionCategoryWaveConditionsInput) null, - waveConditionsOutputCollection, - CoverType.Asphalt); + void Call() => ExportableWaveConditionsFactory.CreateExportableWaveConditionsCollection("aName", (AssessmentSectionCategoryWaveConditionsInput) null, waveConditionsOutputCollection, CoverType.Asphalt, i => "1/100"); // Assert - var exception = Assert.Throws(call); + var exception = Assert.Throws(Call); Assert.AreEqual("waveConditionsInput", exception.ParamName); } [Test] public void CreateExportableWaveConditionsCollectionWithAssessmentSectionCategoryWaveConditionsInput_OutputNull_ThrowArgumentNullException() { // Call - TestDelegate call = () => ExportableWaveConditionsFactory.CreateExportableWaveConditionsCollection("aName", - new AssessmentSectionCategoryWaveConditionsInput(), - null, - CoverType.Asphalt); + void Call() => ExportableWaveConditionsFactory.CreateExportableWaveConditionsCollection("aName", new AssessmentSectionCategoryWaveConditionsInput(), null, CoverType.Asphalt, i => "1/100"); // Assert - var exception = Assert.Throws(call); + var exception = Assert.Throws(Call); Assert.AreEqual("output", exception.ParamName); } [Test] public void CreateExportableWaveConditionsCollectionWithAssessmentSectionCategoryWaveConditionsInput_CoverTypeNull_ThrowArgumentNullException() { // Call - TestDelegate call = () => ExportableWaveConditionsFactory.CreateExportableWaveConditionsCollection("aName", - new AssessmentSectionCategoryWaveConditionsInput(), - waveConditionsOutputCollection, - null); + void Call() => ExportableWaveConditionsFactory.CreateExportableWaveConditionsCollection("aName", new AssessmentSectionCategoryWaveConditionsInput(), waveConditionsOutputCollection, null, i => "1/100"); // Assert - var exception = Assert.Throws(call); + var exception = Assert.Throws(Call); Assert.AreEqual("coverType", exception.ParamName); } [Test] + public void CreateExportableWaveConditionsCollectionWithAssessmentSectionCategoryWaveConditionsInput_GetTargetProbabilityFuncNull_ThrowArgumentNullException() + { + // Call + void Call() => ExportableWaveConditionsFactory.CreateExportableWaveConditionsCollection("aName", new AssessmentSectionCategoryWaveConditionsInput(), waveConditionsOutputCollection, CoverType.Asphalt, null); + + // Assert + var exception = Assert.Throws(Call); + Assert.AreEqual("getTargetProbabilityFunc", exception.ParamName); + } + + [Test] [TestCaseSource(nameof(GetCoverTypes))] public void CreateExportableWaveConditionsCollectionWithAssessmentSectionCategoryWaveConditionsInput_ValidDataWithCoverType_ReturnsValidCollection_ValidDataWithCoverType_ReturnsValidCollection(CoverType coverType) { @@ -215,7 +215,8 @@ ExportableWaveConditionsFactory.CreateExportableWaveConditionsCollection("ewcName", waveConditionsInput, waveConditionsOutputCollection, - coverType).ToArray(); + coverType, + i => "1/100").ToArray(); // Assert Assert.AreEqual(1, exportableWaveConditionsCollection.Length); @@ -228,7 +229,7 @@ Assert.AreEqual(false, exportableWaveConditions.UseBreakWater); Assert.AreEqual(true, exportableWaveConditions.UseForeshore); Assert.AreEqual(coverType, exportableWaveConditions.CoverType); - Assert.AreEqual("B", exportableWaveConditions.CategoryBoundaryName); + Assert.AreEqual("1/100", exportableWaveConditions.TargetProbability); Assert.AreEqual(2, exportableWaveConditions.WaterLevel.NumberOfDecimalPlaces); Assert.AreEqual(2, exportableWaveConditions.WaveHeight.NumberOfDecimalPlaces); Assert.AreEqual(2, exportableWaveConditions.WavePeriod.NumberOfDecimalPlaces); Index: Riskeer/Revetment/test/Riskeer.Revetment.IO.Test/WaveConditions/ExportableWaveConditionsTest.cs =================================================================== diff -u -r7491928192a7ecf23958f85fbd4669ec17085c95 -rcb4afa462fa239009c16d8bec3b95dfde32013e2 --- Riskeer/Revetment/test/Riskeer.Revetment.IO.Test/WaveConditions/ExportableWaveConditionsTest.cs (.../ExportableWaveConditionsTest.cs) (revision 7491928192a7ecf23958f85fbd4669ec17085c95) +++ Riskeer/Revetment/test/Riskeer.Revetment.IO.Test/WaveConditions/ExportableWaveConditionsTest.cs (.../ExportableWaveConditionsTest.cs) (revision cb4afa462fa239009c16d8bec3b95dfde32013e2) @@ -38,70 +38,81 @@ public void Constructor_NameNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => new ExportableWaveConditions(null, CreateValidWaveConditionsInput(), waveConditionsOutput, CoverType.StoneCoverColumns, string.Empty); + void Call() => new ExportableWaveConditions(null, CreateValidWaveConditionsInput(), waveConditionsOutput, CoverType.StoneCoverColumns, string.Empty, i => "1/100"); // Assert - var exception = Assert.Throws(call); + var exception = Assert.Throws(Call); Assert.AreEqual("name", exception.ParamName); } [Test] public void Constructor_WaveConditionsInputNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => new ExportableWaveConditions("aName", null, waveConditionsOutput, CoverType.StoneCoverColumns, string.Empty); + void Call() => new ExportableWaveConditions("aName", null, waveConditionsOutput, CoverType.StoneCoverColumns, string.Empty, i => "1/100"); // Assert - var exception = Assert.Throws(call); + var exception = Assert.Throws(Call); Assert.AreEqual("waveConditionsInput", exception.ParamName); } [Test] public void Constructor_WaveConditionsOutputNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => new ExportableWaveConditions("aName", CreateValidWaveConditionsInput(), null, CoverType.StoneCoverColumns, string.Empty); + void Call() => new ExportableWaveConditions("aName", CreateValidWaveConditionsInput(), null, CoverType.StoneCoverColumns, string.Empty, i => "1/100"); // Assert - var exception = Assert.Throws(call); + var exception = Assert.Throws(Call); Assert.AreEqual("waveConditionsOutput", exception.ParamName); } [Test] public void Constructor_CoverTypeNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => new ExportableWaveConditions("aName", CreateValidWaveConditionsInput(), waveConditionsOutput, null, string.Empty); + void Call() => new ExportableWaveConditions("aName", CreateValidWaveConditionsInput(), waveConditionsOutput, null, string.Empty, i => "1/100"); // Assert - var exception = Assert.Throws(call); + var exception = Assert.Throws(Call); Assert.AreEqual("coverType", exception.ParamName); } [Test] public void Constructor_CategoryBoundaryNameNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => new ExportableWaveConditions("aName", CreateValidWaveConditionsInput(), waveConditionsOutput, CoverType.Asphalt, null); + void Call() => new ExportableWaveConditions("aName", CreateValidWaveConditionsInput(), waveConditionsOutput, CoverType.Asphalt, null, i => "1/100"); // Assert - var exception = Assert.Throws(call); + var exception = Assert.Throws(Call); Assert.AreEqual("categoryBoundaryName", exception.ParamName); } [Test] public void Constructor_WaveConditionsInputHydraulicBoundaryLocationNull_ThrowsArgumentException() { // Call - TestDelegate call = () => new ExportableWaveConditions("aName", new TestWaveConditionsInput(), waveConditionsOutput, CoverType.StoneCoverColumns, string.Empty); + void Call() => new ExportableWaveConditions("aName", new TestWaveConditionsInput(), waveConditionsOutput, CoverType.StoneCoverColumns, string.Empty, i => "1/100"); // Assert - var exception = Assert.Throws(call); + var exception = Assert.Throws(Call); StringAssert.StartsWith("HydraulicBoundaryLocation is null.", exception.Message); Assert.AreEqual("waveConditionsInput", exception.ParamName); } [Test] + public void Constructor_GetTargetProbabilityFuncNull_ThrowsArgumentException() + { + // Call + void Call() => new ExportableWaveConditions("aName", CreateValidWaveConditionsInput(), waveConditionsOutput, CoverType.Asphalt, string.Empty, null); + + // Assert + var exception = Assert.Throws(Call); + Assert.AreEqual("getTargetProbabilityFunc", exception.ParamName); + } + + [Test] [Combinatorial] public void Constructor_ValidDataWithoutForeshore_ExpectedValues( [Values(true, false)] bool useBreakWater, @@ -119,7 +130,8 @@ waveConditionsInput, waveConditionsOutput, CoverType.StoneCoverColumns, - categoryBoundaryName); + categoryBoundaryName, + i => "1/100"); // Assert Assert.AreEqual("ewcName", exportableWaveConditions.CalculationName); @@ -130,7 +142,7 @@ Assert.AreEqual(useBreakWater, exportableWaveConditions.UseBreakWater); Assert.AreEqual(useForeshore, exportableWaveConditions.UseForeshore); Assert.AreEqual(CoverType.StoneCoverColumns, exportableWaveConditions.CoverType); - Assert.AreEqual(categoryBoundaryName, exportableWaveConditions.CategoryBoundaryName); + Assert.AreEqual("1/100", exportableWaveConditions.TargetProbability); Assert.AreEqual(2, exportableWaveConditions.WaterLevel.NumberOfDecimalPlaces); Assert.AreEqual(2, exportableWaveConditions.WaveHeight.NumberOfDecimalPlaces); Assert.AreEqual(2, exportableWaveConditions.WavePeriod.NumberOfDecimalPlaces); @@ -161,7 +173,8 @@ waveConditionsInput, waveConditionsOutput, CoverType.StoneCoverColumns, - categoryBoundaryName); + categoryBoundaryName, + i => "1/100"); // Assert Assert.AreEqual("ewcName", exportableWaveConditions.CalculationName); @@ -172,7 +185,7 @@ Assert.AreEqual(useBreakWater, exportableWaveConditions.UseBreakWater); Assert.AreEqual(useForeshore, exportableWaveConditions.UseForeshore); Assert.AreEqual(CoverType.StoneCoverColumns, exportableWaveConditions.CoverType); - Assert.AreEqual(categoryBoundaryName, exportableWaveConditions.CategoryBoundaryName); + Assert.AreEqual("1/100", exportableWaveConditions.TargetProbability); Assert.AreEqual(2, exportableWaveConditions.WaterLevel.NumberOfDecimalPlaces); Assert.AreEqual(2, exportableWaveConditions.WaveHeight.NumberOfDecimalPlaces); Assert.AreEqual(2, exportableWaveConditions.WavePeriod.NumberOfDecimalPlaces); Index: Riskeer/Revetment/test/Riskeer.Revetment.IO.Test/WaveConditions/WaveConditionsExporterBaseTest.cs =================================================================== diff -u -r7491928192a7ecf23958f85fbd4669ec17085c95 -rcb4afa462fa239009c16d8bec3b95dfde32013e2 --- Riskeer/Revetment/test/Riskeer.Revetment.IO.Test/WaveConditions/WaveConditionsExporterBaseTest.cs (.../WaveConditionsExporterBaseTest.cs) (revision 7491928192a7ecf23958f85fbd4669ec17085c95) +++ Riskeer/Revetment/test/Riskeer.Revetment.IO.Test/WaveConditions/WaveConditionsExporterBaseTest.cs (.../WaveConditionsExporterBaseTest.cs) (revision cb4afa462fa239009c16d8bec3b95dfde32013e2) @@ -43,7 +43,7 @@ string filePath = TestHelper.GetScratchPadPath($"{nameof(Constructor_ValidParameters_ExpectedValues)}.csv"); // Call - var waveConditionsExporter = new TestWaveConditionsExporter(new ExportableWaveConditions[0], filePath); + var waveConditionsExporter = new TestWaveConditionsExporter(Array.Empty(), filePath); // Assert Assert.IsInstanceOf(waveConditionsExporter); @@ -56,21 +56,21 @@ string filePath = TestHelper.GetScratchPadPath($"{nameof(Constructor_ExportableWaveConditionsCollectionNull_ThrowArgumentNullException)}.csv"); // Call - TestDelegate call = () => new TestWaveConditionsExporter(null, filePath); + void Call() => new TestWaveConditionsExporter(null, filePath); // Assert - var exception = Assert.Throws(call); + var exception = Assert.Throws(Call); Assert.AreEqual("exportableWaveConditionsCollection", exception.ParamName); } [Test] public void Constructor_FilePathNull_ThrowArgumentNullException() { // Call - TestDelegate call = () => new TestWaveConditionsExporter(new ExportableWaveConditions[0], null); + void Call() => new TestWaveConditionsExporter(Array.Empty(), null); // Assert - var exception = Assert.Throws(call); + var exception = Assert.Throws(Call); Assert.AreEqual("filePath", exception.ParamName); } @@ -80,16 +80,16 @@ // Setup string filePath = TestHelper.GetScratchPadPath("test_.csv"); string invalidFilePath = filePath.Replace("_", ">"); - var waveConditionsExporter = new TestWaveConditionsExporter(new ExportableWaveConditions[0], invalidFilePath); + var waveConditionsExporter = new TestWaveConditionsExporter(Array.Empty(), invalidFilePath); // Call var isExported = true; - Action call = () => isExported = waveConditionsExporter.Export(); + void Call() => isExported = waveConditionsExporter.Export(); // Assert string expectedMessage = $"Er is een onverwachte fout opgetreden tijdens het schrijven van het bestand '{invalidFilePath}'. " + "Er zijn geen golfcondities geëxporteerd."; - TestHelper.AssertLogMessageIsGenerated(call, expectedMessage); + TestHelper.AssertLogMessageIsGenerated(Call, expectedMessage); Assert.IsFalse(isExported); } @@ -103,7 +103,7 @@ { string filePath = Path.Combine(directoryPath, "test.csv"); - var waveConditionsExporter = new TestWaveConditionsExporter(new ExportableWaveConditions[0], filePath); + var waveConditionsExporter = new TestWaveConditionsExporter(Array.Empty(), filePath); // Call bool isExported = waveConditionsExporter.Export(); @@ -127,7 +127,7 @@ StepSize = WaveConditionsInputStepSize.One, LowerBoundaryWaterLevels = (RoundedDouble) 2.689, UpperBoundaryWaterLevels = (RoundedDouble) 77.8249863247 - }, CreateWaveConditionsOutputForExport(1.11111, 2.22222, 3.33333, 4.4, 5.5555555), CoverType.StoneCoverBlocks, "A->B"), + }, CreateWaveConditionsOutputForExport(1.11111, 2.22222, 3.33333, 4.4, 5.5555555), CoverType.StoneCoverBlocks, "A->B", i => "1/100"), new ExportableWaveConditions("columnsName", new TestWaveConditionsInput { HydraulicBoundaryLocation = new HydraulicBoundaryLocation(8, "aLocation", 44, 123.456), @@ -136,7 +136,7 @@ StepSize = WaveConditionsInputStepSize.Half, LowerBoundaryWaterLevels = (RoundedDouble) 1.98699, UpperBoundaryWaterLevels = (RoundedDouble) 84.26548 - }, CreateWaveConditionsOutputForExport(3.33333, 1.11111, 4.44444, 2.2, 6.66666), CoverType.StoneCoverColumns, "B->C") + }, CreateWaveConditionsOutputForExport(3.33333, 1.11111, 4.44444, 2.2, 6.66666), CoverType.StoneCoverColumns, "B->C", i => "1/100") }; string directoryPath = TestHelper.GetScratchPadPath(nameof(Export_ValidData_ValidFile)); @@ -150,9 +150,9 @@ // Assert Assert.IsTrue(File.Exists(filePath)); string fileContent = File.ReadAllText(filePath); - string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Categoriegrens, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}" + - $"blocksName, , 0.000, 0.000, , nee, nee, Steen (blokken), A->B, 1.11, 2.22, 3.33, 4.40, 5.56{Environment.NewLine}" + - $"columnsName, aLocation, 44.000, 123.456, , nee, nee, Steen (zuilen), B->C, 3.33, 1.11, 4.44, 2.20, 6.67{Environment.NewLine}"; + string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Doelkans, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}" + + $"blocksName, , 0.000, 0.000, , nee, nee, Steen (blokken), 1/100, 1.11, 2.22, 3.33, 4.40, 5.56{Environment.NewLine}" + + $"columnsName, aLocation, 44.000, 123.456, , nee, nee, Steen (zuilen), 1/100, 3.33, 1.11, 4.44, 2.20, 6.67{Environment.NewLine}"; Assert.AreEqual(expectedText, fileContent); } } Index: Riskeer/Revetment/test/Riskeer.Revetment.IO.Test/WaveConditions/WaveConditionsWriterTest.cs =================================================================== diff -u -rc102d66218b0d87133f912bae031908c1c3129db -rcb4afa462fa239009c16d8bec3b95dfde32013e2 --- Riskeer/Revetment/test/Riskeer.Revetment.IO.Test/WaveConditions/WaveConditionsWriterTest.cs (.../WaveConditionsWriterTest.cs) (revision c102d66218b0d87133f912bae031908c1c3129db) +++ Riskeer/Revetment/test/Riskeer.Revetment.IO.Test/WaveConditions/WaveConditionsWriterTest.cs (.../WaveConditionsWriterTest.cs) (revision cb4afa462fa239009c16d8bec3b95dfde32013e2) @@ -151,7 +151,7 @@ LowerBoundaryWaterLevels = (RoundedDouble) 2.689, UpperBoundaryWaterLevels = (RoundedDouble) 77.8249863247, UseBreakWater = true - }, CreateWaveConditionsOutputForExport(1.11111, 2.22222, 3.33333, 4.4, 5.5555555), CoverType.StoneCoverBlocks, "Iv->IIv"), + }, CreateWaveConditionsOutputForExport(1.11111, 2.22222, 3.33333, 4.4, 5.5555555), CoverType.StoneCoverBlocks, "Iv->IIv", i => "1/100"), new ExportableWaveConditions("columnsName", new TestWaveConditionsInput { HydraulicBoundaryLocation = new HydraulicBoundaryLocation(8, "aLocation", 44, 123.456), @@ -160,7 +160,7 @@ StepSize = WaveConditionsInputStepSize.One, LowerBoundaryWaterLevels = (RoundedDouble) 1.98699, UpperBoundaryWaterLevels = (RoundedDouble) 84.26548 - }, CreateWaveConditionsOutputForExport(3.33333, 1.11111, 4.44444, 2.2, 6.66666), CoverType.StoneCoverColumns, "A->B") + }, CreateWaveConditionsOutputForExport(3.33333, 1.11111, 4.44444, 2.2, 6.66666), CoverType.StoneCoverColumns, "A->B", i => "1/100") }; string directoryPath = TestHelper.GetScratchPadPath(nameof(WriteWaveConditions_ValidData_ValidFile)); @@ -174,9 +174,9 @@ // Assert Assert.IsTrue(File.Exists(filePath)); string fileContent = File.ReadAllText(filePath); - string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Categoriegrens, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}" + - $"blocksName, , 0.000, 0.000, , ja, nee, Steen (blokken), Iv->IIv, 1.11, 2.22, 3.33, 4.40, 5.56{Environment.NewLine}" + - $"columnsName, aLocation, 44.000, 123.456, , nee, nee, Steen (zuilen), A->B, 3.33, 1.11, 4.44, 2.20, 6.67{Environment.NewLine}"; + string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Doelkans, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}" + + $"blocksName, , 0.000, 0.000, , ja, nee, Steen (blokken), 1/100, 1.11, 2.22, 3.33, 4.40, 5.56{Environment.NewLine}" + + $"columnsName, aLocation, 44.000, 123.456, , nee, nee, Steen (zuilen), 1/100, 3.33, 1.11, 4.44, 2.20, 6.67{Environment.NewLine}"; Assert.AreEqual(expectedText, fileContent); } } Index: Riskeer/StabilityStoneCover/src/Riskeer.StabilityStoneCover.IO/Exporters/StabilityStoneCoverWaveConditionsExporter.cs =================================================================== diff -u -rd8abf0bc87b96f09e34f2d7a45248cf124b782fa -rcb4afa462fa239009c16d8bec3b95dfde32013e2 --- Riskeer/StabilityStoneCover/src/Riskeer.StabilityStoneCover.IO/Exporters/StabilityStoneCoverWaveConditionsExporter.cs (.../StabilityStoneCoverWaveConditionsExporter.cs) (revision d8abf0bc87b96f09e34f2d7a45248cf124b782fa) +++ Riskeer/StabilityStoneCover/src/Riskeer.StabilityStoneCover.IO/Exporters/StabilityStoneCoverWaveConditionsExporter.cs (.../StabilityStoneCoverWaveConditionsExporter.cs) (revision cb4afa462fa239009c16d8bec3b95dfde32013e2) @@ -55,6 +55,11 @@ throw new ArgumentNullException(nameof(calculations)); } + if (getTargetProbabilityFunc == null) + { + throw new ArgumentNullException(nameof(getTargetProbabilityFunc)); + } + IEnumerable exportableCalculations = calculations.Where(c => c.HasOutput && c.InputParameters.HydraulicBoundaryLocation != null); Index: Riskeer/StabilityStoneCover/test/Riskeer.StabilityStoneCover.IO.Test/Exporters/StabilityStoneCoverWaveConditionsExporterTest.cs =================================================================== diff -u -r2ef21b0f4d85a5c9689720d539254a1d5c907be7 -rcb4afa462fa239009c16d8bec3b95dfde32013e2 --- Riskeer/StabilityStoneCover/test/Riskeer.StabilityStoneCover.IO.Test/Exporters/StabilityStoneCoverWaveConditionsExporterTest.cs (.../StabilityStoneCoverWaveConditionsExporterTest.cs) (revision 2ef21b0f4d85a5c9689720d539254a1d5c907be7) +++ Riskeer/StabilityStoneCover/test/Riskeer.StabilityStoneCover.IO.Test/Exporters/StabilityStoneCoverWaveConditionsExporterTest.cs (.../StabilityStoneCoverWaveConditionsExporterTest.cs) (revision cb4afa462fa239009c16d8bec3b95dfde32013e2) @@ -40,33 +40,47 @@ public class StabilityStoneCoverWaveConditionsExporterTest { [Test] - public void Constructor_ValidParameters_ExpectedValues() + public void Constructor_CalculationsNull_ExpectedValues() { // Setup string filePath = TestHelper.GetScratchPadPath("test.csv"); // Call - var exporter = new StabilityStoneCoverWaveConditionsExporter(new StabilityStoneCoverWaveConditionsCalculation[0], filePath); + void Call() => new StabilityStoneCoverWaveConditionsExporter(null, filePath, i => "1/100"); // Assert - Assert.IsInstanceOf(exporter); + var exception = Assert.Throws(Call); + Assert.AreEqual("calculations", exception.ParamName); } [Test] - public void Constructor_CalculationsNull_ExpectedValues() + public void Constructor_GetTargetProbabilityFuncNull_ExpectedValues() { // Setup string filePath = TestHelper.GetScratchPadPath("test.csv"); // Call - TestDelegate call = () => new StabilityStoneCoverWaveConditionsExporter(null, filePath); + void Call() => new StabilityStoneCoverWaveConditionsExporter(Array.Empty(), filePath, null); // Assert - var exception = Assert.Throws(call); - Assert.AreEqual("calculations", exception.ParamName); + var exception = Assert.Throws(Call); + Assert.AreEqual("getTargetProbabilityFunc", exception.ParamName); } [Test] + public void Constructor_ValidParameters_ExpectedValues() + { + // Setup + string filePath = TestHelper.GetScratchPadPath("test.csv"); + + // Call + var exporter = new StabilityStoneCoverWaveConditionsExporter(Array.Empty(), filePath, i => "1/100"); + + // Assert + Assert.IsInstanceOf(exporter); + } + + [Test] public void Export_CalculationsWithoutOutput_FileWithOnlyHeader() { // Setup @@ -81,7 +95,7 @@ new StabilityStoneCoverWaveConditionsCalculation() }; - var exporter = new StabilityStoneCoverWaveConditionsExporter(calculationsWithoutOutput, filePath); + var exporter = new StabilityStoneCoverWaveConditionsExporter(calculationsWithoutOutput, filePath, i => "1/100"); // Call bool isExported = exporter.Export(); @@ -90,7 +104,7 @@ Assert.IsTrue(isExported); Assert.IsTrue(File.Exists(filePath)); string fileContent = File.ReadAllText(filePath); - string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Categoriegrens, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}"; + string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Doelkans, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}"; Assert.AreEqual(expectedText, fileContent); } } @@ -113,7 +127,7 @@ } }; - var exporter = new StabilityStoneCoverWaveConditionsExporter(calculations, filePath); + var exporter = new StabilityStoneCoverWaveConditionsExporter(calculations, filePath, i => "1/100"); // Call bool isExported = exporter.Export(); @@ -122,7 +136,7 @@ Assert.IsTrue(isExported); Assert.IsTrue(File.Exists(filePath)); string fileContent = File.ReadAllText(filePath); - string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Categoriegrens, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}"; + string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Doelkans, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}"; Assert.AreEqual(expectedText, fileContent); } } @@ -164,7 +178,7 @@ } }; - var exporter = new StabilityStoneCoverWaveConditionsExporter(calculations, filePath); + var exporter = new StabilityStoneCoverWaveConditionsExporter(calculations, filePath, i => "1/100"); // Call bool isExported = exporter.Export(); @@ -173,9 +187,9 @@ Assert.IsTrue(isExported); Assert.IsTrue(File.Exists(filePath)); string fileContent = File.ReadAllText(filePath); - string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Categoriegrens, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}" + - $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Steen (blokken), A, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}" + - $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Steen (zuilen), A, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}"; + string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Doelkans, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}" + + $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Steen (blokken), 1/100, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}" + + $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Steen (zuilen), 1/100, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}"; Assert.AreEqual(expectedText, fileContent); } } @@ -217,7 +231,7 @@ } }; - var exporter = new StabilityStoneCoverWaveConditionsExporter(calculations, filePath); + var exporter = new StabilityStoneCoverWaveConditionsExporter(calculations, filePath, i => "1/100"); // Call bool isExported = exporter.Export(); @@ -226,8 +240,8 @@ Assert.IsTrue(isExported); Assert.IsTrue(File.Exists(filePath)); string fileContent = File.ReadAllText(filePath); - string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Categoriegrens, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}" + - $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Steen (zuilen), A, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}"; + string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Doelkans, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}" + + $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Steen (zuilen), 1/100, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}"; Assert.AreEqual(expectedText, fileContent); } } @@ -269,7 +283,7 @@ } }; - var exporter = new StabilityStoneCoverWaveConditionsExporter(calculations, filePath); + var exporter = new StabilityStoneCoverWaveConditionsExporter(calculations, filePath, i => "1/100"); // Call bool isExported = exporter.Export(); @@ -278,8 +292,8 @@ Assert.IsTrue(isExported); Assert.IsTrue(File.Exists(filePath)); string fileContent = File.ReadAllText(filePath); - string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Categoriegrens, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}" + - $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Steen (blokken), A, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}"; + string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Doelkans, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}" + + $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Steen (blokken), 1/100, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}"; Assert.AreEqual(expectedText, fileContent); } } Index: Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.IO/Exporters/WaveImpactAsphaltCoverWaveConditionsExporter.cs =================================================================== diff -u -rd8abf0bc87b96f09e34f2d7a45248cf124b782fa -rcb4afa462fa239009c16d8bec3b95dfde32013e2 --- Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.IO/Exporters/WaveImpactAsphaltCoverWaveConditionsExporter.cs (.../WaveImpactAsphaltCoverWaveConditionsExporter.cs) (revision d8abf0bc87b96f09e34f2d7a45248cf124b782fa) +++ Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.IO/Exporters/WaveImpactAsphaltCoverWaveConditionsExporter.cs (.../WaveImpactAsphaltCoverWaveConditionsExporter.cs) (revision cb4afa462fa239009c16d8bec3b95dfde32013e2) @@ -52,6 +52,11 @@ throw new ArgumentNullException(nameof(calculations)); } + if (getTargetProbabilityFunc == null) + { + throw new ArgumentNullException(nameof(getTargetProbabilityFunc)); + } + var exportableWaveConditions = new List(); IEnumerable exportableCalculations = Index: Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.IO.Test/Exporters/WaveImpactAsphaltCoverWaveConditionsExporterTest.cs =================================================================== diff -u -r4f4daebe59ab925c98cef039101ec70544530bbe -rcb4afa462fa239009c16d8bec3b95dfde32013e2 --- Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.IO.Test/Exporters/WaveImpactAsphaltCoverWaveConditionsExporterTest.cs (.../WaveImpactAsphaltCoverWaveConditionsExporterTest.cs) (revision 4f4daebe59ab925c98cef039101ec70544530bbe) +++ Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.IO.Test/Exporters/WaveImpactAsphaltCoverWaveConditionsExporterTest.cs (.../WaveImpactAsphaltCoverWaveConditionsExporterTest.cs) (revision cb4afa462fa239009c16d8bec3b95dfde32013e2) @@ -40,41 +40,44 @@ public class WaveImpactAsphaltCoverWaveConditionsExporterTest { [Test] - public void Constructor_ValidParameters_ExpectedValues() + public void Constructor_CalculationNull_ThrowArgumentNullException() { // Setup string filePath = TestHelper.GetScratchPadPath("test.csv"); // Call - var waveConditionsExporter = new WaveImpactAsphaltCoverWaveConditionsExporter(new WaveImpactAsphaltCoverWaveConditionsCalculation[0], filePath); + void Call() => new WaveImpactAsphaltCoverWaveConditionsExporter(null, filePath, i => "1/100"); // Assert - Assert.IsInstanceOf(waveConditionsExporter); + var exception = Assert.Throws(Call); + Assert.AreEqual("calculations", exception.ParamName); } [Test] - public void Constructor_CalculationNull_ThrowArgumentNullException() + public void Constructor_GetTargetProbabilityFuncNull_ThrowArgumentNullException() { // Setup string filePath = TestHelper.GetScratchPadPath("test.csv"); // Call - TestDelegate call = () => new WaveImpactAsphaltCoverWaveConditionsExporter(null, filePath); + void Call() => new WaveImpactAsphaltCoverWaveConditionsExporter(Array.Empty(), filePath, null); // Assert - var exception = Assert.Throws(call); - Assert.AreEqual("calculations", exception.ParamName); + var exception = Assert.Throws(Call); + Assert.AreEqual("getTargetProbabilityFunc", exception.ParamName); } [Test] - public void Constructor_FilePathNull_ThrowArgumentNullException() + public void Constructor_ValidParameters_ExpectedValues() { + // Setup + string filePath = TestHelper.GetScratchPadPath("test.csv"); + // Call - TestDelegate call = () => new WaveImpactAsphaltCoverWaveConditionsExporter(new WaveImpactAsphaltCoverWaveConditionsCalculation[0], null); + var waveConditionsExporter = new WaveImpactAsphaltCoverWaveConditionsExporter(Array.Empty(), filePath, i => "1/100"); // Assert - var exception = Assert.Throws(call); - Assert.AreEqual("filePath", exception.ParamName); + Assert.IsInstanceOf(waveConditionsExporter); } [Test] @@ -92,7 +95,7 @@ new WaveImpactAsphaltCoverWaveConditionsCalculation() }; - var exporter = new WaveImpactAsphaltCoverWaveConditionsExporter(calculationsWithoutOutput, filePath); + var exporter = new WaveImpactAsphaltCoverWaveConditionsExporter(calculationsWithoutOutput, filePath, i => "1/100"); // Call bool isExported = exporter.Export(); @@ -101,7 +104,7 @@ Assert.IsTrue(isExported); Assert.IsTrue(File.Exists(filePath)); string fileContent = File.ReadAllText(filePath); - string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Categoriegrens, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}"; + string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Doelkans, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}"; Assert.AreEqual(expectedText, fileContent); } } @@ -124,7 +127,7 @@ } }; - var exporter = new WaveImpactAsphaltCoverWaveConditionsExporter(calculations, filePath); + var exporter = new WaveImpactAsphaltCoverWaveConditionsExporter(calculations, filePath, i => "1/100"); // Call bool isExported = exporter.Export(); @@ -133,7 +136,7 @@ Assert.IsTrue(isExported); Assert.IsTrue(File.Exists(filePath)); string fileContent = File.ReadAllText(filePath); - string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Categoriegrens, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}"; + string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Doelkans, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}"; Assert.AreEqual(expectedText, fileContent); } } @@ -171,7 +174,7 @@ } }; - var exporter = new WaveImpactAsphaltCoverWaveConditionsExporter(calculations, filePath); + var exporter = new WaveImpactAsphaltCoverWaveConditionsExporter(calculations, filePath, i => "1/100"); // Call bool isExported = exporter.Export(); @@ -180,8 +183,8 @@ Assert.IsTrue(isExported); Assert.IsTrue(File.Exists(filePath)); string fileContent = File.ReadAllText(filePath); - string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Categoriegrens, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}" + - $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Asfalt, C, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}"; + string expectedText = $"Naam berekening, Naam HB locatie, X HB locatie (RD) [m], Y HB locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Doelkans, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]{Environment.NewLine}" + + $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Asfalt, 1/100, 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}"; Assert.AreEqual(expectedText, fileContent); } }