Index: Ringtoets/Common/src/Ringtoets.Common.IO/ReferenceLines/ReferenceLineImporter.cs =================================================================== diff -u -r75b7759b5721edc5e0458229e2d727723f527391 -r9fe132b5fdbde6b462235fccc39bccd521093a4f --- Ringtoets/Common/src/Ringtoets.Common.IO/ReferenceLines/ReferenceLineImporter.cs (.../ReferenceLineImporter.cs) (revision 75b7759b5721edc5e0458229e2d727723f527391) +++ Ringtoets/Common/src/Ringtoets.Common.IO/ReferenceLines/ReferenceLineImporter.cs (.../ReferenceLineImporter.cs) (revision 9fe132b5fdbde6b462235fccc39bccd521093a4f) @@ -45,13 +45,17 @@ /// The object responsible for updating the /// . /// The path to the file to import from. - /// Thrown when - /// or is null. + /// Thrown when any parameter is null. public ReferenceLineImporter(ReferenceLine importTarget, IReferenceLineUpdateHandler updateHandler, string filePath) : base(filePath, importTarget) { + if (updateHandler == null) + { + throw new ArgumentNullException(nameof(updateHandler)); + } + this.updateHandler = updateHandler; } Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/ReferenceLines/ReferenceLineImporterTest.cs =================================================================== diff -u -rd7ec57b0867842019cbd48a736db96e2509ed0f4 -r9fe132b5fdbde6b462235fccc39bccd521093a4f --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/ReferenceLines/ReferenceLineImporterTest.cs (.../ReferenceLineImporterTest.cs) (revision d7ec57b0867842019cbd48a736db96e2509ed0f4) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/ReferenceLines/ReferenceLineImporterTest.cs (.../ReferenceLineImporterTest.cs) (revision 9fe132b5fdbde6b462235fccc39bccd521093a4f) @@ -54,6 +54,17 @@ } [Test] + public void Constructor_UpdateHandlerNull_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => new ReferenceLineImporter(new ReferenceLine(), null, ""); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("updateHandler", exception.ParamName); + } + + [Test] public void Constructor_ExpectedValues() { // Setup @@ -438,7 +449,6 @@ observable2.Expect(o => o.NotifyObservers()); var handler = mocks.Stub(); - handler.Stub(h => h.ConfirmUpdate()).Return(true); handler.Expect(h => h.Update(Arg.Is.Same(referenceLine), Arg.Is.NotNull)) .Return(new[]