Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/ProjectCreateExtensions.cs =================================================================== diff -u -r1eed3e3f652618c52a462edc502cfd4250772314 -r1c18575a6c396cd3c2d9d6079e4ed593871fc5f4 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/ProjectCreateExtensions.cs (.../ProjectCreateExtensions.cs) (revision 1eed3e3f652618c52a462edc502cfd4250772314) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/ProjectCreateExtensions.cs (.../ProjectCreateExtensions.cs) (revision 1c18575a6c396cd3c2d9d6079e4ed593871fc5f4) @@ -21,7 +21,6 @@ using System; using Application.Ringtoets.Storage.DbContext; -using Core.Common.Base.Data; using Ringtoets.Integration.Data; namespace Application.Ringtoets.Storage.Create Index: Application/Ringtoets/src/Application.Ringtoets.Storage/StorageSqLite.cs =================================================================== diff -u -r1eed3e3f652618c52a462edc502cfd4250772314 -r1c18575a6c396cd3c2d9d6079e4ed593871fc5f4 --- Application/Ringtoets/src/Application.Ringtoets.Storage/StorageSqLite.cs (.../StorageSqLite.cs) (revision 1eed3e3f652618c52a462edc502cfd4250772314) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/StorageSqLite.cs (.../StorageSqLite.cs) (revision 1c18575a6c396cd3c2d9d6079e4ed593871fc5f4) @@ -191,6 +191,11 @@ return true; } + if (!(project is RingtoetsProject)) + { + throw new ArgumentNullException("project"); + } + using (var dbContext = new RingtoetsEntities(connectionString)) { try Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/StorageSqLiteTest.cs =================================================================== diff -u -r1eed3e3f652618c52a462edc502cfd4250772314 -r1c18575a6c396cd3c2d9d6079e4ed593871fc5f4 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/StorageSqLiteTest.cs (.../StorageSqLiteTest.cs) (revision 1eed3e3f652618c52a462edc502cfd4250772314) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/StorageSqLiteTest.cs (.../StorageSqLiteTest.cs) (revision 1c18575a6c396cd3c2d9d6079e4ed593871fc5f4) @@ -504,6 +504,32 @@ } [Test] + public void HasChanges_ValidProjectLoadedParamIsNull_ThrowsArgumentNullException() + { + // Setup + StorageSqLite storageSqLite = new StorageSqLite(); + + FileDisposeHelper fileDisposeHelper = new FileDisposeHelper(tempRingtoetsFile); + try + { + SqLiteDatabaseHelper.CreateValidRingtoetsDatabase(tempRingtoetsFile, new RingtoetsProject()); + storageSqLite.LoadProject(tempRingtoetsFile); + + // Call + TestDelegate call = () => storageSqLite.HasChanges(null); + + // Assert + var paramName = Assert.Throws(call).ParamName; + Assert.AreEqual("project", paramName); + } + finally + { + CallGarbageCollector(); + fileDisposeHelper.Dispose(); + } + } + + [Test] public void HasChanges_NoConnectionSet_ReturnsTrue() { // Setup