Index: Ringtoets/Piping/src/Ringtoets.Piping.Data/RingtoetsPipingSurfaceLine.cs =================================================================== diff -u -ra950714ad9510756331d862aa35695fa0b2ed03b -r5462a7ee52b9491f269d489a094d359f4f02f270 --- Ringtoets/Piping/src/Ringtoets.Piping.Data/RingtoetsPipingSurfaceLine.cs (.../RingtoetsPipingSurfaceLine.cs) (revision a950714ad9510756331d862aa35695fa0b2ed03b) +++ Ringtoets/Piping/src/Ringtoets.Piping.Data/RingtoetsPipingSurfaceLine.cs (.../RingtoetsPipingSurfaceLine.cs) (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -28,9 +28,15 @@ public string Name { get; set; } /// - /// Gets or sets the 3D points describing its geometry. + /// Gets the 3D points describing its geometry. /// - public IEnumerable Points { get {return geometryPoints; } } + public IEnumerable Points + { + get + { + return geometryPoints; + } + } /// /// Gets or sets the first 3D geometry point defining the surfaceline in world coordinates. @@ -57,11 +63,11 @@ } } - public override string ToString() - { - return Name; - } - + /// + /// Projects the points in to localized coordinate (LZ-plane) system. + /// Z-values are retained, and the first point is put a L=0. + /// + /// Collection of 2D points in the LZ-plane. public IEnumerable ProjectGeometryToLZ() { var count = geometryPoints.Length; @@ -76,45 +82,56 @@ { ProjectPointsAfterFirstOntoSpanningLine(localCoordinatesX); } - + var result = new Point2D[count]; for (int i = 0; i < count; i++) { - result[i] = new Point2D { X = localCoordinatesX[i], Y = geometryPoints[i].Z }; + result[i] = new Point2D + { + X = localCoordinatesX[i], Y = geometryPoints[i].Z + }; } return result; } + public override string ToString() + { + return Name; + } + /// /// This method defines the 'spanning line' as the 2D vector going from start to end /// of the surface line points. Then all except the first point is projected onto /// this vector. Then the local coordinates are determined by taking the length of /// each vector along the 'spanning line'. /// /// The array into which the projected X-coordinate - /// values should be stored. It's should be the same as + /// values should be stored. Its should be the same as /// the collection-size of . private void ProjectPointsAfterFirstOntoSpanningLine(double[] localCoordinatesX) { // Determine the vectors from the first coordinate to each other coordinate point // in the XY world coordinate plane: - var worldCoordinates = Points.Select(p => new Point2D { X = p.X, Y = p.Y }).ToArray(); + Point2D[] worldCoordinates = Points.Select(p => new Point2D + { + X = p.X, Y = p.Y + }).ToArray(); var worldCoordinateVectors = new Vector[worldCoordinates.Length - 1]; for (int i = 1; i < worldCoordinates.Length; i++) { worldCoordinateVectors[i - 1] = worldCoordinates[i] - worldCoordinates[0]; } // Determine the 'spanning line' vector: - var spanningVector = worldCoordinateVectors[worldCoordinateVectors.Length - 1]; - var spanningVectorDotProduct = spanningVector.DotProduct(spanningVector); - var length = Math.Sqrt(spanningVectorDotProduct); + Vector spanningVector = worldCoordinateVectors[worldCoordinateVectors.Length - 1]; + double spanningVectorDotProduct = spanningVector.DotProduct(spanningVector); + double length = Math.Sqrt(spanningVectorDotProduct); // Project each vector onto the 'spanning vector' to determine it's X coordinate in local coordinates: for (int i = 0; i < worldCoordinateVectors.Length - 1; i++) { - var projectOnSpanningVectorFactor = (worldCoordinateVectors[i].DotProduct(spanningVector)) / - (spanningVectorDotProduct); + double projectOnSpanningVectorFactor = (worldCoordinateVectors[i].DotProduct(spanningVector)) / + (spanningVectorDotProduct); localCoordinatesX[i + 1] = projectOnSpanningVectorFactor * length; } localCoordinatesX[localCoordinatesX.Length - 1] = length; Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/Exceptions/CriticalFileReadException.cs =================================================================== diff -u -ra950714ad9510756331d862aa35695fa0b2ed03b -r5462a7ee52b9491f269d489a094d359f4f02f270 --- Ringtoets/Piping/src/Ringtoets.Piping.IO/Exceptions/CriticalFileReadException.cs (.../CriticalFileReadException.cs) (revision a950714ad9510756331d862aa35695fa0b2ed03b) +++ Ringtoets/Piping/src/Ringtoets.Piping.IO/Exceptions/CriticalFileReadException.cs (.../CriticalFileReadException.cs) (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -26,7 +26,8 @@ /// the cause of this exception. /// /// The error message that explains the reason for the exception. - /// The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + /// The exception that is the cause of the current exception, + /// or a null reference if no inner exception is specified. public CriticalFileReadException(string message, Exception inner) : base(message, inner) { } } } \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/Exceptions/LineParseException.cs =================================================================== diff -u -ra950714ad9510756331d862aa35695fa0b2ed03b -r5462a7ee52b9491f269d489a094d359f4f02f270 --- Ringtoets/Piping/src/Ringtoets.Piping.IO/Exceptions/LineParseException.cs (.../LineParseException.cs) (revision a950714ad9510756331d862aa35695fa0b2ed03b) +++ Ringtoets/Piping/src/Ringtoets.Piping.IO/Exceptions/LineParseException.cs (.../LineParseException.cs) (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -27,7 +27,7 @@ /// /// The error message that explains the reason for the exception. /// The exception that is the cause of the current exception, - /// or a null reference (Nothing in Visual Basic) if no inner exception is specified. + /// or a null reference if no inner exception is specified. public LineParseException(string message, Exception inner) : base(message, inner) { } } } \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/FileUtils.cs =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.IO/FileUtils.cs (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.IO/FileUtils.cs (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,41 @@ +using System; +using System.IO; + +using Ringtoets.Piping.IO.Properties; + +namespace Ringtoets.Piping.IO +{ + /// + /// Class with reusable File related utility methods. + /// + static internal class FileUtils + { + /// + /// Validates the file path. + /// + /// The file path to be validated. + /// is invalid. + public static void ValidateFilePath(string path) + { + if (String.IsNullOrWhiteSpace(path)) + { + throw new ArgumentException(Resources.Error_PathMustBeSpecified); + } + + string name; + try + { + name = Path.GetFileName(path); + } + catch (ArgumentException e) + { + throw new ArgumentException(String.Format(Resources.Error_PathCannotContainCharacters_0_, + String.Join(", ", Path.GetInvalidFileNameChars())), e); + } + if (String.Empty == name) + { + throw new ArgumentException(Resources.Error_PathMustNotPointToFolder); + } + } + } +} \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/PipingSurfaceLinesCsvReader.cs =================================================================== diff -u -ra950714ad9510756331d862aa35695fa0b2ed03b -r5462a7ee52b9491f269d489a094d359f4f02f270 --- Ringtoets/Piping/src/Ringtoets.Piping.IO/PipingSurfaceLinesCsvReader.cs (.../PipingSurfaceLinesCsvReader.cs) (revision a950714ad9510756331d862aa35695fa0b2ed03b) +++ Ringtoets/Piping/src/Ringtoets.Piping.IO/PipingSurfaceLinesCsvReader.cs (.../PipingSurfaceLinesCsvReader.cs) (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -17,7 +17,7 @@ /// Expects data to be specified in the following format: /// {ID};X1;Y1;Z1...;(Xn;Yn;Zn) /// Where {ID} has to be a particular accepted text, and n triplets of doubles form the - /// 3D coordinates defining the geometric shape of the surfaceline.. + /// 3D coordinates defining the geometric shape of the surfaceline. /// public class PipingSurfaceLinesCsvReader : IDisposable { @@ -49,7 +49,7 @@ /// is invalid. public PipingSurfaceLinesCsvReader(string path) { - ValidateFilePath(path); + FileUtils.ValidateFilePath(path); filePath = path; } @@ -129,7 +129,7 @@ }; surfaceLine.SetGeometry(points); - CheckGeometry(surfaceLine); + CheckIfGeometryIsValid(surfaceLine); return surfaceLine; } @@ -142,16 +142,16 @@ return null; } - private void CheckGeometry(RingtoetsPipingSurfaceLine surfaceLine) + private void CheckIfGeometryIsValid(RingtoetsPipingSurfaceLine surfaceLine) { double[] lCoordinates = surfaceLine.ProjectGeometryToLZ().Select(p => p.X).ToArray(); for (int i = 1; i < lCoordinates.Length; i++) { if (lCoordinates[i - 1] > lCoordinates[i]) { - var expectedMessage = string.Format(Resources.PipingSurfaceLinesCsvReader_ReadLine_File_0_Line_1_Has_reclining_geometry, - filePath, 2); - throw new LineParseException(expectedMessage); + var message = string.Format(Resources.PipingSurfaceLinesCsvReader_ReadLine_File_0_Line_1_Has_reclining_geometry, + filePath, 2); + throw new LineParseException(message); } } } @@ -188,7 +188,7 @@ /// Gets the 3D surface line points. /// /// The tokenized string. - /// Set of all unique 3D world coordinate points. + /// Set of all 3D world coordinate points. /// A parse error has occurred for the current row, which may be caused by: /// /// contains a coordinate value that cannot be parsed as a double. @@ -219,7 +219,7 @@ Z = worldCoordinateValues[i * expectedValuesForPoint + 2] }; } - return points.Distinct(); + return points; } /// @@ -316,14 +316,14 @@ { if (!IsHeaderValid(header)) { - var expectedMessage = string.Format(Resources.PipingSurfaceLinesCsvReader_File_0_invalid_header, filePath); - throw new CriticalFileReadException(expectedMessage); + var message = string.Format(Resources.PipingSurfaceLinesCsvReader_File_0_invalid_header, filePath); + throw new CriticalFileReadException(message); } } else { - var expectedMessage = string.Format(Resources.Error_File_0_empty, filePath); - throw new CriticalFileReadException(expectedMessage); + var message = string.Format(Resources.Error_File_0_empty, filePath); + throw new CriticalFileReadException(message); } } @@ -332,7 +332,7 @@ /// /// The reader at the row from which counting should start. /// The current line, used for error messaging. - /// An integer greater than or equal to 0. + /// An integer greater than or equal to 0, being the number of surfaceline rows. /// An I/O exception occurred. private int CountNonEmptyLines(TextReader reader, int currentLine) { @@ -392,33 +392,5 @@ } return valid; } - - /// - /// Validates the file path. - /// - /// The file path to be validated. - /// is invalid. - private void ValidateFilePath(string path) - { - if (string.IsNullOrWhiteSpace(path)) - { - throw new ArgumentException(Resources.Error_PathMustBeSpecified); - } - - string name; - try - { - name = Path.GetFileName(path); - } - catch (ArgumentException e) - { - throw new ArgumentException(String.Format(Resources.Error_PathCannotContainCharacters_0_, - String.Join(", ", Path.GetInvalidFileNameChars())), e); - } - if (string.Empty == name) - { - throw new ArgumentException(Resources.Error_PathMustNotPointToFolder); - } - } } } \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/Ringtoets.Piping.IO.csproj =================================================================== diff -u -ra950714ad9510756331d862aa35695fa0b2ed03b -r5462a7ee52b9491f269d489a094d359f4f02f270 --- Ringtoets/Piping/src/Ringtoets.Piping.IO/Ringtoets.Piping.IO.csproj (.../Ringtoets.Piping.IO.csproj) (revision a950714ad9510756331d862aa35695fa0b2ed03b) +++ Ringtoets/Piping/src/Ringtoets.Piping.IO/Ringtoets.Piping.IO.csproj (.../Ringtoets.Piping.IO.csproj) (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -22,7 +22,8 @@ false prompt MinimumRecommendedRules.ruleset - + + bin\Release\ @@ -33,7 +34,8 @@ x86 prompt MinimumRecommendedRules.ruleset - + + @@ -48,6 +50,7 @@ + Index: Ringtoets/Piping/src/Ringtoets.Piping.Plugin/FileImporter/PipingSurfaceLinesCsvImporter.cs =================================================================== diff -u -ra950714ad9510756331d862aa35695fa0b2ed03b -r5462a7ee52b9491f269d489a094d359f4f02f270 --- Ringtoets/Piping/src/Ringtoets.Piping.Plugin/FileImporter/PipingSurfaceLinesCsvImporter.cs (.../PipingSurfaceLinesCsvImporter.cs) (revision a950714ad9510756331d862aa35695fa0b2ed03b) +++ Ringtoets/Piping/src/Ringtoets.Piping.Plugin/FileImporter/PipingSurfaceLinesCsvImporter.cs (.../PipingSurfaceLinesCsvImporter.cs) (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -2,11 +2,13 @@ using System.Collections.Generic; using System.Drawing; using System.IO; +using System.Linq; + using Core.Common.BaseDelftTools; + using log4net; using Ringtoets.Piping.Data; - using Ringtoets.Piping.IO; using Ringtoets.Piping.IO.Exceptions; @@ -157,7 +159,9 @@ { try { - readSurfaceLines.Add(reader.ReadLine()); + var ringtoetsPipingSurfaceLine = reader.ReadLine(); + PruneConsecutiveDuplicateGeometryPoints(ringtoetsPipingSurfaceLine); + readSurfaceLines.Add(ringtoetsPipingSurfaceLine); } catch (CriticalFileReadException e) { @@ -181,6 +185,31 @@ }; } + private void PruneConsecutiveDuplicateGeometryPoints(RingtoetsPipingSurfaceLine ringtoetsPipingSurfaceLine) + { + Point3D[] readPoints = ringtoetsPipingSurfaceLine.Points.ToArray(); + var consecutiveDuplicatePointIndices = new List(); + Point3D previousPoint = null; + for (int j = 0; j < readPoints.Length; j++) + { + if (j != 0 && readPoints[j].Equals(previousPoint)) + { + consecutiveDuplicatePointIndices.Add(j); + previousPoint = readPoints[j]; + } + else + { + previousPoint = readPoints[j]; + } + } + + if (consecutiveDuplicatePointIndices.Any()) + { + log.WarnFormat("Dwarsdoorsnede {0} bevat aaneengesloten dubbele geometrie punten, welke zijn genegeerd.", ringtoetsPipingSurfaceLine.Name); + ringtoetsPipingSurfaceLine.SetGeometry(readPoints.Where((p, index) => !consecutiveDuplicatePointIndices.Contains(index))); + } + } + private SurfaceLinesFileReadResult HandleCriticalError(string path, Exception e) { var message = string.Format(ApplicationResources.PipingSurfaceLinesCsvImporter_CriticalErrorReading_0_Cause_1_, Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/RingtoetsPipingSurfaceLineTest.cs =================================================================== diff -u -ra950714ad9510756331d862aa35695fa0b2ed03b -r5462a7ee52b9491f269d489a094d359f4f02f270 --- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/RingtoetsPipingSurfaceLineTest.cs (.../RingtoetsPipingSurfaceLineTest.cs) (revision a950714ad9510756331d862aa35695fa0b2ed03b) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/RingtoetsPipingSurfaceLineTest.cs (.../RingtoetsPipingSurfaceLineTest.cs) (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -64,16 +64,52 @@ } [Test] + public void SetGeometry_CollectionOfMultiplePoints_InitializeStartAndEndWorldPointsInitializePoints() + { + // Setup + var surfaceLine = new RingtoetsPipingSurfaceLine(); + + var sourceData = new[] + { + new Point3D + { + X = 1.1, Y = 2.2, Z = 3.3 + }, + new Point3D + { + X = 4.4, Y = 5.5, Z = 6.6 + }, + new Point3D + { + X = 7.7, Y = 8.8, Z = 9.9 + }, + new Point3D + { + X = 10.10, Y = 11.11, Z = 12.12 + }, + }; + + // Call + surfaceLine.SetGeometry(sourceData); + + // Assert + Assert.AreNotSame(sourceData, surfaceLine.Points); + CollectionAssert.AreEqual(sourceData, surfaceLine.Points); + Assert.AreSame(sourceData[0], surfaceLine.StartingWorldPoint); + Assert.AreSame(sourceData[3], surfaceLine.EndingWorldPoint); + } + + [Test] public void ProjectGeometryToLZ_EmptyCollection_ReturnEmptyCollection() { // Setup var surfaceLine = new RingtoetsPipingSurfaceLine(); // Call - IEnumerable lzCoordiantes = surfaceLine.ProjectGeometryToLZ(); + IEnumerable lzCoordinates = surfaceLine.ProjectGeometryToLZ(); // Assert - CollectionAssert.IsEmpty(lzCoordiantes); + CollectionAssert.IsEmpty(lzCoordinates); } [Test] @@ -86,10 +122,10 @@ // Call - Point2D[] lzCoordiantes = surfaceLine.ProjectGeometryToLZ().ToArray(); + Point2D[] lzCoordinates = surfaceLine.ProjectGeometryToLZ().ToArray(); // Assert - CollectionAssert.AreEqual(new[]{ new Point2D { X = 0.0, Y = originalZ } }, lzCoordiantes); + CollectionAssert.AreEqual(new[]{ new Point2D { X = 0.0, Y = originalZ } }, lzCoordinates); } [Test] Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/FileUtilsTest.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/FileUtilsTest.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/FileUtilsTest.cs (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,72 @@ +using System; +using System.IO; + +using Core.Common.TestUtils; + +using NUnit.Framework; + +namespace Ringtoets.Piping.IO.Test +{ + [TestFixture] + public class FileUtilsTest + { + [Test] + public void ValidateFilePath_ValidPath_DoesNotThrowAnyExceptions() + { + // Setup + var path = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Piping.IO, "validFile.txt"); + + // Call + TestDelegate call = () => FileUtils.ValidateFilePath(path); + + // Assert + Assert.DoesNotThrow(call); + } + + [Test] + [TestCase(null)] + [TestCase("")] + [TestCase(" ")] + public void ValidateFilePath_InvalidEmptyPath_ThrowsArgumentException(string invalidPath) + { + // Call + TestDelegate call = () => FileUtils.ValidateFilePath(invalidPath); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("Bestandspad mag niet leeg of ongedefinieerd zijn.", exception.Message); + } + + [Test] + public void ValidateFilePath_PathContainingInvalidFileCharacters_ThrowsArgumentException() + { + // Setup + var path = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Piping.IO, "validFile.txt"); + var invalidFileNameChars = Path.GetInvalidFileNameChars(); + var invalidPath = path.Replace('d', invalidFileNameChars[0]); + + // Call + TestDelegate call = () => FileUtils.ValidateFilePath(invalidPath); + + // Assert + var exception = Assert.Throws(call); + var expectedMessage = String.Format("Bestandspad mag niet de volgende tekens bevatten: {0}", + string.Join(", ", invalidFileNameChars)); + Assert.AreEqual(expectedMessage, exception.Message); + } + + [Test] + public void ValidateFilePath_PathIsActuallyFolder_ThrowsArgumentException() + { + // Setup + var folderPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Piping.IO) + Path.DirectorySeparatorChar; + + // Call + TestDelegate call = () => FileUtils.ValidateFilePath(folderPath); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("Bestandspad mag niet naar een map verwijzen.", exception.Message); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/PipingSurfaceLinesCsvReaderTest.cs =================================================================== diff -u -ra950714ad9510756331d862aa35695fa0b2ed03b -r5462a7ee52b9491f269d489a094d359f4f02f270 --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/PipingSurfaceLinesCsvReaderTest.cs (.../PipingSurfaceLinesCsvReaderTest.cs) (revision a950714ad9510756331d862aa35695fa0b2ed03b) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/PipingSurfaceLinesCsvReaderTest.cs (.../PipingSurfaceLinesCsvReaderTest.cs) (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -16,7 +16,7 @@ [TestFixture] public class PipingSurfaceLinesCsvReaderTest { - private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Piping.IO, "PipingSurfaceLinesCsvReader" + Path.DirectorySeparatorChar); + private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Piping.IO, "SurfaceLines" + Path.DirectorySeparatorChar); [Test] [TestCase("")] @@ -240,7 +240,7 @@ { // Setup // File: First 3 points are identical - string path = Path.Combine(testDataPath, "ValidSurfaceLine_HasDuplicatePoints.csv"); + string path = Path.Combine(testDataPath, "ValidSurfaceLine_HasConsecutiveDuplicatePoints.csv"); // Precondition: Assert.IsTrue(File.Exists(path)); Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/Ringtoets.Piping.IO.Test.csproj =================================================================== diff -u -ra950714ad9510756331d862aa35695fa0b2ed03b -r5462a7ee52b9491f269d489a094d359f4f02f270 --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/Ringtoets.Piping.IO.Test.csproj (.../Ringtoets.Piping.IO.Test.csproj) (revision a950714ad9510756331d862aa35695fa0b2ed03b) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/Ringtoets.Piping.IO.Test.csproj (.../Ringtoets.Piping.IO.Test.csproj) (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -52,6 +52,7 @@ + Fisheye: Tag 5462a7ee52b9491f269d489a094d359f4f02f270 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/PipingSurfaceLinesCsvReader/InvalidHeader_LacksX1.csv'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5462a7ee52b9491f269d489a094d359f4f02f270 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/PipingSurfaceLinesCsvReader/InvalidHeader_LacksY1.csv'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5462a7ee52b9491f269d489a094d359f4f02f270 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/PipingSurfaceLinesCsvReader/InvalidHeader_LacksZ1.csv'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5462a7ee52b9491f269d489a094d359f4f02f270 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/PipingSurfaceLinesCsvReader/InvalidHeader_UnsupportedId.csv'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5462a7ee52b9491f269d489a094d359f4f02f270 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/PipingSurfaceLinesCsvReader/InvalidRow_IncorrectValueSeparator.csv'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5462a7ee52b9491f269d489a094d359f4f02f270 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/PipingSurfaceLinesCsvReader/InvalidRow_LacksCoordinateValues.csv'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5462a7ee52b9491f269d489a094d359f4f02f270 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/PipingSurfaceLinesCsvReader/InvalidRow_NotMonotinocallyIncreasingLCoordinates.csv'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5462a7ee52b9491f269d489a094d359f4f02f270 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/PipingSurfaceLinesCsvReader/InvalidRow_XNotAValidNumber.csv'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5462a7ee52b9491f269d489a094d359f4f02f270 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/PipingSurfaceLinesCsvReader/InvalidRow_XOverflowingNumber.csv'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5462a7ee52b9491f269d489a094d359f4f02f270 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/PipingSurfaceLinesCsvReader/InvalidRow_XUnderflowingNumber.csv'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5462a7ee52b9491f269d489a094d359f4f02f270 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/PipingSurfaceLinesCsvReader/InvalidRow_YNotAValidNumber.csv'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5462a7ee52b9491f269d489a094d359f4f02f270 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/PipingSurfaceLinesCsvReader/InvalidRow_YOverflowingNumber.csv'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5462a7ee52b9491f269d489a094d359f4f02f270 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/PipingSurfaceLinesCsvReader/InvalidRow_YUnderflowingNumber.csv'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5462a7ee52b9491f269d489a094d359f4f02f270 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/PipingSurfaceLinesCsvReader/InvalidRow_ZNotAValidNumber.csv'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5462a7ee52b9491f269d489a094d359f4f02f270 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/PipingSurfaceLinesCsvReader/InvalidRow_ZOverflowingNumber.csv'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5462a7ee52b9491f269d489a094d359f4f02f270 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/PipingSurfaceLinesCsvReader/InvalidRow_ZUnderflowingNumber.csv'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5462a7ee52b9491f269d489a094d359f4f02f270 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/PipingSurfaceLinesCsvReader/TwoInvalidRows_IncompleteCoordinateTriplets.csv'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5462a7ee52b9491f269d489a094d359f4f02f270 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/PipingSurfaceLinesCsvReader/TwoInvalidRows_LacksId.csv'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5462a7ee52b9491f269d489a094d359f4f02f270 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/PipingSurfaceLinesCsvReader/TwoValidAndOneInvalidNumberRowSurfaceLines.csv'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5462a7ee52b9491f269d489a094d359f4f02f270 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/PipingSurfaceLinesCsvReader/TwoValidSurfaceLines.csv'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5462a7ee52b9491f269d489a094d359f4f02f270 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/PipingSurfaceLinesCsvReader/ValidFileWithoutSurfaceLines.csv'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5462a7ee52b9491f269d489a094d359f4f02f270 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/PipingSurfaceLinesCsvReader/ValidSurfaceLine_HasDuplicatePoints.csv'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5462a7ee52b9491f269d489a094d359f4f02f270 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/PipingSurfaceLinesCsvReader/empty.csv'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidHeader_LacksX1.csv =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidHeader_LacksX1.csv (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidHeader_LacksX1.csv (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,3 @@ +Profielnaam;Y1;Z1;...;Xn;Yn;Zn +Rotterdam1;94263.0026213;427776.654093;-1.02;94275.9126686;427811.080886;-1.04;94284.0663827;427831.918156;1.25;94294.9380015;427858.191234;1.45;94305.3566362;427889.900123;1.65;94315.0957947;427913.908281;1.66;94325.0614453;427941.766804;1.55;94331.1767309;427960.112661;1.44 +ArtificalLocal;2.3;0;1.0;5.7;0;2.0;4.4;0;1.1 \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidHeader_LacksY1.csv =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidHeader_LacksY1.csv (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidHeader_LacksY1.csv (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,3 @@ +Profielnaam;X1;Z1;...;Xn;Yn;Zn +Rotterdam1;94263.0026213;427776.654093;-1.02;94275.9126686;427811.080886;-1.04;94284.0663827;427831.918156;1.25;94294.9380015;427858.191234;1.45;94305.3566362;427889.900123;1.65;94315.0957947;427913.908281;1.66;94325.0614453;427941.766804;1.55;94331.1767309;427960.112661;1.44 +ArtificalLocal;2.3;0;1.0;5.7;0;2.0;4.4;0;1.1 \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidHeader_LacksZ1.csv =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidHeader_LacksZ1.csv (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidHeader_LacksZ1.csv (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,3 @@ +Profielnaam;X1;Y1;...;Xn;Yn;Zn +Rotterdam1;94263.0026213;427776.654093;-1.02;94275.9126686;427811.080886;-1.04;94284.0663827;427831.918156;1.25;94294.9380015;427858.191234;1.45;94305.3566362;427889.900123;1.65;94315.0957947;427913.908281;1.66;94325.0614453;427941.766804;1.55;94331.1767309;427960.112661;1.44 +ArtificalLocal;2.3;0;1.0;5.7;0;2.0;4.4;0;1.1 \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidHeader_UnsupportedId.csv =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidHeader_UnsupportedId.csv (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidHeader_UnsupportedId.csv (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,3 @@ +"I'm not a valid id";X1;Y1;Z1;...;Xn;Yn;Zn +Rotterdam1;94263.0026213;427776.654093;-1.02;94275.9126686;427811.080886;-1.04;94284.0663827;427831.918156;1.25;94294.9380015;427858.191234;1.45;94305.3566362;427889.900123;1.65;94315.0957947;427913.908281;1.66;94325.0614453;427941.766804;1.55;94331.1767309;427960.112661;1.44 +ArtificalLocal;2.3;0;1.0;5.7;0;2.0;4.4;0;1.1 \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_IncorrectValueSeparator.csv =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_IncorrectValueSeparator.csv (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_IncorrectValueSeparator.csv (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,2 @@ +Profielnaam;X1;Y1;Z1;...;Xn;Yn;Zn +Rotterdam1,94263.0026213,427776.654093,-1.02,94275.9126686,427811.080886,-1.04,94284.0663827,427831.918156,1.25,94294.9380015,427858.191234,1.45,94305.3566362,427889.900123,1.65,94315.0957947,427913.908281,1.66,94325.0614453,427941.766804,1.55,94331.1767309,427960.112661,1.44 \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_LacksCoordinateValues.csv =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_LacksCoordinateValues.csv (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_LacksCoordinateValues.csv (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,2 @@ +Profielnaam;X1;Y1;Z1;...;Xn;Yn;Zn +InvalidRow1 \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_NotMonotinocallyIncreasingLCoordinates.csv =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_NotMonotinocallyIncreasingLCoordinates.csv (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_NotMonotinocallyIncreasingLCoordinates.csv (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,2 @@ +Profielnaam;X1;Y1;Z1;...;Xn;Yn;Zn +ArtificalLocal;1.0;1.0;1.0;3.0;3.0;3.0;2.0;2.0;2.0;4.0;4.0;4.0 Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_XNotAValidNumber.csv =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_XNotAValidNumber.csv (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_XNotAValidNumber.csv (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,2 @@ +Profielnaam;X1;Y1;Z1;...;Xn;Yn;Zn +InvalidSurfaceLine;This is not a number;2.2;3.3;4.4;5.5;6.6 \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_XOverflowingNumber.csv =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_XOverflowingNumber.csv (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_XOverflowingNumber.csv (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,2 @@ +Profielnaam;X1;Y1;Z1;...;Xn;Yn;Zn +InvalidSurfaceLine;999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999;2.2;3.3;4.4;5.5;6.6 \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_XUnderflowingNumber.csv =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_XUnderflowingNumber.csv (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_XUnderflowingNumber.csv (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,2 @@ +Profielnaam;X1;Y1;Z1;...;Xn;Yn;Zn +InvalidSurfaceLine;1.1;2.2;3.3;-999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999;5.5;6.6 \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_YNotAValidNumber.csv =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_YNotAValidNumber.csv (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_YNotAValidNumber.csv (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,2 @@ +Profielnaam;X1;Y1;Z1;...;Xn;Yn;Zn +InvalidSurfaceLine;1.1;definitely not a number;3.3;4.4;5.5;6.6 \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_YOverflowingNumber.csv =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_YOverflowingNumber.csv (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_YOverflowingNumber.csv (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,2 @@ +Profielnaam;X1;Y1;Z1;...;Xn;Yn;Zn +InvalidSurfaceLine;1.1;2.2;3.3;4.4;999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999;6.6 \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_YUnderflowingNumber.csv =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_YUnderflowingNumber.csv (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_YUnderflowingNumber.csv (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,2 @@ +Profielnaam;X1;Y1;Z1;...;Xn;Yn;Zn +InvalidSurfaceLine;1.1;-999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999;3.3;4.4;5.5;6.6 \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_ZNotAValidNumber.csv =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_ZNotAValidNumber.csv (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_ZNotAValidNumber.csv (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,2 @@ +Profielnaam;X1;Y1;Z1;...;Xn;Yn;Zn +InvalidSurfaceLine;1.1;2.2;three point three;4.4;5.5;6.6 \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_ZOverflowingNumber.csv =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_ZOverflowingNumber.csv (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_ZOverflowingNumber.csv (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,2 @@ +Profielnaam;X1;Y1;Z1;...;Xn;Yn;Zn +InvalidSurfaceLine;1.1;2.2;3.3;4.4;5.5;999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_ZUnderflowingNumber.csv =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_ZUnderflowingNumber.csv (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/InvalidRow_ZUnderflowingNumber.csv (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,2 @@ +Profielnaam;X1;Y1;Z1;...;Xn;Yn;Zn +InvalidSurfaceLine;1.1;2.2;-999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999;4.4;5.5;6.6 \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/TwoInvalidRows_IncompleteCoordinateTriplets.csv =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/TwoInvalidRows_IncompleteCoordinateTriplets.csv (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/TwoInvalidRows_IncompleteCoordinateTriplets.csv (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,3 @@ +Profielnaam;X1;Y1;Z1;...;Xn;Yn;Zn +LacksOneCoordinate;94263.0026213;427776.654093;-1.02;94275.9126686;427811.080886;-1.04;94284.0663827;1.25;94294.9380015;427858.191234;1.45;94305.3566362;427889.900123;1.65;94315.0957947;427913.908281;1.66;94325.0614453;427941.766804;1.55;94331.1767309;427960.112661;1.44 +LacksTwoCoordinates;2.3;0;1.0;2.0;4.4;0;1.1 \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/TwoInvalidRows_LacksId.csv =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/TwoInvalidRows_LacksId.csv (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/TwoInvalidRows_LacksId.csv (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,3 @@ +Profielnaam;X1;Y1;Z1;...;Xn;Yn;Zn +;94263.0026213;427776.654093;-1.02;94275.9126686;427811.080886;-1.04;94284.0663827;427831.918156;1.25;94294.9380015;427858.191234;1.45;94305.3566362;427889.900123;1.65;94315.0957947;427913.908281;1.66;94325.0614453;427941.766804;1.55;94331.1767309;427960.112661;1.44 + ;2.3;0;1.0;5.7;0;2.0;4.4;0;1.1 \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/TwoValidAndOneInvalidNumberRowSurfaceLines.csv =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/TwoValidAndOneInvalidNumberRowSurfaceLines.csv (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/TwoValidAndOneInvalidNumberRowSurfaceLines.csv (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,4 @@ +Profielnaam;X1;Y1;Z1;...;Xn;Yn;Zn +Rotterdam1;94263.0026213;427776.654093;-1.02;94275.9126686;427811.080886;-1.04;94284.0663827;427831.918156;1.25;94294.9380015;427858.191234;1.45;94305.3566362;427889.900123;1.65;94315.0957947;427913.908281;1.66;94325.0614453;427941.766804;1.55;94331.1767309;427960.112661;1.44 +InvalidRow;1.1;Really not a number;3.3;4.4;5.5;6.6 +ArtificalLocal;2.3;0;1.0;5.7;0;2.0;9.9;0;1.1 \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/TwoValidSurfaceLines.csv =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/TwoValidSurfaceLines.csv (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/TwoValidSurfaceLines.csv (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,3 @@ +Profielnaam;X1;Y1;Z1;...;Xn;Yn;Zn;;;;;;;;;;;;;;;;; +Rotterdam1;94263.0026213;427776.654093;-1.02;94275.9126686;427811.080886;-1.04;94284.0663827;427831.918156;1.25;94294.9380015;427858.191234;1.45;94305.3566362;427889.900123;1.65;94315.0957947;427913.908281;1.66;94325.0614453;427941.766804;1.55;94331.1767309;427960.112661;1.44 +ArtificalLocal;2.3;0;1.0;4.4;0;2.0;5.7;0;1.1;;;;;;;;;;;;;;; Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/ValidFileWithoutSurfaceLines.csv =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/ValidFileWithoutSurfaceLines.csv (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/ValidFileWithoutSurfaceLines.csv (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,2 @@ +Profielnaam;X1;Y1;Z1;...;Xn;Yn;Zn + Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/ValidSurfaceLine_HasConsecutiveDuplicatePoints.csv =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/ValidSurfaceLine_HasConsecutiveDuplicatePoints.csv (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/ValidSurfaceLine_HasConsecutiveDuplicatePoints.csv (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,2 @@ +Profielnaam;X1;Y1;Z1;...;Xn;Yn;Zn +Rotterdam1;94263.0026213;427776.654093;-1.02;94263.0026213;427776.654093;-1.02;94263.0026213;427776.654093;-1.02;94275.9126686;427811.080886;-1.04;94284.0663827;427831.918156;1.25;94294.9380015;427858.191234;1.45;94305.3566362;427889.900123;1.65;94315.0957947;427913.908281;1.66;94325.0614453;427941.766804;1.55;94331.1767309;427960.112661;1.44 Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/ValidSurfaceLine_HasDuplicatePoints.csv =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/ValidSurfaceLine_HasDuplicatePoints.csv (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/ValidSurfaceLine_HasDuplicatePoints.csv (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1,2 @@ +Profielnaam;X1;Y1;Z1;...;Xn;Yn;Zn +Rotterdam1;94263.0026213;427776.654093;-1.02;94275.9126686;427811.080886;-1.04;94263.0026213;427776.654093;-1.02;94284.0663827;427831.918156;1.25;94263.0026213;427776.654093;-1.02;94294.9380015;427858.191234;1.45;94305.3566362;427889.900123;1.65;94263.0026213;427776.654093;-1.02;94315.0957947;427913.908281;1.66;94325.0614453;427941.766804;1.55;94331.1767309;427960.112661;1.44 Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/empty.csv =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/empty.csv (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/test-data/SurfaceLines/empty.csv (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -0,0 +1 @@ \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/FileImporter/PipingSurfaceLineCsvImporterTest.cs =================================================================== diff -u -ra950714ad9510756331d862aa35695fa0b2ed03b -r5462a7ee52b9491f269d489a094d359f4f02f270 --- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/FileImporter/PipingSurfaceLineCsvImporterTest.cs (.../PipingSurfaceLineCsvImporterTest.cs) (revision a950714ad9510756331d862aa35695fa0b2ed03b) +++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/FileImporter/PipingSurfaceLineCsvImporterTest.cs (.../PipingSurfaceLineCsvImporterTest.cs) (revision 5462a7ee52b9491f269d489a094d359f4f02f270) @@ -22,7 +22,7 @@ [TestFixture] public class PipingSurfaceLineCsvImporterTest { - private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Piping.IO, "PipingSurfaceLinesCsvReader"); + private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Piping.IO, "SurfaceLines"); [Test] public void DefaultConstructor_ExpectedValues() @@ -152,6 +152,55 @@ } [Test] + public void ImportItem_ImportingToValidTargetWithValidFileWithConsecutiveDuplicatePoints_ImportSurfaceLineWithDuplicatesRemovedToCollection() + { + // Setup + var twovalidsurfacelinesCsv = "ValidSurfaceLine_HasConsecutiveDuplicatePoints.csv"; + string validFilePath = Path.Combine(testDataPath, twovalidsurfacelinesCsv); + + var mocks = new MockRepository(); + var observer = mocks.StrictMock(); + observer.Expect(o => o.UpdateObserver()); + mocks.ReplayAll(); + + var observableSurfaceLinesList = new ObservableList(); + observableSurfaceLinesList.Attach(observer); + + var importer = new PipingSurfaceLinesCsvImporter(); + + // Precondition + CollectionAssert.IsEmpty(observableSurfaceLinesList); + Assert.IsTrue(importer.CanImportOn(observableSurfaceLinesList)); + Assert.IsTrue(File.Exists(validFilePath)); + + // Call + object importedItem = null; + Action call = () => importedItem = importer.ImportItem(validFilePath, observableSurfaceLinesList); + + // Assert + TestHelper.AssertLogMessageIsGenerated(call, "Dwarsdoorsnede Rotterdam1 bevat aaneengesloten dubbele geometrie punten, welke zijn genegeerd.", 1); + Assert.AreSame(observableSurfaceLinesList, importedItem); + var importTargetArray = observableSurfaceLinesList.ToArray(); + Assert.AreEqual(1, importTargetArray.Length); + + // Sample some of the imported data: + var firstSurfaceLine = importTargetArray[0]; + Assert.AreEqual("Rotterdam1", firstSurfaceLine.Name); + var geometryPoints = firstSurfaceLine.Points.ToArray(); + Assert.AreEqual(8, geometryPoints.Length); + Assert.AreNotEqual(geometryPoints[0].X, geometryPoints[1].X, + "Originally duplicate points at the start have been removed."); + Assert.AreNotEqual(geometryPoints[0].X, geometryPoints[2].X, + "Originally duplicate points at the start have been removed."); + Assert.AreEqual(427776.654093, firstSurfaceLine.StartingWorldPoint.Y); + CollectionAssert.AllItemsAreUnique(geometryPoints); + + Assert.IsTrue(FileHelper.CanOpenFileForWrite(validFilePath)); + + mocks.VerifyAll(); + } + + [Test] public void ImportItem_ImportingToValidTargetWithValidFileWhileShouldCancelTrue_CancelImportAndLog() { // Setup @@ -408,5 +457,46 @@ "Expect 1 call for each surfaceline (3 in total) +1 for 0/N progress, and 1 for putting data in model."); mocks.VerifyAll(); } + + [Test] + public void ImportItem_ImportingToValidTargetWithInValidFileWithDuplicatePointsCausingRecline_SkipInvalidRowAndLog() + { + // Setup + var twovalidsurfacelinesCsv = "ValidSurfaceLine_HasDuplicatePoints.csv"; + string path = Path.Combine(testDataPath, twovalidsurfacelinesCsv); + + var mocks = new MockRepository(); + var observer = mocks.StrictMock(); + observer.Expect(o => o.UpdateObserver()); + mocks.ReplayAll(); + + var observableSurfaceLinesList = new ObservableList(); + observableSurfaceLinesList.Attach(observer); + + var importer = new PipingSurfaceLinesCsvImporter(); + + // Precondition + CollectionAssert.IsEmpty(observableSurfaceLinesList); + Assert.IsTrue(importer.CanImportOn(observableSurfaceLinesList)); + Assert.IsTrue(File.Exists(path)); + + // Call + object importedItem = null; + Action call = () => importedItem = importer.ImportItem(path, observableSurfaceLinesList); + + // Assert + var internalErrorMessage = String.Format(WtiIOResources.PipingSurfaceLinesCsvReader_ReadLine_File_0_Line_1_Has_reclining_geometry, + path, 2); + var expectedLogMessage = string.Format(ApplicationResources.PipingSurfaceLinesCsvImporter_ReadPipingSurfaceLines_ParseError_File_0_SurfaceLinesNumber_1_Message_2_, + path, 1, internalErrorMessage); + TestHelper.AssertLogMessageIsGenerated(call, expectedLogMessage, 1); + Assert.AreSame(observableSurfaceLinesList, importedItem); + var importTargetArray = observableSurfaceLinesList.ToArray(); + Assert.AreEqual(0, importTargetArray.Length); + + Assert.IsTrue(FileHelper.CanOpenFileForWrite(path)); + + mocks.VerifyAll(); + } } } \ No newline at end of file