Fisheye: Tag f2504e0b8efa6ad3fb972647af872a1072ddc3c6 refers to a dead (removed) revision in file `Core/Components/src/Core.Components.DotSpatial/Categories/IMapCategory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Components/src/Core.Components.DotSpatial/Core.Components.DotSpatial.csproj
===================================================================
diff -u -r9431bd5ebc5c3447cbec70f3f9a62e3314c785a0 -rf2504e0b8efa6ad3fb972647af872a1072ddc3c6
--- Core/Components/src/Core.Components.DotSpatial/Core.Components.DotSpatial.csproj (.../Core.Components.DotSpatial.csproj) (revision 9431bd5ebc5c3447cbec70f3f9a62e3314c785a0)
+++ Core/Components/src/Core.Components.DotSpatial/Core.Components.DotSpatial.csproj (.../Core.Components.DotSpatial.csproj) (revision f2504e0b8efa6ad3fb972647af872a1072ddc3c6)
@@ -43,7 +43,6 @@
-
Index: Core/Components/src/Core.Components.Gis/Core.Components.Gis.csproj
===================================================================
diff -u -rac96d7c315129af851634ed5a4a6800b59ede718 -rf2504e0b8efa6ad3fb972647af872a1072ddc3c6
--- Core/Components/src/Core.Components.Gis/Core.Components.Gis.csproj (.../Core.Components.Gis.csproj) (revision ac96d7c315129af851634ed5a4a6800b59ede718)
+++ Core/Components/src/Core.Components.Gis/Core.Components.Gis.csproj (.../Core.Components.Gis.csproj) (revision f2504e0b8efa6ad3fb972647af872a1072ddc3c6)
@@ -12,6 +12,8 @@
+
+
@@ -71,4 +73,7 @@
Designer
+
+
+
\ No newline at end of file
Index: Core/Components/src/Core.Components.Gis/Data/Categories/IMapCategory.cs
===================================================================
diff -u
--- Core/Components/src/Core.Components.Gis/Data/Categories/IMapCategory.cs (revision 0)
+++ Core/Components/src/Core.Components.Gis/Data/Categories/IMapCategory.cs (revision f2504e0b8efa6ad3fb972647af872a1072ddc3c6)
@@ -0,0 +1,36 @@
+// Copyright (C) Stichting Deltares 2017. 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 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.Drawing;
+
+namespace Core.Components.Gis.Data.Categories
+{
+ ///
+ /// Interface for map categories.
+ ///
+ public interface IMapCategory
+ {
+ ///
+ /// The color of the map category.
+ ///
+ Color Color { get; }
+ }
+}
\ No newline at end of file
Index: Core/Components/src/Core.Components.Gis/Data/MapTheme.cs
===================================================================
diff -u
--- Core/Components/src/Core.Components.Gis/Data/MapTheme.cs (revision 0)
+++ Core/Components/src/Core.Components.Gis/Data/MapTheme.cs (revision f2504e0b8efa6ad3fb972647af872a1072ddc3c6)
@@ -0,0 +1,75 @@
+// Copyright (C) Stichting Deltares 2017. 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 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 System.Collections.Generic;
+using System.Linq;
+using Core.Components.Gis.Data.Categories;
+
+namespace Core.Components.Gis.Data
+{
+ ///
+ /// Class that contains the definition for a categorial theming of
+ /// map data objects.
+ ///
+ public class MapTheme
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The name of the attribute to which the theme is applicable for.
+ /// The map categories that are applicable for the theme.
+ /// Thrown when is null.
+ /// Thrown when:
+ ///
+ /// - is null, empty or consists of only whitespace.
+ /// - is empty.
+ ///
+ public MapTheme(string attributeName, IEnumerable mapCategories)
+ {
+ if (string.IsNullOrWhiteSpace(attributeName))
+ {
+ throw new ArgumentException(@"AttributeName is null, empty or consists of whitespace.", nameof(attributeName));
+ }
+ if (mapCategories == null)
+ {
+ throw new ArgumentNullException(nameof(mapCategories));
+ }
+ if (!mapCategories.Any())
+ {
+ throw new ArgumentException(@"MapCategories is empty.", nameof(mapCategories));
+ }
+
+ MapCategories = mapCategories;
+ AttributeName = attributeName;
+ }
+
+ ///
+ /// Gets the attribute to which the theme applies to.
+ ///
+ public string AttributeName { get; }
+
+ ///
+ /// Gets the categories that are applicable for the theme.
+ ///
+ public IEnumerable MapCategories { get; }
+ }
+}
\ No newline at end of file
Index: Core/Components/test/Core.Components.Gis.Test/Core.Components.Gis.Test.csproj
===================================================================
diff -u -rac96d7c315129af851634ed5a4a6800b59ede718 -rf2504e0b8efa6ad3fb972647af872a1072ddc3c6
--- Core/Components/test/Core.Components.Gis.Test/Core.Components.Gis.Test.csproj (.../Core.Components.Gis.Test.csproj) (revision ac96d7c315129af851634ed5a4a6800b59ede718)
+++ Core/Components/test/Core.Components.Gis.Test/Core.Components.Gis.Test.csproj (.../Core.Components.Gis.Test.csproj) (revision f2504e0b8efa6ad3fb972647af872a1072ddc3c6)
@@ -11,11 +11,15 @@
..\..\..\..\packages\NUnit.3.8.1\lib\net40\nunit.framework.dll
True
+
+ ..\..\..\..\packages\RhinoMocks.3.6.1\lib\net\Rhino.Mocks.dll
+
+
@@ -78,4 +82,5 @@
Core.Components.Gis.TestUtil
+
\ No newline at end of file
Index: Core/Components/test/Core.Components.Gis.Test/Data/MapThemeTest.cs
===================================================================
diff -u
--- Core/Components/test/Core.Components.Gis.Test/Data/MapThemeTest.cs (revision 0)
+++ Core/Components/test/Core.Components.Gis.Test/Data/MapThemeTest.cs (revision f2504e0b8efa6ad3fb972647af872a1072ddc3c6)
@@ -0,0 +1,107 @@
+// Copyright (C) Stichting Deltares 2017. 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 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 System.Collections.Generic;
+using System.Linq;
+using Core.Common.TestUtil;
+using Core.Components.Gis.Data;
+using Core.Components.Gis.Data.Categories;
+using NUnit.Framework;
+using Rhino.Mocks;
+
+namespace Core.Components.Gis.Test.Data
+{
+ [TestFixture]
+ public class MapThemeTest
+ {
+ [Test]
+ [TestCase(" ")]
+ [TestCase("")]
+ [TestCase(null)]
+ public void Constructor_InvalidAttribute_ThrowsArgumentException(string invalidAttributeName)
+ {
+ // Setup
+ var mocks = new MockRepository();
+ var mapCategory = mocks.Stub();
+ mocks.ReplayAll();
+
+ // Call
+ TestDelegate call = () => new MapTheme(invalidAttributeName, new []
+ {
+ mapCategory
+ });
+
+ // Assert
+ const string expectedMessage = "AttributeName is null, empty or consists of whitespace.";
+ TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, expectedMessage);
+ mocks.VerifyAll();
+ }
+
+ [Test]
+ public void Constructor_MapCategoriesNull_ThrowsArgumentNullException()
+ {
+ // Call
+ TestDelegate call = () => new MapTheme("Arbitrary attribute", null);
+
+ // Assert
+ var exception = Assert.Throws(call);
+ Assert.AreEqual("mapCategories", exception.ParamName);
+ }
+
+ [Test]
+ public void Constructor_MapCategoriesEmpty_ThrowsArgumentException()
+ {
+ // Setup
+ IEnumerable mapCategories = Enumerable.Empty();
+
+ // Call
+ TestDelegate call = () => new MapTheme("Arbitrary attribute", mapCategories);
+
+ // Assert
+ const string expectedMessage = "MapCategories is empty.";
+ TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, expectedMessage);
+ }
+
+ [Test]
+ public void Constructor_ValidArguments_ReturnsExpectedValues()
+ {
+ // Setup
+ var mocks = new MockRepository();
+ var mapCategory = mocks.Stub();
+ mocks.ReplayAll();
+
+ const string attributeName = "Arbitrary attribute";
+ var mapCategories = new[]
+ {
+ mapCategory
+ };
+
+ // Call
+ var theme = new MapTheme(attributeName, mapCategories);
+
+ // Assert
+ Assert.AreEqual(attributeName, theme.AttributeName);
+ Assert.AreSame(mapCategories, theme.MapCategories);
+ mocks.VerifyAll();
+ }
+ }
+}
\ No newline at end of file
Index: Core/Components/test/Core.Components.Gis.Test/packages.config
===================================================================
diff -u -ra1fa1538918813373bcc864f0bce092bf28fd0ce -rf2504e0b8efa6ad3fb972647af872a1072ddc3c6
--- Core/Components/test/Core.Components.Gis.Test/packages.config (.../packages.config) (revision a1fa1538918813373bcc864f0bce092bf28fd0ce)
+++ Core/Components/test/Core.Components.Gis.Test/packages.config (.../packages.config) (revision f2504e0b8efa6ad3fb972647af872a1072ddc3c6)
@@ -23,4 +23,5 @@
-->
+
\ No newline at end of file