Index: Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/SerializableAssembly.cs
===================================================================
diff -u -rf610fd08d6d26cb5fc5db3da3c7267e66cf208b9 -ra30b67748bed77736f62b6b3c30c82649bb9cf4e
--- Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/SerializableAssembly.cs (.../SerializableAssembly.cs) (revision f610fd08d6d26cb5fc5db3da3c7267e66cf208b9)
+++ Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.IO/Model/SerializableAssembly.cs (.../SerializableAssembly.cs) (revision a30b67748bed77736f62b6b3c30c82649bb9cf4e)
@@ -58,7 +58,8 @@
/// belong to the assembly.
/// The collection of that
/// belong to the assembly.
- /// Thrown when any parameter is null.
+ /// Thrown when is null or empty.
+ /// Thrown when any parameter except is null.
public SerializableAssembly(string id,
Point2D lowerCorner,
Point2D upperCorner,
@@ -71,9 +72,9 @@
IEnumerable failureMechanismSectionCollections,
IEnumerable failureMechanismSections)
{
- if (id == null)
+ if (string.IsNullOrEmpty(id))
{
- throw new ArgumentNullException(nameof(id));
+ throw new ArgumentException($@"'{nameof(id)}' must have a value.");
}
if (lowerCorner == null)