Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/Piping/PipingSectionResultEntityReadExtensions.cs
===================================================================
diff -u -rc0e8cafbdda9c9f6384005f573d885c0537e0b39 -re5cba69dfe6b2722f689752dc905f3372eb62472
--- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/Piping/PipingSectionResultEntityReadExtensions.cs (.../PipingSectionResultEntityReadExtensions.cs) (revision c0e8cafbdda9c9f6384005f573d885c0537e0b39)
+++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/Piping/PipingSectionResultEntityReadExtensions.cs (.../PipingSectionResultEntityReadExtensions.cs) (revision e5cba69dfe6b2722f689752dc905f3372eb62472)
@@ -39,9 +39,14 @@
/// The to update
/// the .
/// The target of the read operation.
- /// Thrown when is null.
+ /// Thrown when any parameter is null.
internal static void Read(this PipingSectionResultEntity entity, PipingFailureMechanismSectionResult sectionResult)
{
+ if (entity == null)
+ {
+ throw new ArgumentNullException(nameof(entity));
+ }
+
if (sectionResult == null)
{
throw new ArgumentNullException(nameof(sectionResult));
Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ClosingStructures/ClosingStructuresSectionResultEntityReadExtensionsTest.cs
===================================================================
diff -u -r4823d81e68837eec1ebb52616ae21982462fe6ab -re5cba69dfe6b2722f689752dc905f3372eb62472
--- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ClosingStructures/ClosingStructuresSectionResultEntityReadExtensionsTest.cs (.../ClosingStructuresSectionResultEntityReadExtensionsTest.cs) (revision 4823d81e68837eec1ebb52616ae21982462fe6ab)
+++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ClosingStructures/ClosingStructuresSectionResultEntityReadExtensionsTest.cs (.../ClosingStructuresSectionResultEntityReadExtensionsTest.cs) (revision e5cba69dfe6b2722f689752dc905f3372eb62472)
@@ -49,7 +49,7 @@
}
[Test]
- public void Read_SectionResultIsNull_ThrowArgumentNullException()
+ public void Read_SectionResultNull_ThrowsArgumentNullException()
{
// Setup
var entity = new ClosingStructuresSectionResultEntity();
@@ -63,7 +63,7 @@
}
[Test]
- public void Read_CollectorIsNull_ThrowArgumentNullException()
+ public void Read_CollectorNull_ThrowsArgumentNullException()
{
// Setup
var entity = new ClosingStructuresSectionResultEntity();
Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverErosionInwards/GrassCoverErosionInwardsSectionResultEntityReadExtensionsTest.cs
===================================================================
diff -u -r58d429ac22e6e6cb36de3b1d3b18c63500675049 -re5cba69dfe6b2722f689752dc905f3372eb62472
--- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverErosionInwards/GrassCoverErosionInwardsSectionResultEntityReadExtensionsTest.cs (.../GrassCoverErosionInwardsSectionResultEntityReadExtensionsTest.cs) (revision 58d429ac22e6e6cb36de3b1d3b18c63500675049)
+++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverErosionInwards/GrassCoverErosionInwardsSectionResultEntityReadExtensionsTest.cs (.../GrassCoverErosionInwardsSectionResultEntityReadExtensionsTest.cs) (revision e5cba69dfe6b2722f689752dc905f3372eb62472)
@@ -48,7 +48,7 @@
}
[Test]
- public void Read_SectionResultIsNull_ThrowArgumentNullException()
+ public void Read_SectionResultNull_ThrowsArgumentNullException()
{
// Setup
var entity = new GrassCoverErosionInwardsSectionResultEntity();
@@ -62,7 +62,7 @@
}
[Test]
- public void Read_CollectorIsNull_ThrowArgumentNullException()
+ public void Read_CollectorNull_ThrowsArgumentNullException()
{
// Setup
var entity = new GrassCoverErosionInwardsSectionResultEntity();
Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/HeightStructures/HeightStructuresSectionResultEntityReadExtensionsTest.cs
===================================================================
diff -u -rec07f12a0ae3eebbdc56101ce6e5b0755672c5b8 -re5cba69dfe6b2722f689752dc905f3372eb62472
--- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/HeightStructures/HeightStructuresSectionResultEntityReadExtensionsTest.cs (.../HeightStructuresSectionResultEntityReadExtensionsTest.cs) (revision ec07f12a0ae3eebbdc56101ce6e5b0755672c5b8)
+++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/HeightStructures/HeightStructuresSectionResultEntityReadExtensionsTest.cs (.../HeightStructuresSectionResultEntityReadExtensionsTest.cs) (revision e5cba69dfe6b2722f689752dc905f3372eb62472)
@@ -49,7 +49,7 @@
}
[Test]
- public void Read_SectionResultIsNull_ThrowArgumentNullException()
+ public void Read_SectionResultNull_ThrowsArgumentNullException()
{
// Setup
var entity = new HeightStructuresSectionResultEntity();
@@ -63,7 +63,7 @@
}
[Test]
- public void Read_CollectorIsNull_ThrowArgumentNullException()
+ public void Read_CollectorNull_ThrowsArgumentNullException()
{
// Setup
var entity = new HeightStructuresSectionResultEntity();
Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacroStabilityInwards/MacroStabilityInwardsSectionResultEntityReadExtensionsTest.cs
===================================================================
diff -u -rc0e8cafbdda9c9f6384005f573d885c0537e0b39 -re5cba69dfe6b2722f689752dc905f3372eb62472
--- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacroStabilityInwards/MacroStabilityInwardsSectionResultEntityReadExtensionsTest.cs (.../MacroStabilityInwardsSectionResultEntityReadExtensionsTest.cs) (revision c0e8cafbdda9c9f6384005f573d885c0537e0b39)
+++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacroStabilityInwards/MacroStabilityInwardsSectionResultEntityReadExtensionsTest.cs (.../MacroStabilityInwardsSectionResultEntityReadExtensionsTest.cs) (revision e5cba69dfe6b2722f689752dc905f3372eb62472)
@@ -48,7 +48,7 @@
}
[Test]
- public void Read_SectionResultIsNull_ThrowArgumentNullException()
+ public void Read_SectionResultNull_ThrowsArgumentNullException()
{
// Setup
var entity = new MacroStabilityInwardsSectionResultEntity();
Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/Piping/PipingSectionResultEntityReadExtensionsTest.cs
===================================================================
diff -u -rc0e8cafbdda9c9f6384005f573d885c0537e0b39 -re5cba69dfe6b2722f689752dc905f3372eb62472
--- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/Piping/PipingSectionResultEntityReadExtensionsTest.cs (.../PipingSectionResultEntityReadExtensionsTest.cs) (revision c0e8cafbdda9c9f6384005f573d885c0537e0b39)
+++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/Piping/PipingSectionResultEntityReadExtensionsTest.cs (.../PipingSectionResultEntityReadExtensionsTest.cs) (revision e5cba69dfe6b2722f689752dc905f3372eb62472)
@@ -34,8 +34,20 @@
public class PipingSectionResultEntityReadExtensionsTest
{
[Test]
- public void Read_SectionResultIsNull_ThrowArgumentNullException()
+ public void Read_EntityNull_ThrowsArgumentNullException()
{
+ // Call
+ TestDelegate call = () => ((PipingSectionResultEntity) null).Read(
+ new PipingFailureMechanismSectionResult(new TestFailureMechanismSection()));
+
+ // Assert
+ var exception = Assert.Throws(call);
+ Assert.AreEqual("entity", exception.ParamName);
+ }
+
+ [Test]
+ public void Read_SectionResultNull_ThrowsArgumentNullException()
+ {
// Setup
var entity = new PipingSectionResultEntity();
Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityPointStructures/StabilityPointStructuresSectionResultEntityReadExtensionsTest.cs
===================================================================
diff -u -ra72851067e1c8bfd2022b9bbeb805fc147a0ada9 -re5cba69dfe6b2722f689752dc905f3372eb62472
--- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityPointStructures/StabilityPointStructuresSectionResultEntityReadExtensionsTest.cs (.../StabilityPointStructuresSectionResultEntityReadExtensionsTest.cs) (revision a72851067e1c8bfd2022b9bbeb805fc147a0ada9)
+++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityPointStructures/StabilityPointStructuresSectionResultEntityReadExtensionsTest.cs (.../StabilityPointStructuresSectionResultEntityReadExtensionsTest.cs) (revision e5cba69dfe6b2722f689752dc905f3372eb62472)
@@ -49,7 +49,7 @@
}
[Test]
- public void Read_SectionResultIsNull_ThrowArgumentNullException()
+ public void Read_SectionResultNull_ThrowsArgumentNullException()
{
// Setup
var entity = new StabilityPointStructuresSectionResultEntity();
@@ -63,7 +63,7 @@
}
[Test]
- public void Read_CollectorIsNull_ThrowArgumentNullException()
+ public void Read_CollectorNull_ThrowsArgumentNullException()
{
// Setup
var entity = new StabilityPointStructuresSectionResultEntity();