Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/DbTestSet.cs =================================================================== diff -u -ra6371ac68897b69e2efd537fa29bb6564f50fdcf -r5b63cfab474523f97be999403eb4906a0c376a3d --- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/DbTestSet.cs (.../DbTestSet.cs) (revision a6371ac68897b69e2efd537fa29bb6564f50fdcf) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/DbTestSet.cs (.../DbTestSet.cs) (revision 5b63cfab474523f97be999403eb4906a0c376a3d) @@ -1,3 +1,24 @@ +// Copyright (C) Stichting Deltares 2016. 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.Collections; using System.Collections.Generic; @@ -14,9 +35,9 @@ { return new TestDbSet(data); } - } - public class TestDbSet : DbSet, IDbSet where T: class + + public class TestDbSet : DbSet, IDbSet where T : class { private readonly IQueryable queryable; private readonly ObservableCollection collection; @@ -59,6 +80,15 @@ } } + public override IEnumerable RemoveRange(IEnumerable entities) + { + foreach (var e in entities) + { + collection.Remove(e); + } + return entities; + } + public override T Add(T entity) { collection.Add(entity); @@ -71,15 +101,6 @@ return entity; } - public override IEnumerable RemoveRange(IEnumerable entities) - { - foreach(var e in entities) - { - collection.Remove(e); - } - return entities; - } - IEnumerator IEnumerable.GetEnumerator() { return collection.GetEnumerator();