Index: Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.IO.Test/Exporters/StabilityStoneCoverWaveConditionsExporterTest.cs =================================================================== diff -u -r0d0b747c9b4d6769f09e0dad0a0b7690b7b5755d -r4a94b04e58009fa943f7db933c59bdd680621ff2 --- Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.IO.Test/Exporters/StabilityStoneCoverWaveConditionsExporterTest.cs (.../StabilityStoneCoverWaveConditionsExporterTest.cs) (revision 0d0b747c9b4d6769f09e0dad0a0b7690b7b5755d) +++ Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.IO.Test/Exporters/StabilityStoneCoverWaveConditionsExporterTest.cs (.../StabilityStoneCoverWaveConditionsExporterTest.cs) (revision 4a94b04e58009fa943f7db933c59bdd680621ff2) @@ -69,8 +69,9 @@ public void Export_CalculationsWithoutOutput_FileWithOnlyHeader() { // Setup - string directoryPath = TestHelper.GetScratchPadPath(nameof(Export_CalculationsWithoutOutput_FileWithOnlyHeader)); - using (new DirectoryDisposeHelper(TestHelper.GetScratchPadPath(), nameof(Export_CalculationsWithoutOutput_FileWithOnlyHeader))) + const string folderName = nameof(Export_CalculationsWithoutOutput_FileWithOnlyHeader); + string directoryPath = TestHelper.GetScratchPadPath(folderName); + using (new DirectoryDisposeHelper(TestHelper.GetScratchPadPath(), folderName)) { string filePath = Path.Combine(directoryPath, "test.csv"); @@ -88,16 +89,18 @@ Assert.IsTrue(isExported); Assert.IsTrue(File.Exists(filePath)); string fileContent = File.ReadAllText(filePath); - Assert.AreEqual("Naam berekening, Naam HR locatie, X HR locatie (RD) [m], Y HR locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]\r\n", fileContent); + string expectedText = $"Naam berekening, Naam HR locatie, X HR locatie (RD) [m], Y HR locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, 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); } } [Test] public void Export_CalculationsWithoutHydraulicBoundaryLocation_FileWithOnlyHeader() { // Setup - string directoryPath = TestHelper.GetScratchPadPath(nameof(Export_CalculationsWithoutHydraulicBoundaryLocation_FileWithOnlyHeader)); - using (new DirectoryDisposeHelper(TestHelper.GetScratchPadPath(), nameof(Export_CalculationsWithoutHydraulicBoundaryLocation_FileWithOnlyHeader))) + const string folderName = nameof(Export_CalculationsWithoutHydraulicBoundaryLocation_FileWithOnlyHeader); + string directoryPath = TestHelper.GetScratchPadPath(folderName); + using (new DirectoryDisposeHelper(TestHelper.GetScratchPadPath(), folderName)) { string filePath = Path.Combine(directoryPath, "test.csv"); @@ -118,17 +121,18 @@ Assert.IsTrue(isExported); Assert.IsTrue(File.Exists(filePath)); string fileContent = File.ReadAllText(filePath); - Assert.AreEqual("Naam berekening, Naam HR locatie, X HR locatie (RD) [m], Y HR locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]\r\n", fileContent); + string expectedText = $"Naam berekening, Naam HR locatie, X HR locatie (RD) [m], Y HR locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, 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); } } [Test] public void Export_ValidData_ValidFile() { // Setup - string subFolder = $"{nameof(StabilityStoneCoverWaveConditionsExporterTest)}.{nameof(Export_ValidData_ValidFile)}"; - string directoryPath = TestHelper.GetScratchPadPath(subFolder); - using (new DirectoryDisposeHelper(TestHelper.GetScratchPadPath(), subFolder)) + string folderName = $"{nameof(StabilityStoneCoverWaveConditionsExporterTest)}.{nameof(Export_ValidData_ValidFile)}"; + string directoryPath = TestHelper.GetScratchPadPath(folderName); + using (new DirectoryDisposeHelper(TestHelper.GetScratchPadPath(), folderName)) { string filePath = Path.Combine(directoryPath, "test.csv"); @@ -169,10 +173,10 @@ Assert.IsTrue(isExported); Assert.IsTrue(File.Exists(filePath)); string fileContent = File.ReadAllText(filePath); - Assert.AreEqual("Naam berekening, Naam HR locatie, X HR locatie (RD) [m], Y HR locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, Waterstand [m+NAP], Golfhoogte (Hs) [m], Golfperiode (Tp) [s], Golfrichting t.o.v. dijknormaal [°], Golfrichting t.o.v. Noord [°]\r\n" + - "aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Steen (zuilen), 1.10, 2.20, 3.30, 4.40, 5.50\r\n" + - "aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Steen (blokken), 1.10, 2.20, 3.30, 4.40, 5.50\r\n", - fileContent); + string expectedText = $"Naam berekening, Naam HR locatie, X HR locatie (RD) [m], Y HR locatie (RD) [m], Naam voorlandprofiel, Dam gebruikt, Voorlandgeometrie gebruikt, Type bekleding, 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.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}" + + $"aCalculation, aLocation, 44.000, 123.456, foreshoreA, nee, nee, Steen (blokken), 1.10, 2.20, 3.30, 4.40, 5.50{Environment.NewLine}"; + Assert.AreEqual(expectedText, fileContent); } } }