Index: Core/Gui/test/Core.Gui.Test/PresentationObjects/Map/FeatureBasedMapDataContextTest.cs =================================================================== diff -u --- Core/Gui/test/Core.Gui.Test/PresentationObjects/Map/FeatureBasedMapDataContextTest.cs (revision 0) +++ Core/Gui/test/Core.Gui.Test/PresentationObjects/Map/FeatureBasedMapDataContextTest.cs (revision 5b8dd7233729cac91201f3b78ba11fae604b5efa) @@ -0,0 +1,63 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser 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 Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser 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 Core.Components.Gis.Data; +using Core.Components.Gis.TestUtil; +using Core.Gui.PresentationObjects.Map; +using NUnit.Framework; + +namespace Core.Gui.Test.PresentationObjects.Map +{ + [TestFixture] + public class FeatureBasedMapDataContextTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Setup + FeatureBasedMapData data = new TestFeatureBasedMapData(); + var collection = new MapDataCollection("test"); + collection.Add(data); + + var collectionContext = new MapDataCollectionContext(collection, null); + + // Call + var context = new FeatureBasedMapDataContext(data, collectionContext); + + // Assert + Assert.IsInstanceOf(context); + Assert.AreSame(data, context.WrappedData); + Assert.AreSame(collectionContext, context.ParentMapData); + } + + [Test] + public void Constructor_ParentMapDataNull_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => new FeatureBasedMapDataContext(new TestFeatureBasedMapData(), null); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("parentMapData", exception.ParamName); + } + } +} \ No newline at end of file Index: Core/Gui/test/Core.Gui.Test/PresentationObjects/Map/MapDataCollectionContextTest.cs =================================================================== diff -u --- Core/Gui/test/Core.Gui.Test/PresentationObjects/Map/MapDataCollectionContextTest.cs (revision 0) +++ Core/Gui/test/Core.Gui.Test/PresentationObjects/Map/MapDataCollectionContextTest.cs (revision 5b8dd7233729cac91201f3b78ba11fae604b5efa) @@ -0,0 +1,47 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser 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 Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser 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 Core.Components.Gis.Data; +using Core.Gui.PresentationObjects.Map; +using NUnit.Framework; + +namespace Core.Gui.Test.PresentationObjects.Map +{ + [TestFixture] + public class MapDataCollectionContextTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Setup + var collection = new MapDataCollection("test"); + var parentCollectionContext = new MapDataCollectionContext(new MapDataCollection("test"), null); + + // Call + var context = new MapDataCollectionContext(collection, parentCollectionContext); + + // Assert + Assert.IsInstanceOf(context); + Assert.AreSame(collection, context.WrappedData); + Assert.AreSame(parentCollectionContext, context.ParentMapData); + } + } +} \ No newline at end of file Index: Core/Gui/test/Core.Gui.Test/PresentationObjects/Map/MapDataContextTest.cs =================================================================== diff -u --- Core/Gui/test/Core.Gui.Test/PresentationObjects/Map/MapDataContextTest.cs (revision 0) +++ Core/Gui/test/Core.Gui.Test/PresentationObjects/Map/MapDataContextTest.cs (revision 5b8dd7233729cac91201f3b78ba11fae604b5efa) @@ -0,0 +1,55 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser 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 Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser 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 Core.Common.Controls.PresentationObjects; +using Core.Components.Gis.Data; +using Core.Components.Gis.TestUtil; +using Core.Gui.PresentationObjects.Map; +using NUnit.Framework; + +namespace Core.Gui.Test.PresentationObjects.Map +{ + [TestFixture] + public class MapDataContextTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Setup + MapData data = new TestMapData(); + + // Call + var context = new TestMapDataContext(data); + + // Assert + Assert.IsInstanceOf>(context); + Assert.AreSame(data, context.WrappedData); + } + + private class TestMapDataContext : MapDataContext + { + public TestMapDataContext(MapData wrappedData) + : base(wrappedData) {} + + public override MapDataCollectionContext ParentMapData { get; } + } + } +} \ No newline at end of file Index: Core/Gui/test/Core.Gui.Test/PresentationObjects/Map/MapLineDataContextTest.cs =================================================================== diff -u --- Core/Gui/test/Core.Gui.Test/PresentationObjects/Map/MapLineDataContextTest.cs (revision 0) +++ Core/Gui/test/Core.Gui.Test/PresentationObjects/Map/MapLineDataContextTest.cs (revision 5b8dd7233729cac91201f3b78ba11fae604b5efa) @@ -0,0 +1,47 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser 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 Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser 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 Core.Components.Gis.Data; +using Core.Gui.PresentationObjects.Map; +using NUnit.Framework; + +namespace Core.Gui.Test.PresentationObjects.Map +{ + [TestFixture] + public class MapLineDataContextTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Setup + var data = new MapLineData("test"); + var parent = new MapDataCollectionContext(new MapDataCollection("parent"), null); + + // Call + var context = new MapLineDataContext(data, parent); + + // Assert + Assert.IsInstanceOf(context); + Assert.AreSame(data, context.WrappedData); + Assert.AreSame(parent, context.ParentMapData); + } + } +} \ No newline at end of file Index: Core/Gui/test/Core.Gui.Test/PresentationObjects/Map/MapPointDataContextTest.cs =================================================================== diff -u --- Core/Gui/test/Core.Gui.Test/PresentationObjects/Map/MapPointDataContextTest.cs (revision 0) +++ Core/Gui/test/Core.Gui.Test/PresentationObjects/Map/MapPointDataContextTest.cs (revision 5b8dd7233729cac91201f3b78ba11fae604b5efa) @@ -0,0 +1,47 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser 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 Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser 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 Core.Components.Gis.Data; +using Core.Gui.PresentationObjects.Map; +using NUnit.Framework; + +namespace Core.Gui.Test.PresentationObjects.Map +{ + [TestFixture] + public class MapPointDataContextTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Setup + var data = new MapPointData("test"); + var parent = new MapDataCollectionContext(new MapDataCollection("parent"), null); + + // Call + var context = new MapPointDataContext(data, parent); + + // Assert + Assert.IsInstanceOf(context); + Assert.AreSame(data, context.WrappedData); + Assert.AreSame(parent, context.ParentMapData); + } + } +} \ No newline at end of file Index: Core/Gui/test/Core.Gui.Test/PresentationObjects/Map/MapPolygonDataContextTest.cs =================================================================== diff -u --- Core/Gui/test/Core.Gui.Test/PresentationObjects/Map/MapPolygonDataContextTest.cs (revision 0) +++ Core/Gui/test/Core.Gui.Test/PresentationObjects/Map/MapPolygonDataContextTest.cs (revision 5b8dd7233729cac91201f3b78ba11fae604b5efa) @@ -0,0 +1,47 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser 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 Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser 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 Core.Components.Gis.Data; +using Core.Gui.PresentationObjects.Map; +using NUnit.Framework; + +namespace Core.Gui.Test.PresentationObjects.Map +{ + [TestFixture] + public class MapPolygonDataContextTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Setup + var data = new MapPolygonData("test"); + var parent = new MapDataCollectionContext(new MapDataCollection("parent"), null); + + // Call + var context = new MapPolygonDataContext(data, parent); + + // Assert + Assert.IsInstanceOf(context); + Assert.AreSame(data, context.WrappedData); + Assert.AreSame(parent, context.ParentMapData); + } + } +} \ No newline at end of file Index: Core/Plugins/test/Core.Plugins.Map.Test/Core.Plugins.Map.Test.csproj =================================================================== diff -u -rf0f17d026a0647b413041c182da7dc2f1d001c18 -r5b8dd7233729cac91201f3b78ba11fae604b5efa --- Core/Plugins/test/Core.Plugins.Map.Test/Core.Plugins.Map.Test.csproj (.../Core.Plugins.Map.Test.csproj) (revision f0f17d026a0647b413041c182da7dc2f1d001c18) +++ Core/Plugins/test/Core.Plugins.Map.Test/Core.Plugins.Map.Test.csproj (.../Core.Plugins.Map.Test.csproj) (revision 5b8dd7233729cac91201f3b78ba11fae604b5efa) @@ -59,6 +59,7 @@ + Fisheye: Tag 5b8dd7233729cac91201f3b78ba11fae604b5efa refers to a dead (removed) revision in file `Core/Plugins/test/Core.Plugins.Map.Test/PresentationObjects/FeatureBasedMapDataContextTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5b8dd7233729cac91201f3b78ba11fae604b5efa refers to a dead (removed) revision in file `Core/Plugins/test/Core.Plugins.Map.Test/PresentationObjects/MapDataCollectionContextTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5b8dd7233729cac91201f3b78ba11fae604b5efa refers to a dead (removed) revision in file `Core/Plugins/test/Core.Plugins.Map.Test/PresentationObjects/MapDataContextTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5b8dd7233729cac91201f3b78ba11fae604b5efa refers to a dead (removed) revision in file `Core/Plugins/test/Core.Plugins.Map.Test/PresentationObjects/MapLineDataContextTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5b8dd7233729cac91201f3b78ba11fae604b5efa refers to a dead (removed) revision in file `Core/Plugins/test/Core.Plugins.Map.Test/PresentationObjects/MapPointDataContextTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5b8dd7233729cac91201f3b78ba11fae604b5efa refers to a dead (removed) revision in file `Core/Plugins/test/Core.Plugins.Map.Test/PresentationObjects/MapPolygonDataContextTest.cs'. Fisheye: No comparison available. Pass `N' to diff?