Index: Ringtoets/Common/src/Ringtoets.Common.IO/Exceptions/ImportedDataTransformException.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.IO/Exceptions/ImportedDataTransformException.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/Exceptions/ImportedDataTransformException.cs (revision 76d5d269e367c6c3a98802b92d689cebd506a2f2)
@@ -0,0 +1,68 @@
+// Copyright (C) Stichting Deltares 2017. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.Runtime.Serialization;
+
+namespace Ringtoets.Common.IO.Exceptions
+{
+ ///
+ /// The exception that is thrown when transforming imported data to specific data fails.
+ ///
+ [Serializable]
+ public class ImportedDataTransformException : Exception
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ImportedDataTransformException() {}
+
+ ///
+ /// Initializes a new instance of the class
+ /// with a specified error message.
+ ///
+ /// The error message that explains the reason for the exception.
+ public ImportedDataTransformException(string message) : base(message) {}
+
+ ///
+ /// Initializes a new instance of the class
+ /// with a specified error message and a reference to the inner exception that is
+ /// 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 if no inner exception is specified.
+ public ImportedDataTransformException(string message, Exception inner) : base(message, inner) {}
+
+ ///
+ /// Initializes a new instance of with
+ /// serialized data.
+ /// The that holds the serialized
+ /// object data about the exception being thrown.
+ /// The that contains contextual
+ /// information about the source or destination.
+ /// The parameter is
+ /// null.
+ /// The class name is null or
+ /// is zero (0).
+ protected ImportedDataTransformException(SerializationInfo info, StreamingContext context) : base(info, context) {}
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.IO/Ringtoets.Common.IO.csproj
===================================================================
diff -u -r36e7a0a258891013379258ea856d49351594666e -r76d5d269e367c6c3a98802b92d689cebd506a2f2
--- Ringtoets/Common/src/Ringtoets.Common.IO/Ringtoets.Common.IO.csproj (.../Ringtoets.Common.IO.csproj) (revision 36e7a0a258891013379258ea856d49351594666e)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/Ringtoets.Common.IO.csproj (.../Ringtoets.Common.IO.csproj) (revision 76d5d269e367c6c3a98802b92d689cebd506a2f2)
@@ -168,7 +168,7 @@
-
+
Index: Ringtoets/Common/src/Ringtoets.Common.IO/SurfaceLines/ISurfaceLineTransformer.cs
===================================================================
diff -u -rdf853f988ad99b935860c361bc000f6aba9876a7 -r76d5d269e367c6c3a98802b92d689cebd506a2f2
--- Ringtoets/Common/src/Ringtoets.Common.IO/SurfaceLines/ISurfaceLineTransformer.cs (.../ISurfaceLineTransformer.cs) (revision df853f988ad99b935860c361bc000f6aba9876a7)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/SurfaceLines/ISurfaceLineTransformer.cs (.../ISurfaceLineTransformer.cs) (revision 76d5d269e367c6c3a98802b92d689cebd506a2f2)
@@ -20,6 +20,7 @@
// All rights reserved.
using Ringtoets.Common.Data;
+using Ringtoets.Common.IO.Exceptions;
namespace Ringtoets.Common.IO.SurfaceLines
{
@@ -36,7 +37,7 @@
/// The surface line to use in the transformation.
/// The characteristic points to use in the transformation.
/// A new based on the given data.
- /// Thrown when transformation would not result
+ /// Thrown when transformation would not result
/// in a valid transformed instance.
T Transform(SurfaceLine surfaceLine, CharacteristicPoints characteristicPoints);
}
Index: Ringtoets/Common/src/Ringtoets.Common.IO/SurfaceLines/SurfaceLineExtensions.cs
===================================================================
diff -u -r94e24e96e5e908960f5559c5d98021153f4e4120 -r76d5d269e367c6c3a98802b92d689cebd506a2f2
--- Ringtoets/Common/src/Ringtoets.Common.IO/SurfaceLines/SurfaceLineExtensions.cs (.../SurfaceLineExtensions.cs) (revision 94e24e96e5e908960f5559c5d98021153f4e4120)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/SurfaceLines/SurfaceLineExtensions.cs (.../SurfaceLineExtensions.cs) (revision 76d5d269e367c6c3a98802b92d689cebd506a2f2)
@@ -24,6 +24,7 @@
using System.Linq;
using Core.Common.Base.Geometry;
using Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.IO.Exceptions;
using Ringtoets.Common.IO.Properties;
namespace Ringtoets.Common.IO.SurfaceLines
@@ -52,7 +53,7 @@
/// A new with a type of intersection and
/// possibly an intersection point, if there was only one found.
/// Thrown when any parameter is null.
- /// Thrown when the surface line:
+ /// Thrown when the surface line:
///
/// - has no intersections with the reference line;
/// - has more than one intersection with the reference line.
@@ -76,12 +77,12 @@
string message = string.Format(Resources.SurfaceLineExtensions_GetSingleReferenceLineIntersection_SurfaceLine_0_does_not_correspond_to_current_referenceline_1_,
surfaceLine.Name,
Resources.SurfaceLineExtensions_GetSingleReferenceLineIntersection_This_could_be_caused_coordinates_being_local_coordinate_system);
- throw new SurfaceLineTransformException(message);
+ throw new ImportedDataTransformException(message);
}
if (result.TypeOfIntersection == ReferenceLineIntersectionsResult.MultipleIntersectionsOrOverlap)
{
string message = string.Format(Resources.SurfaceLineExtensions_GetSingleReferenceLineIntersection_SurfaceLine_0_does_not_correspond_to_current_referenceline, surfaceLine.Name);
- throw new SurfaceLineTransformException(message);
+ throw new ImportedDataTransformException(message);
}
return result.IntersectionPoint;
Fisheye: Tag 76d5d269e367c6c3a98802b92d689cebd506a2f2 refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.IO/SurfaceLines/SurfaceLineTransformException.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Common/src/Ringtoets.Common.IO/SurfaceLines/SurfaceLinesCsvImporter.cs
===================================================================
diff -u -r25772ddfd0a02f2fb7633bf69d114106900f5bb0 -r76d5d269e367c6c3a98802b92d689cebd506a2f2
--- Ringtoets/Common/src/Ringtoets.Common.IO/SurfaceLines/SurfaceLinesCsvImporter.cs (.../SurfaceLinesCsvImporter.cs) (revision 25772ddfd0a02f2fb7633bf69d114106900f5bb0)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/SurfaceLines/SurfaceLinesCsvImporter.cs (.../SurfaceLinesCsvImporter.cs) (revision 76d5d269e367c6c3a98802b92d689cebd506a2f2)
@@ -30,6 +30,7 @@
using Core.Common.IO.Readers;
using Ringtoets.Common.Data;
using Ringtoets.Common.Data.Exceptions;
+using Ringtoets.Common.IO.Exceptions;
using Ringtoets.Common.IO.FileImporters.MessageProviders;
using RingtoetsCommonDataResources = Ringtoets.Common.Data.Properties.Resources;
using RingtoetsCommonIOResources = Ringtoets.Common.IO.Properties.Resources;
@@ -102,7 +103,7 @@
{
transformedSurfaceLines = GetTransformedSurfaceLines(importSurfaceLinesResult.Items, importCharacteristicPointsResult.Items).ToArray();
}
- catch (SurfaceLineTransformException e)
+ catch (ImportedDataTransformException e)
{
Log.ErrorFormat(RingtoetsCommonIOResources.SurfaceLinesCsvImporter_CriticalErrorMessage_0_File_Skipped,
e.Message);
@@ -153,7 +154,7 @@
/// The characteristic points to use in the
/// transformation.
/// Returns a collection of mechanism specific surface lines.
- /// Thrown when transforming a surface
+ /// Thrown when transforming a surface
/// line with characteristic points failed.
private IEnumerable GetTransformedSurfaceLines(ICollection surfaceLines, ICollection characteristicPointsCollection)
{
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/Exceptions/ImportedDataTransformExceptionTest.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/Exceptions/ImportedDataTransformExceptionTest.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/Exceptions/ImportedDataTransformExceptionTest.cs (revision 76d5d269e367c6c3a98802b92d689cebd506a2f2)
@@ -0,0 +1,32 @@
+// Copyright (C) Stichting Deltares 2017. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using Core.Common.TestUtil;
+using NUnit.Framework;
+using Ringtoets.Common.IO.Exceptions;
+
+namespace Ringtoets.Common.IO.Test.Exceptions
+{
+ [TestFixture]
+ public class ImportedDataTransformExceptionTest :
+ CustomExceptionDesignGuidelinesTestFixture {}
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/Ringtoets.Common.IO.Test.csproj
===================================================================
diff -u -r36e7a0a258891013379258ea856d49351594666e -r76d5d269e367c6c3a98802b92d689cebd506a2f2
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/Ringtoets.Common.IO.Test.csproj (.../Ringtoets.Common.IO.Test.csproj) (revision 36e7a0a258891013379258ea856d49351594666e)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/Ringtoets.Common.IO.Test.csproj (.../Ringtoets.Common.IO.Test.csproj) (revision 76d5d269e367c6c3a98802b92d689cebd506a2f2)
@@ -142,7 +142,7 @@
-
+
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/SurfaceLines/SurfaceLineExtensionsTest.cs
===================================================================
diff -u -r94e24e96e5e908960f5559c5d98021153f4e4120 -r76d5d269e367c6c3a98802b92d689cebd506a2f2
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/SurfaceLines/SurfaceLineExtensionsTest.cs (.../SurfaceLineExtensionsTest.cs) (revision 94e24e96e5e908960f5559c5d98021153f4e4120)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/SurfaceLines/SurfaceLineExtensionsTest.cs (.../SurfaceLineExtensionsTest.cs) (revision 76d5d269e367c6c3a98802b92d689cebd506a2f2)
@@ -23,6 +23,7 @@
using Core.Common.Base.Geometry;
using NUnit.Framework;
using Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.IO.Exceptions;
using Ringtoets.Common.IO.SurfaceLines;
namespace Ringtoets.Common.IO.Test.SurfaceLines
@@ -137,7 +138,7 @@
// Assert
string message = $"Profielschematisatie {surfaceLineName} doorkruist de huidige referentielijn niet of op meer dan één punt en kan niet worden geïmporteerd. Dit kan komen doordat de profielschematisatie een lokaal coördinaatsysteem heeft.";
- var exception = Assert.Throws(test);
+ var exception = Assert.Throws(test);
Assert.AreEqual(message, exception.Message);
}
@@ -200,7 +201,7 @@
// Assert
string message = $"Profielschematisatie {surfaceLineName} doorkruist de huidige referentielijn niet of op meer dan één punt en kan niet worden geïmporteerd.";
- var exception = Assert.Throws(test);
+ var exception = Assert.Throws(test);
Assert.AreEqual(message, exception.Message);
}
}
Fisheye: Tag 76d5d269e367c6c3a98802b92d689cebd506a2f2 refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.IO.Test/SurfaceLines/SurfaceLineTransformExceptionTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/SurfaceLines/SurfaceLinesCsvImporterTest.cs
===================================================================
diff -u -r58d6c1ce350eab9ed20b2f20a56d9a2a54ad3fc9 -r76d5d269e367c6c3a98802b92d689cebd506a2f2
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/SurfaceLines/SurfaceLinesCsvImporterTest.cs (.../SurfaceLinesCsvImporterTest.cs) (revision 58d6c1ce350eab9ed20b2f20a56d9a2a54ad3fc9)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/SurfaceLines/SurfaceLinesCsvImporterTest.cs (.../SurfaceLinesCsvImporterTest.cs) (revision 76d5d269e367c6c3a98802b92d689cebd506a2f2)
@@ -34,6 +34,7 @@
using Rhino.Mocks;
using Ringtoets.Common.Data;
using Ringtoets.Common.Data.Exceptions;
+using Ringtoets.Common.IO.Exceptions;
using Ringtoets.Common.IO.FileImporters.MessageProviders;
using Ringtoets.Common.IO.SurfaceLines;
@@ -1092,7 +1093,7 @@
// Setup
const string exceptionMessage = "This is exceptional";
var messageProvider = mocks.Stub();
- transformer.Expect(t => t.Transform(Arg.Is.Anything, Arg.Is.Anything)).Throw(new SurfaceLineTransformException(exceptionMessage));
+ transformer.Expect(t => t.Transform(Arg.Is.Anything, Arg.Is.Anything)).Throw(new ImportedDataTransformException(exceptionMessage));
mocks.ReplayAll();
const string fileName = "TwoValidSurfaceLines_WithCharacteristicPoints";
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Importers/MacroStabilityInwardsSurfaceLineExtensions.cs
===================================================================
diff -u -rcd90ebf744fb74f0d4b0dd6ee06f9c39b5faf213 -r76d5d269e367c6c3a98802b92d689cebd506a2f2
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Importers/MacroStabilityInwardsSurfaceLineExtensions.cs (.../MacroStabilityInwardsSurfaceLineExtensions.cs) (revision cd90ebf744fb74f0d4b0dd6ee06f9c39b5faf213)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Importers/MacroStabilityInwardsSurfaceLineExtensions.cs (.../MacroStabilityInwardsSurfaceLineExtensions.cs) (revision 76d5d269e367c6c3a98802b92d689cebd506a2f2)
@@ -22,6 +22,7 @@
using System;
using Core.Common.Base.Geometry;
using log4net;
+using Ringtoets.Common.IO.Exceptions;
using Ringtoets.Common.IO.SurfaceLines;
using Ringtoets.MacroStabilityInwards.Primitives;
using RingtoetsCommonDataResources = Ringtoets.Common.Data.Properties.Resources;
@@ -44,7 +45,7 @@
/// The surface line to set the characteristic points for.
/// The characteristic points to set, if the collection is valid.
/// Thrown when is null.
- /// Thrown when a mandatory characteristic point is not
+ /// Thrown when a mandatory characteristic point is not
/// present or not on the given .
public static void SetCharacteristicPoints(this MacroStabilityInwardsSurfaceLine surfaceLine, CharacteristicPoints characteristicPoints)
{
@@ -55,7 +56,7 @@
if (characteristicPoints == null)
{
- throw new SurfaceLineTransformException($"Karakteristieke punten definitie voor profielschematisatie '{surfaceLine.Name}' is verplicht.");
+ throw new ImportedDataTransformException($"Karakteristieke punten definitie voor profielschematisatie '{surfaceLine.Name}' is verplicht.");
}
surfaceLine.TrySetSurfaceLevelOutside(characteristicPoints.SurfaceLevelOutside);
@@ -169,7 +170,7 @@
/// The to set the
/// for.
/// The point at which to set the .
- /// Thrown when is null or
+ /// Thrown when is null or
/// not on the .
private static void TrySetSurfaceLevelInside(this MacroStabilityInwardsSurfaceLine surfaceLine, Point3D point)
{
@@ -194,7 +195,7 @@
/// The to set the
/// for.
/// The point at which to set the .
- /// Thrown when is null or
+ /// Thrown when is null or
/// not on the .
private static void TrySetSurfaceLevelOutside(this MacroStabilityInwardsSurfaceLine surfaceLine, Point3D point)
{
@@ -219,7 +220,7 @@
/// The to set the
/// for.
/// The point at which to set the .
- /// Thrown when is null or
+ /// Thrown when is null or
/// not on the .
private static void TrySetDikeTopAtPolder(this MacroStabilityInwardsSurfaceLine surfaceLine, Point3D point)
{
@@ -332,7 +333,7 @@
/// The to set the
/// for.
/// The point at which to set the .
- /// Thrown when is null or
+ /// Thrown when is null or
/// not on the .
private static void TrySetDikeToeAtRiver(this MacroStabilityInwardsSurfaceLine surfaceLine, Point3D point)
{
@@ -357,7 +358,7 @@
/// The to set the
/// for.
/// The point at which to set the .
- /// Thrown when is null or
+ /// Thrown when is null or
/// not on the .
private static void TrySetDikeToeAtPolder(this MacroStabilityInwardsSurfaceLine surfaceLine, Point3D point)
{
@@ -387,10 +388,10 @@
return string.Format(MacroStabilityInwardsIOResources.MacroStabilityInwardsSurfaceLineTransformer_CharacteristicPoint_0_is_undefined, surfaceLineName);
}
- private static SurfaceLineTransformException CreateMandatoryCharacteristicPointException(string exceptionMessage, string surfaceLineName)
+ private static ImportedDataTransformException CreateMandatoryCharacteristicPointException(string exceptionMessage, string surfaceLineName)
{
string message = string.Format(MacroStabilityInwardsIOResources.SurfaceLinesCsvImporter_SurfaceLine_0_skipped_cause_1_CharacteristicPoint_mandatory, surfaceLineName, exceptionMessage);
- return new SurfaceLineTransformException(message);
+ return new ImportedDataTransformException(message);
}
}
}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Importers/MacroStabilityInwardsSurfaceLineExtensionsTest.cs
===================================================================
diff -u -rcd90ebf744fb74f0d4b0dd6ee06f9c39b5faf213 -r76d5d269e367c6c3a98802b92d689cebd506a2f2
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Importers/MacroStabilityInwardsSurfaceLineExtensionsTest.cs (.../MacroStabilityInwardsSurfaceLineExtensionsTest.cs) (revision cd90ebf744fb74f0d4b0dd6ee06f9c39b5faf213)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Importers/MacroStabilityInwardsSurfaceLineExtensionsTest.cs (.../MacroStabilityInwardsSurfaceLineExtensionsTest.cs) (revision 76d5d269e367c6c3a98802b92d689cebd506a2f2)
@@ -24,6 +24,7 @@
using System.Linq;
using Core.Common.Base.Geometry;
using NUnit.Framework;
+using Ringtoets.Common.IO.Exceptions;
using Ringtoets.Common.IO.SurfaceLines;
using Ringtoets.MacroStabilityInwards.IO.Importers;
using Ringtoets.MacroStabilityInwards.Primitives;
@@ -190,7 +191,7 @@
TestDelegate test = () => surfaceLine.SetCharacteristicPoints(null);
// Assert
- var exception = Assert.Throws(test);
+ var exception = Assert.Throws(test);
Assert.AreEqual($"Karakteristieke punten definitie voor profielschematisatie '{name}' is verplicht.", exception.Message);
}
@@ -236,7 +237,7 @@
TestDelegate test = () => surfaceLine.SetCharacteristicPoints(points);
// Assert
- var exception = Assert.Throws(test);
+ var exception = Assert.Throws(test);
string message = $"Profielschematisatie '{points.Name}' kan niet gebruikt worden. Karakteristiek punt \'{pointDescription}\' is niet gedefiniëerd. Dit karakteristieke punt is verplicht.";
Assert.AreEqual(message, exception.Message);
}
@@ -262,7 +263,7 @@
TestDelegate test = () => surfaceLine.SetCharacteristicPoints(points);
// Assert
- var exception = Assert.Throws(test);
+ var exception = Assert.Throws(test);
string message = $"Profielschematisatie '{points.Name}' kan niet gebruikt worden. " +
$"De geometrie bevat geen punt op locatie {changedPoint} om als \'{pointDescription}\' in te stellen. " +
"Dit karakteristieke punt is verplicht.";
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Importers/MacrostabilityInwardsSurfaceLineTransformerTest.cs
===================================================================
diff -u -rcd90ebf744fb74f0d4b0dd6ee06f9c39b5faf213 -r76d5d269e367c6c3a98802b92d689cebd506a2f2
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Importers/MacrostabilityInwardsSurfaceLineTransformerTest.cs (.../MacrostabilityInwardsSurfaceLineTransformerTest.cs) (revision cd90ebf744fb74f0d4b0dd6ee06f9c39b5faf213)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Importers/MacrostabilityInwardsSurfaceLineTransformerTest.cs (.../MacrostabilityInwardsSurfaceLineTransformerTest.cs) (revision 76d5d269e367c6c3a98802b92d689cebd506a2f2)
@@ -27,6 +27,7 @@
using Core.Common.TestUtil;
using NUnit.Framework;
using Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.IO.Exceptions;
using Ringtoets.Common.IO.SurfaceLines;
using Ringtoets.MacroStabilityInwards.IO.Importers;
using Ringtoets.MacroStabilityInwards.Primitives;
@@ -152,7 +153,7 @@
// Assert
string message = $"Profielschematisatie {surfaceLineName} doorkruist de huidige referentielijn niet of op meer dan één punt en kan niet worden geïmporteerd. Dit kan komen doordat de profielschematisatie een lokaal coördinaatsysteem heeft.";
- var exception = Assert.Throws(test);
+ var exception = Assert.Throws(test);
Assert.AreEqual(message, exception.Message);
}
@@ -185,7 +186,7 @@
// Assert
string message = $"Profielschematisatie {surfaceLineName} doorkruist de huidige referentielijn niet of op meer dan één punt en kan niet worden geïmporteerd.";
- var exception = Assert.Throws(test);
+ var exception = Assert.Throws(test);
Assert.AreEqual(message, exception.Message);
}
@@ -229,7 +230,7 @@
// Assert
string message = $"Karakteristieke punten definitie voor profielschematisatie '{locationName}' is verplicht.";
- var exception = Assert.Throws(test);
+ var exception = Assert.Throws(test);
Assert.AreEqual(message, exception.Message);
Assert.IsNull(result);
}
@@ -379,7 +380,7 @@
TestDelegate test = () => transformer.Transform(surfaceLine, characteristicPoints);
// Assert
- var exception = Assert.Throws(test);
+ var exception = Assert.Throws(test);
string message = $"Profielschematisatie '{locationName}' kan niet gebruikt worden. " +
$"De geometrie bevat geen punt op locatie {notOnSurfaceLinePoint} om als \'{changedCharacteristicPointName}\' in te stellen. " +
"Dit karakteristieke punt is verplicht.";
Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/Importers/PipingSurfaceLineExtensions.cs
===================================================================
diff -u -rd6fe8399e8398224cf1bda9259052232d85b85a4 -r76d5d269e367c6c3a98802b92d689cebd506a2f2
--- Ringtoets/Piping/src/Ringtoets.Piping.IO/Importers/PipingSurfaceLineExtensions.cs (.../PipingSurfaceLineExtensions.cs) (revision d6fe8399e8398224cf1bda9259052232d85b85a4)
+++ Ringtoets/Piping/src/Ringtoets.Piping.IO/Importers/PipingSurfaceLineExtensions.cs (.../PipingSurfaceLineExtensions.cs) (revision 76d5d269e367c6c3a98802b92d689cebd506a2f2)
@@ -22,6 +22,7 @@
using System;
using Core.Common.Base.Geometry;
using log4net;
+using Ringtoets.Common.IO.Exceptions;
using Ringtoets.Common.IO.Properties;
using Ringtoets.Common.IO.SurfaceLines;
using Ringtoets.Piping.Primitives;
@@ -42,7 +43,7 @@
/// The surface line to set the characteristic points for.
/// The characteristic points to set, if the collection is valid.
/// Thrown when is null.
- /// Thrown when defines
+ /// Thrown when defines
/// a dike toe at polder side in front of the dike toe at river side.
public static void SetCharacteristicPoints(this PipingSurfaceLine surfaceLine, CharacteristicPoints characteristicPoints)
{
@@ -209,7 +210,7 @@
///
/// The surface line.
/// The characteristic points (possibly) containing the dike toes.
- /// Thrown when the dike toes are not in the right order.
+ /// Thrown when the dike toes are not in the right order.
private static void ValidateDikeToesInOrder(this PipingSurfaceLine surfaceLine, CharacteristicPoints characteristicPoints)
{
if (characteristicPoints.DikeToeAtRiver != null && characteristicPoints.DikeToeAtPolder != null)
@@ -220,7 +221,7 @@
if (localDikeToeAtPolder.X <= localDikeToeAtRiver.X)
{
string message = string.Format(Resources.SurfaceLinesCsvImporter_CheckCharacteristicPoints_EntryPointL_greater_or_equal_to_ExitPointL_for_0_, characteristicPoints.Name);
- throw new SurfaceLineTransformException(message);
+ throw new ImportedDataTransformException(message);
}
}
}
Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/Importers/PipingSurfaceLineExtensionsTest.cs
===================================================================
diff -u -rd6fe8399e8398224cf1bda9259052232d85b85a4 -r76d5d269e367c6c3a98802b92d689cebd506a2f2
--- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/Importers/PipingSurfaceLineExtensionsTest.cs (.../PipingSurfaceLineExtensionsTest.cs) (revision d6fe8399e8398224cf1bda9259052232d85b85a4)
+++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/Importers/PipingSurfaceLineExtensionsTest.cs (.../PipingSurfaceLineExtensionsTest.cs) (revision 76d5d269e367c6c3a98802b92d689cebd506a2f2)
@@ -24,6 +24,7 @@
using System.Linq;
using Core.Common.Base.Geometry;
using NUnit.Framework;
+using Ringtoets.Common.IO.Exceptions;
using Ringtoets.Common.IO.SurfaceLines;
using Ringtoets.Piping.IO.Importers;
using Ringtoets.Piping.Primitives;
@@ -176,7 +177,7 @@
TestDelegate test = () => surfaceLine.SetCharacteristicPoints(points);
// Assert
- var exception = Assert.Throws(test);
+ var exception = Assert.Throws(test);
Assert.AreEqual($"Het uittredepunt moet landwaarts van het intredepunt liggen voor locatie '{name}'.", exception.Message);
}
Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/Importers/PipingSurfaceLineTransformerTest.cs
===================================================================
diff -u -rd6fe8399e8398224cf1bda9259052232d85b85a4 -r76d5d269e367c6c3a98802b92d689cebd506a2f2
--- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/Importers/PipingSurfaceLineTransformerTest.cs (.../PipingSurfaceLineTransformerTest.cs) (revision d6fe8399e8398224cf1bda9259052232d85b85a4)
+++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/Importers/PipingSurfaceLineTransformerTest.cs (.../PipingSurfaceLineTransformerTest.cs) (revision 76d5d269e367c6c3a98802b92d689cebd506a2f2)
@@ -27,6 +27,7 @@
using Core.Common.TestUtil;
using NUnit.Framework;
using Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.IO.Exceptions;
using Ringtoets.Common.IO.SurfaceLines;
using Ringtoets.Piping.IO.Importers;
using Ringtoets.Piping.Primitives;
@@ -110,7 +111,7 @@
// Assert
string message = $"Profielschematisatie {surfaceLineName} doorkruist de huidige referentielijn niet of op meer dan één punt en kan niet worden geïmporteerd. Dit kan komen doordat de profielschematisatie een lokaal coördinaatsysteem heeft.";
- var exception = Assert.Throws(test);
+ var exception = Assert.Throws(test);
Assert.AreEqual(message, exception.Message);
}
@@ -143,7 +144,7 @@
// Assert
string message = $"Profielschematisatie {surfaceLineName} doorkruist de huidige referentielijn niet of op meer dan één punt en kan niet worden geïmporteerd.";
- var exception = Assert.Throws(test);
+ var exception = Assert.Throws(test);
Assert.AreEqual(message, exception.Message);
}
@@ -222,7 +223,7 @@
// Assert
string message = $"Het uittredepunt moet landwaarts van het intredepunt liggen voor locatie '{locationName}'.";
- var exception = Assert.Throws(test);
+ var exception = Assert.Throws(test);
Assert.AreEqual(message, exception.Message);
}