Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Application.Ringtoets.Storage.csproj =================================================================== diff -u -r62095309982810946139e6c4167f4976f3df96bf -r935e492135a782b9e63c0924df798ebb358ac7cc --- Application/Ringtoets/src/Application.Ringtoets.Storage/Application.Ringtoets.Storage.csproj (.../Application.Ringtoets.Storage.csproj) (revision 62095309982810946139e6c4167f4976f3df96bf) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Application.Ringtoets.Storage.csproj (.../Application.Ringtoets.Storage.csproj) (revision 935e492135a782b9e63c0924df798ebb358ac7cc) @@ -60,6 +60,8 @@ Properties\GlobalAssembly.cs + + Index: Application/Ringtoets/src/Application.Ringtoets.Storage/BackgroundDataIdentifiers.cs =================================================================== diff -u --- Application/Ringtoets/src/Application.Ringtoets.Storage/BackgroundDataIdentifiers.cs (revision 0) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/BackgroundDataIdentifiers.cs (revision 935e492135a782b9e63c0924df798ebb358ac7cc) @@ -0,0 +1,54 @@ +// 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. + +namespace Application.Ringtoets.Storage +{ + /// + /// Container of general identifiers related to background data. + /// + public static class BackgroundDataIdentifiers + { + /// + /// The identifier for the configured state. + /// + public const string IsConfigured = "IsConfigured"; + + /// + /// The identifier for the source capabilities url. + /// + public const string SourceCapabilitiesUrl = "SourceCapabilitiesUrl"; + + /// + /// The identifier for the selected capability identifier. + /// + public const string SelectedCapabilityIdentifier = "SelectedCapabilityIdentifier"; + + /// + /// The identifier for the preferred format. + /// + public const string PreferredFormat = "PreferredFormat"; + + /// + /// The identifier for the well known tile source. + /// + public const string WellKnownTileSource = "WellKnownTileSource"; + } +} \ No newline at end of file Index: Application/Ringtoets/src/Application.Ringtoets.Storage/BackgroundMapDataType.cs =================================================================== diff -u --- Application/Ringtoets/src/Application.Ringtoets.Storage/BackgroundMapDataType.cs (revision 0) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/BackgroundMapDataType.cs (revision 935e492135a782b9e63c0924df798ebb358ac7cc) @@ -0,0 +1,41 @@ +// 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 Ringtoets.Common.Data.AssessmentSection; + +namespace Application.Ringtoets.Storage +{ + /// + /// Enumeration that defines the possible types of a . + /// + public enum BackgroundMapDataType + { + /// + /// Web Map Tile Service background map data type. + /// + Wmts = 1, + + /// + /// Well known tile source background map data type. + /// + WellKnown = 2 + } +} \ No newline at end of file Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Application.Ringtoets.Storage.Test.csproj =================================================================== diff -u -r62095309982810946139e6c4167f4976f3df96bf -r935e492135a782b9e63c0924df798ebb358ac7cc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Application.Ringtoets.Storage.Test.csproj (.../Application.Ringtoets.Storage.Test.csproj) (revision 62095309982810946139e6c4167f4976f3df96bf) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Application.Ringtoets.Storage.Test.csproj (.../Application.Ringtoets.Storage.Test.csproj) (revision 935e492135a782b9e63c0924df798ebb358ac7cc) @@ -78,6 +78,7 @@ Properties\GlobalAssembly.cs + Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/BackgroundDataIdentifiersTest.cs =================================================================== diff -u --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/BackgroundDataIdentifiersTest.cs (revision 0) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/BackgroundDataIdentifiersTest.cs (revision 935e492135a782b9e63c0924df798ebb358ac7cc) @@ -0,0 +1,40 @@ +// 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 Application.Ringtoets.Storage.Read; +using NUnit.Framework; + +namespace Application.Ringtoets.Storage.Test +{ + [TestFixture] + public class BackgroundDataIdentifiersTest + { + [Test] + public void BackgroundDataIdentifiers_ExpectedValues() + { + Assert.AreEqual("IsConfigured", BackgroundDataIdentifiers.IsConfigured); + Assert.AreEqual("SourceCapabilitiesUrl", BackgroundDataIdentifiers.SourceCapabilitiesUrl); + Assert.AreEqual("SelectedCapabilityIdentifier", BackgroundDataIdentifiers.SelectedCapabilityIdentifier); + Assert.AreEqual("PreferredFormat", BackgroundDataIdentifiers.PreferredFormat); + Assert.AreEqual("WellKnownTileSource", BackgroundDataIdentifiers.WellKnownTileSource); + } + } +} \ No newline at end of file Index: Core/Common/src/Core.Common.Utils/Reflection/TypeUtils.cs =================================================================== diff -u -r4b32064801ece7ab70357a2a942e21f113abc679 -r935e492135a782b9e63c0924df798ebb358ac7cc --- Core/Common/src/Core.Common.Utils/Reflection/TypeUtils.cs (.../TypeUtils.cs) (revision 4b32064801ece7ab70357a2a942e21f113abc679) +++ Core/Common/src/Core.Common.Utils/Reflection/TypeUtils.cs (.../TypeUtils.cs) (revision 935e492135a782b9e63c0924df798ebb358ac7cc) @@ -41,6 +41,8 @@ /// The type of the enum. /// The value of the enum. /// The display name of the enum value. + /// Thrown when + /// is an invalid value for . public static string GetDisplayName(TEnumType enumValue) where TEnumType : IConvertible { string valueString = enumValue.ToString(); @@ -49,7 +51,7 @@ { throw new InvalidEnumArgumentException(nameof(enumValue), Convert.ToInt32(enumValue), typeof(TEnumType)); } - var resourcesDisplayNameAttribute = (ResourcesDisplayNameAttribute)Attribute.GetCustomAttribute(fieldInfo, typeof(ResourcesDisplayNameAttribute)); + var resourcesDisplayNameAttribute = (ResourcesDisplayNameAttribute) Attribute.GetCustomAttribute(fieldInfo, typeof(ResourcesDisplayNameAttribute)); return resourcesDisplayNameAttribute != null ? resourcesDisplayNameAttribute.DisplayName : valueString; Fisheye: Tag 935e492135a782b9e63c0924df798ebb358ac7cc refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.Data/AssessmentSection/BackgroundDataIdentifiers.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 935e492135a782b9e63c0924df798ebb358ac7cc refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.Data/AssessmentSection/BackgroundMapDataType.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Common/src/Ringtoets.Common.Data/AssessmentSection/RingtoetsWellKnownTileSource.cs =================================================================== diff -u -r19fb6d61aab057e0e405453c3a180360a48bb3b7 -r935e492135a782b9e63c0924df798ebb358ac7cc --- Ringtoets/Common/src/Ringtoets.Common.Data/AssessmentSection/RingtoetsWellKnownTileSource.cs (.../RingtoetsWellKnownTileSource.cs) (revision 19fb6d61aab057e0e405453c3a180360a48bb3b7) +++ Ringtoets/Common/src/Ringtoets.Common.Data/AssessmentSection/RingtoetsWellKnownTileSource.cs (.../RingtoetsWellKnownTileSource.cs) (revision 935e492135a782b9e63c0924df798ebb358ac7cc) @@ -19,32 +19,18 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using Core.Common.Utils.Attributes; -using Ringtoets.Common.Data.Properties; - namespace Ringtoets.Common.Data.AssessmentSection { /// /// All well known tile sources for which built-in support is provided. /// public enum RingtoetsWellKnownTileSource { - [ResourcesDisplayName(typeof(Resources), nameof(Resources.Map_OpenStreetMap_DisplayName))] OpenStreetMap = 1, - - [ResourcesDisplayName(typeof(Resources), nameof(Resources.Map_BingAerial_DisplayName))] BingAerial = 2, - - [ResourcesDisplayName(typeof(Resources), nameof(Resources.Map_BingHybrid_DisplayName))] BingHybrid = 3, - - [ResourcesDisplayName(typeof(Resources), nameof(Resources.Map_BingRoads_DisplayName))] BingRoads = 4, - - [ResourcesDisplayName(typeof(Resources), nameof(Resources.Map_EsriWorldTopo_DisplayName))] EsriWorldTopo = 5, - - [ResourcesDisplayName(typeof(Resources), nameof(Resources.Map_EsriWorldShadedRelief_DisplayName))] EsriWorldShadedRelief = 6 } } \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs =================================================================== diff -u -r19fb6d61aab057e0e405453c3a180360a48bb3b7 -r935e492135a782b9e63c0924df798ebb358ac7cc --- Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 19fb6d61aab057e0e405453c3a180360a48bb3b7) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 935e492135a782b9e63c0924df798ebb358ac7cc) @@ -427,60 +427,6 @@ } /// - /// Looks up a localized string similar to Bing Maps - Satelliet. - /// - public static string Map_BingAerial_DisplayName { - get { - return ResourceManager.GetString("Map_BingAerial_DisplayName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Bing Maps - Satelliet + Wegen. - /// - public static string Map_BingHybrid_DisplayName { - get { - return ResourceManager.GetString("Map_BingHybrid_DisplayName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Bing Maps - Wegen. - /// - public static string Map_BingRoads_DisplayName { - get { - return ResourceManager.GetString("Map_BingRoads_DisplayName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Esri World - Reliëf. - /// - public static string Map_EsriWorldShadedRelief_DisplayName { - get { - return ResourceManager.GetString("Map_EsriWorldShadedRelief_DisplayName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Esri World - Topografisch. - /// - public static string Map_EsriWorldTopo_DisplayName { - get { - return ResourceManager.GetString("Map_EsriWorldTopo_DisplayName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to OpenStreetMap. - /// - public static string Map_OpenStreetMap_DisplayName { - get { - return ResourceManager.GetString("Map_OpenStreetMap_DisplayName", resourceCulture); - } - } - - /// /// Looks up a localized string similar to De waarde voor 'N' moet in het bereik {0} liggen.. /// public static string N_Value_should_be_in_Range_0_ { Index: Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx =================================================================== diff -u -r19fb6d61aab057e0e405453c3a180360a48bb3b7 -r935e492135a782b9e63c0924df798ebb358ac7cc --- Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx (.../Resources.resx) (revision 19fb6d61aab057e0e405453c3a180360a48bb3b7) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx (.../Resources.resx) (revision 935e492135a782b9e63c0924df798ebb358ac7cc) @@ -264,22 +264,4 @@ De transparantie moet in het bereik {0} liggen. - - Bing Maps - Satelliet - - - Bing Maps - Satelliet + Wegen - - - Bing Maps - Wegen - - - Esri World - Reliëf - - - Esri World - Topografisch - - - OpenStreetMap - \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj =================================================================== diff -u -r7f540fc512a6c291d69612b1d0b9241d42288aef -r935e492135a782b9e63c0924df798ebb358ac7cc --- Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision 7f540fc512a6c291d69612b1d0b9241d42288aef) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision 935e492135a782b9e63c0924df798ebb358ac7cc) @@ -40,8 +40,6 @@ - - Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/RingtoetsBackgroundMapDataFactory.cs =================================================================== diff -u -r7f540fc512a6c291d69612b1d0b9241d42288aef -r935e492135a782b9e63c0924df798ebb358ac7cc --- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/RingtoetsBackgroundMapDataFactory.cs (.../RingtoetsBackgroundMapDataFactory.cs) (revision 7f540fc512a6c291d69612b1d0b9241d42288aef) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/RingtoetsBackgroundMapDataFactory.cs (.../RingtoetsBackgroundMapDataFactory.cs) (revision 935e492135a782b9e63c0924df798ebb358ac7cc) @@ -40,8 +40,6 @@ /// The created . /// Thrown when /// is null. - /// Thrown when - /// is not valid. /// Thrown when /// contains an invalid value for . public static ImageBasedMapData CreateBackgroundMapData(BackgroundData backgroundData) Index: Ringtoets/Common/src/Ringtoets.Common.Utils/TypeConverters/BackgroundDataConverter.cs =================================================================== diff -u -r7f540fc512a6c291d69612b1d0b9241d42288aef -r935e492135a782b9e63c0924df798ebb358ac7cc --- Ringtoets/Common/src/Ringtoets.Common.Utils/TypeConverters/BackgroundDataConverter.cs (.../BackgroundDataConverter.cs) (revision 7f540fc512a6c291d69612b1d0b9241d42288aef) +++ Ringtoets/Common/src/Ringtoets.Common.Utils/TypeConverters/BackgroundDataConverter.cs (.../BackgroundDataConverter.cs) (revision 935e492135a782b9e63c0924df798ebb358ac7cc) @@ -39,13 +39,15 @@ /// The converted . /// Thrown when /// is null. + /// Thrown when the public static BackgroundData ConvertTo(ImageBasedMapData mapData) { if (mapData == null) { throw new ArgumentNullException(nameof(mapData)); } - + var backgroundData = new BackgroundData(CreateBackgroundDataConfiguration(mapData)) { Name = mapData.Name, @@ -56,21 +58,6 @@ return backgroundData; } - private static IBackgroundDataConfiguration CreateBackgroundDataConfiguration(ImageBasedMapData mapData) - { - var wmtsMapData = mapData as WmtsMapData; - if (wmtsMapData != null) - { - return CreateWmtsBackgroundDataConfiguration(wmtsMapData); - } - var wellKnownMapData = mapData as WellKnownTileSourceMapData; - if (wellKnownMapData != null) - { - return CreateWellKnownBackgroundDataConfiguration(wellKnownMapData); - } - throw new InvalidOperationException($"Can't create a background data configuration for {mapData.GetType()}."); - } - /// /// Converts to . /// @@ -109,6 +96,28 @@ return mapData; } + /// + /// Creates a based on the . + /// + /// The map the configuration is based upon. + /// A based on the . + /// Thrown when the is not supported + /// for creating the configuration. + private static IBackgroundDataConfiguration CreateBackgroundDataConfiguration(ImageBasedMapData mapData) + { + var wmtsMapData = mapData as WmtsMapData; + if (wmtsMapData != null) + { + return CreateWmtsBackgroundDataConfiguration(wmtsMapData); + } + var wellKnownMapData = mapData as WellKnownTileSourceMapData; + if (wellKnownMapData != null) + { + return CreateWellKnownBackgroundDataConfiguration(wellKnownMapData); + } + throw new NotSupportedException($"Can't create a background data configuration for {mapData.GetType()}."); + } + private static WellKnownBackgroundDataConfiguration CreateWellKnownBackgroundDataConfiguration(WellKnownTileSourceMapData mapData) { return new WellKnownBackgroundDataConfiguration(mapData.TileSource); Fisheye: Tag 935e492135a782b9e63c0924df798ebb358ac7cc refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.Data.Test/AssessmentSection/BackgroundDataIdentifiersTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/AssessmentSection/RingtoetsWellKnownTileSourceTest.cs =================================================================== diff -u -r19fb6d61aab057e0e405453c3a180360a48bb3b7 -r935e492135a782b9e63c0924df798ebb358ac7cc --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/AssessmentSection/RingtoetsWellKnownTileSourceTest.cs (.../RingtoetsWellKnownTileSourceTest.cs) (revision 19fb6d61aab057e0e405453c3a180360a48bb3b7) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/AssessmentSection/RingtoetsWellKnownTileSourceTest.cs (.../RingtoetsWellKnownTileSourceTest.cs) (revision 935e492135a782b9e63c0924df798ebb358ac7cc) @@ -36,28 +36,29 @@ return new Dictionary { { - RingtoetsWellKnownTileSource.OpenStreetMap, "OpenStreetMap" + RingtoetsWellKnownTileSource.OpenStreetMap, null }, { - RingtoetsWellKnownTileSource.BingAerial, "Bing Maps - Satelliet" + RingtoetsWellKnownTileSource.BingAerial, null }, { - RingtoetsWellKnownTileSource.BingHybrid, "Bing Maps - Satelliet + Wegen" + RingtoetsWellKnownTileSource.BingHybrid, null }, { - RingtoetsWellKnownTileSource.BingRoads, "Bing Maps - Wegen" + RingtoetsWellKnownTileSource.BingRoads, null }, { - RingtoetsWellKnownTileSource.EsriWorldTopo, "Esri World - Topografisch" + RingtoetsWellKnownTileSource.EsriWorldTopo, null }, { - RingtoetsWellKnownTileSource.EsriWorldShadedRelief, "Esri World - Reliëf" + RingtoetsWellKnownTileSource.EsriWorldShadedRelief, null } }; } } - protected override IDictionary ExpectedValueForEnumValues { + protected override IDictionary ExpectedValueForEnumValues + { get { return new Dictionary Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj =================================================================== diff -u -r7f540fc512a6c291d69612b1d0b9241d42288aef -r935e492135a782b9e63c0924df798ebb358ac7cc --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision 7f540fc512a6c291d69612b1d0b9241d42288aef) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision 935e492135a782b9e63c0924df798ebb358ac7cc) @@ -55,7 +55,6 @@ Properties\GlobalAssembly.cs - Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/BackgroundDataTestDataGenerator.cs =================================================================== diff -u -r7f540fc512a6c291d69612b1d0b9241d42288aef -r935e492135a782b9e63c0924df798ebb358ac7cc --- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/BackgroundDataTestDataGenerator.cs (.../BackgroundDataTestDataGenerator.cs) (revision 7f540fc512a6c291d69612b1d0b9241d42288aef) +++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/BackgroundDataTestDataGenerator.cs (.../BackgroundDataTestDataGenerator.cs) (revision 935e492135a782b9e63c0924df798ebb358ac7cc) @@ -39,9 +39,9 @@ public static BackgroundData GetWmtsBackgroundMapData(WmtsMapData wmtsMapData) { var backgroundMapData = new BackgroundData(new WmtsBackgroundDataConfiguration(wmtsMapData.IsConfigured, - wmtsMapData.SourceCapabilitiesUrl, - wmtsMapData.SelectedCapabilityIdentifier, - wmtsMapData.PreferredFormat)) + wmtsMapData.SourceCapabilitiesUrl, + wmtsMapData.SelectedCapabilityIdentifier, + wmtsMapData.PreferredFormat)) { Name = wmtsMapData.Name, IsVisible = wmtsMapData.IsVisible, @@ -52,14 +52,14 @@ } /// - /// Gets the with . + /// Gets the with . /// /// The to create the background data for. /// The created . /// Thrown when /// is an invalid . public static BackgroundData GetWellKnownBackgroundMapData(WellKnownTileSource tileSource) - { + { return new BackgroundData(new WellKnownBackgroundDataConfiguration(tileSource)) { IsVisible = true, Index: Ringtoets/Common/test/Ringtoets.Common.Utils.Test/Ringtoets.Common.Utils.Test.csproj =================================================================== diff -u -rdd2a51d0a110b707de32cca2b00994f33f877c9c -r935e492135a782b9e63c0924df798ebb358ac7cc --- Ringtoets/Common/test/Ringtoets.Common.Utils.Test/Ringtoets.Common.Utils.Test.csproj (.../Ringtoets.Common.Utils.Test.csproj) (revision dd2a51d0a110b707de32cca2b00994f33f877c9c) +++ Ringtoets/Common/test/Ringtoets.Common.Utils.Test/Ringtoets.Common.Utils.Test.csproj (.../Ringtoets.Common.Utils.Test.csproj) (revision 935e492135a782b9e63c0924df798ebb358ac7cc) @@ -84,6 +84,10 @@ {318BA582-88C9-4816-A54A-A7E431461DE3} Core.Components.Gis + + {F0FB401A-3494-4237-9E6D-02CDF77912A8} + Core.Components.Gis.TestUtils + {D4200F43-3F72-4F42-AF0A-8CED416A38EC} Ringtoets.Common.Data Index: Ringtoets/Common/test/Ringtoets.Common.Utils.Test/TypeConverters/BackgroundDataConverterTest.cs =================================================================== diff -u -r7f540fc512a6c291d69612b1d0b9241d42288aef -r935e492135a782b9e63c0924df798ebb358ac7cc --- Ringtoets/Common/test/Ringtoets.Common.Utils.Test/TypeConverters/BackgroundDataConverterTest.cs (.../BackgroundDataConverterTest.cs) (revision 7f540fc512a6c291d69612b1d0b9241d42288aef) +++ Ringtoets/Common/test/Ringtoets.Common.Utils.Test/TypeConverters/BackgroundDataConverterTest.cs (.../BackgroundDataConverterTest.cs) (revision 935e492135a782b9e63c0924df798ebb358ac7cc) @@ -24,6 +24,7 @@ using System.ComponentModel; using Core.Common.TestUtil; using Core.Components.Gis.Data; +using Core.Components.Gis.TestUtil; using NUnit.Framework; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.TestUtil; @@ -58,6 +59,21 @@ } [Test] + public void ConvertTo_MapDataNotSupportedForConversion_ThrowNotSupportedException() + { + // Setup + var unsupportedImageBasedMapData = new TestImageBasedMapData("What's in a name?", false); + + // Call + TestDelegate call = () => BackgroundDataConverter.ConvertTo(unsupportedImageBasedMapData); + + // Assert + var exception = Assert.Throws(call); + string expectedMessage = $"Can't create a background data configuration for {unsupportedImageBasedMapData.GetType()}."; + Assert.AreEqual(expectedMessage, exception.Message); + } + + [Test] [TestCase(true)] [TestCase(false)] public void ConvertTo_WmtsMapData_ReturnBackgroundData(bool configured)