Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Application.Ringtoets.Storage.csproj =================================================================== diff -u -rfa68b38773452b965a9ee25db20436446c1a50b8 -rfde2f5bd7dfb9f60e298ecf2afe9623dd540e16c --- Application/Ringtoets/src/Application.Ringtoets.Storage/Application.Ringtoets.Storage.csproj (.../Application.Ringtoets.Storage.csproj) (revision fa68b38773452b965a9ee25db20436446c1a50b8) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Application.Ringtoets.Storage.csproj (.../Application.Ringtoets.Storage.csproj) (revision fde2f5bd7dfb9f60e298ecf2afe9623dd540e16c) @@ -61,7 +61,7 @@ Properties\GlobalAssembly.cs - + Index: Application/Ringtoets/src/Application.Ringtoets.Storage/BackgroundDataType.cs =================================================================== diff -u --- Application/Ringtoets/src/Application.Ringtoets.Storage/BackgroundDataType.cs (revision 0) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/BackgroundDataType.cs (revision fde2f5bd7dfb9f60e298ecf2afe9623dd540e16c) @@ -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 BackgroundDataType + { + /// + /// 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 Fisheye: Tag fde2f5bd7dfb9f60e298ecf2afe9623dd540e16c refers to a dead (removed) revision in file `Application/Ringtoets/src/Application.Ringtoets.Storage/BackgroundMapDataType.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/BackgroundDataCreateExtensions.cs =================================================================== diff -u -r8f2d3db3a37f2f2d112e947c5d4b8928f05c559c -rfde2f5bd7dfb9f60e298ecf2afe9623dd540e16c --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/BackgroundDataCreateExtensions.cs (.../BackgroundDataCreateExtensions.cs) (revision 8f2d3db3a37f2f2d112e947c5d4b8928f05c559c) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/BackgroundDataCreateExtensions.cs (.../BackgroundDataCreateExtensions.cs) (revision fde2f5bd7dfb9f60e298ecf2afe9623dd540e16c) @@ -64,12 +64,12 @@ if (wmtsBackgroundDataConfiguration != null) { - entity.BackgroundDataType = Convert.ToByte(BackgroundMapDataType.Wmts); + entity.BackgroundDataType = Convert.ToByte(BackgroundDataType.Wmts); AddWmtsMetaEntities(wmtsBackgroundDataConfiguration, entity); } else if (wellKnownBackgroundDataConfiguration != null) { - entity.BackgroundDataType = Convert.ToByte(BackgroundMapDataType.WellKnown); + entity.BackgroundDataType = Convert.ToByte(BackgroundDataType.WellKnown); AddWellKnownTileSourceMetaEntities(wellKnownBackgroundDataConfiguration, entity); } } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/BackgroundDataEntityReadExtensions.cs =================================================================== diff -u -rfa68b38773452b965a9ee25db20436446c1a50b8 -rfde2f5bd7dfb9f60e298ecf2afe9623dd540e16c --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/BackgroundDataEntityReadExtensions.cs (.../BackgroundDataEntityReadExtensions.cs) (revision fa68b38773452b965a9ee25db20436446c1a50b8) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/BackgroundDataEntityReadExtensions.cs (.../BackgroundDataEntityReadExtensions.cs) (revision fde2f5bd7dfb9f60e298ecf2afe9623dd540e16c) @@ -52,11 +52,11 @@ IBackgroundDataConfiguration configuration = null; - if ((BackgroundMapDataType) entity.BackgroundDataType == BackgroundMapDataType.Wmts) + if ((BackgroundDataType) entity.BackgroundDataType == BackgroundDataType.Wmts) { configuration = ReadWmtsConfiguration(entity.BackgroundDataMetaEntities); } - else if ((BackgroundMapDataType) entity.BackgroundDataType == BackgroundMapDataType.WellKnown) + else if ((BackgroundDataType) entity.BackgroundDataType == BackgroundDataType.WellKnown) { configuration = ReadWellKnownConfiguration(entity.BackgroundDataMetaEntities); } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/AssessmentSectionCreateExtensionsTest.cs =================================================================== diff -u -r7f540fc512a6c291d69612b1d0b9241d42288aef -rfde2f5bd7dfb9f60e298ecf2afe9623dd540e16c --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/AssessmentSectionCreateExtensionsTest.cs (.../AssessmentSectionCreateExtensionsTest.cs) (revision 7f540fc512a6c291d69612b1d0b9241d42288aef) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/AssessmentSectionCreateExtensionsTest.cs (.../AssessmentSectionCreateExtensionsTest.cs) (revision fde2f5bd7dfb9f60e298ecf2afe9623dd540e16c) @@ -69,7 +69,7 @@ const string mapDataName = "map data name"; const double transparency = 0.3; const bool isVisible = true; - const BackgroundMapDataType backgroundType = BackgroundMapDataType.Wmts; + const BackgroundDataType backgroundType = BackgroundDataType.Wmts; var assessmentSection = new AssessmentSection(assessmentSectionComposition) { Id = testId, Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/BackgroundDataCreateExtensionsTest.cs =================================================================== diff -u -rf372658df422303abcebd8206c8127b420a3ccc2 -rfde2f5bd7dfb9f60e298ecf2afe9623dd540e16c --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/BackgroundDataCreateExtensionsTest.cs (.../BackgroundDataCreateExtensionsTest.cs) (revision f372658df422303abcebd8206c8127b420a3ccc2) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/BackgroundDataCreateExtensionsTest.cs (.../BackgroundDataCreateExtensionsTest.cs) (revision fde2f5bd7dfb9f60e298ecf2afe9623dd540e16c) @@ -149,7 +149,7 @@ const string name = "background"; const bool isVisible = true; - const BackgroundMapDataType backgroundDataType = BackgroundMapDataType.WellKnown; + const BackgroundDataType backgroundDataType = BackgroundDataType.WellKnown; RoundedDouble transparancy = (RoundedDouble) 0.3; var configuration = new WellKnownBackgroundDataConfiguration(wellKnownTileSource); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/AssessmentSectionEntityReadExtensionsTest.cs =================================================================== diff -u -r5c1a60942a2effc207d546054d4832f4aabe8ba5 -rfde2f5bd7dfb9f60e298ecf2afe9623dd540e16c --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/AssessmentSectionEntityReadExtensionsTest.cs (.../AssessmentSectionEntityReadExtensionsTest.cs) (revision 5c1a60942a2effc207d546054d4832f4aabe8ba5) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/AssessmentSectionEntityReadExtensionsTest.cs (.../AssessmentSectionEntityReadExtensionsTest.cs) (revision fde2f5bd7dfb9f60e298ecf2afe9623dd540e16c) @@ -100,7 +100,7 @@ const string mapDataName = "Background"; const double transparency = 0.0; bool isVisible = isConfigured; - const BackgroundMapDataType backgroundMapDataType = BackgroundMapDataType.WellKnown; + const BackgroundDataType backgroundDataType = BackgroundDataType.WellKnown; var random = new Random(21); var wellKnownTileSource = random.NextEnumValue(); @@ -121,7 +121,7 @@ Name = mapDataName, Transparency = transparency, IsVisible = Convert.ToByte(isVisible), - BackgroundDataType = Convert.ToByte(backgroundMapDataType), + BackgroundDataType = Convert.ToByte(backgroundDataType), BackgroundDataMetaEntities = backgroundDataMetaEntities }; Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/BackgroundDataEntityReadExtensionsTest.cs =================================================================== diff -u -r5c1a60942a2effc207d546054d4832f4aabe8ba5 -rfde2f5bd7dfb9f60e298ecf2afe9623dd540e16c --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/BackgroundDataEntityReadExtensionsTest.cs (.../BackgroundDataEntityReadExtensionsTest.cs) (revision 5c1a60942a2effc207d546054d4832f4aabe8ba5) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/BackgroundDataEntityReadExtensionsTest.cs (.../BackgroundDataEntityReadExtensionsTest.cs) (revision fde2f5bd7dfb9f60e298ecf2afe9623dd540e16c) @@ -58,7 +58,7 @@ const double transparancy = 0.4; const bool isConfigured = true; - const BackgroundMapDataType backgroundMapDataType = BackgroundMapDataType.Wmts; + const BackgroundDataType backgroundDataType = BackgroundDataType.Wmts; var backgroundDataMetaEntities = new[] { new BackgroundDataMetaEntity @@ -89,7 +89,7 @@ BackgroundDataMetaEntities = backgroundDataMetaEntities, IsVisible = Convert.ToByte(isVisible), Transparency = transparancy, - BackgroundDataType = Convert.ToByte(backgroundMapDataType) + BackgroundDataType = Convert.ToByte(backgroundDataType) }; // Call @@ -116,7 +116,7 @@ const bool isVisible = false; const double transparancy = 0.4; - const BackgroundMapDataType backgroundMapDataType = BackgroundMapDataType.WellKnown; + const BackgroundDataType backgroundDataType = BackgroundDataType.WellKnown; var random = new Random(21); var wellKnownTileSource = random.NextEnumValue(); @@ -134,7 +134,7 @@ }, IsVisible = Convert.ToByte(isVisible), Transparency = transparancy, - BackgroundDataType = Convert.ToByte(backgroundMapDataType) + BackgroundDataType = Convert.ToByte(backgroundDataType) }; // Call @@ -182,7 +182,7 @@ Value = "image/jpeg" } }, - BackgroundDataType = Convert.ToByte(BackgroundMapDataType.Wmts) + BackgroundDataType = Convert.ToByte(BackgroundDataType.Wmts) }; // Call Index: Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil.Test/MapDataTestHelperTest.cs =================================================================== diff -u -rde55528705df446cc78761cd04d8ba8149e6540c -rfde2f5bd7dfb9f60e298ecf2afe9623dd540e16c --- Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil.Test/MapDataTestHelperTest.cs (.../MapDataTestHelperTest.cs) (revision de55528705df446cc78761cd04d8ba8149e6540c) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil.Test/MapDataTestHelperTest.cs (.../MapDataTestHelperTest.cs) (revision fde2f5bd7dfb9f60e298ecf2afe9623dd540e16c) @@ -1162,7 +1162,7 @@ public void AssertImageBasedMapData_WmtsMapDataNotEqual_ThrowAssertionException(WmtsMapData wmtsMapData) { // Setup - var mapData = WmtsMapData.CreateDefaultPdokMapData(); + WmtsMapData mapData = WmtsMapData.CreateDefaultPdokMapData(); // Call TestDelegate test = () => MapDataTestHelper.AssertImageBasedMapData(wmtsMapData, mapData); @@ -1203,8 +1203,8 @@ public void AssertImageBasedMapData_WmtsDataCorrect_DoesNotThrow() { // Setup - var expectedMapData = WmtsMapData.CreateUnconnectedMapData(); - var actualMapData = WmtsMapData.CreateUnconnectedMapData(); + WmtsMapData expectedMapData = WmtsMapData.CreateUnconnectedMapData(); + WmtsMapData actualMapData = WmtsMapData.CreateUnconnectedMapData(); // Call TestDelegate test = () => MapDataTestHelper.AssertImageBasedMapData(expectedMapData, actualMapData); @@ -1220,46 +1220,44 @@ private static IEnumerable NotEqualToDefaultPdokMapData() { - var defaultMapData = WmtsMapData.CreateDefaultPdokMapData(); + WmtsMapData defaultMapData = WmtsMapData.CreateDefaultPdokMapData(); var otherName = new WmtsMapData("otherName", defaultMapData.SourceCapabilitiesUrl, defaultMapData.SelectedCapabilityIdentifier, defaultMapData.PreferredFormat); yield return new TestCaseData(otherName).SetName("WmtsMapDataOtherName"); - var otherPreferredFormat = new WmtsMapData(defaultMapData.Name, - defaultMapData.SourceCapabilitiesUrl, - defaultMapData.SelectedCapabilityIdentifier, - "image/otherPreferredFormat"); - yield return new TestCaseData(otherPreferredFormat).SetName("WmtsMapDataOtherPreferredFormat"); + var otherSourceCapabilitiesUrl = new WmtsMapData(defaultMapData.Name, + "otherSourceCapabilitiesUrl", + defaultMapData.SelectedCapabilityIdentifier, + defaultMapData.PreferredFormat); + yield return new TestCaseData(otherSourceCapabilitiesUrl).SetName("WmtsMapDataOtherSourceCapabilitiesUrl"); var otherSelectedCapabilityIdentifier = new WmtsMapData(defaultMapData.Name, defaultMapData.SourceCapabilitiesUrl, "otherSelectedCapabilityIdentifier", defaultMapData.PreferredFormat); yield return new TestCaseData(otherSelectedCapabilityIdentifier).SetName("WmtsMapDataOtherSelectedCapabilityIdentifier"); - var otherSourceCapabilitiesUrl = new WmtsMapData(defaultMapData.Name, - "otherSourceCapabilitiesUrl", - defaultMapData.SelectedCapabilityIdentifier, - defaultMapData.PreferredFormat); - yield return new TestCaseData(otherSourceCapabilitiesUrl).SetName("WmtsMapDataSourceCapabilitiesUrl"); + var otherPreferredFormat = new WmtsMapData(defaultMapData.Name, + defaultMapData.SourceCapabilitiesUrl, + defaultMapData.SelectedCapabilityIdentifier, + "image/otherPreferredFormat"); + yield return new TestCaseData(otherPreferredFormat).SetName("WmtsMapDataOtherPreferredFormat"); - WmtsMapData otherVisibility = defaultMapData; + WmtsMapData otherVisibility = WmtsMapData.CreateDefaultPdokMapData(); otherVisibility.IsVisible = !otherVisibility.IsVisible; yield return new TestCaseData(otherVisibility); - WmtsMapData otherTransparency = defaultMapData; - otherTransparency.Transparency = (RoundedDouble) ((otherVisibility.Transparency + 0.5) % 1); + WmtsMapData otherTransparency = WmtsMapData.CreateDefaultPdokMapData(); + otherTransparency.Transparency = (RoundedDouble) ((otherTransparency.Transparency + 0.5) % 1); yield return new TestCaseData(otherTransparency); } private static IEnumerable NotEqualToBingAerial() { - var defaultMapData = new WellKnownTileSourceMapData(WellKnownTileSource.BingAerial); - - var otherName = new WellKnownTileSourceMapData(defaultMapData.TileSource) + var otherName = new WellKnownTileSourceMapData(WellKnownTileSource.BingAerial) { Name = "otherName" }; @@ -1271,12 +1269,12 @@ }; yield return new TestCaseData(otherPreferredFormat).SetName("WellKnownTileSourceOtherPreferredFormat"); - WellKnownTileSourceMapData otherVisibility = defaultMapData; + var otherVisibility = new WellKnownTileSourceMapData(WellKnownTileSource.BingAerial); otherVisibility.IsVisible = !otherVisibility.IsVisible; yield return new TestCaseData(otherVisibility).SetName("WellKnownTileSourceOtherVisibility"); - WellKnownTileSourceMapData otherTransparency = defaultMapData; - otherTransparency.Transparency = (RoundedDouble) ((otherVisibility.Transparency + 0.5) % 1); + var otherTransparency = new WellKnownTileSourceMapData(WellKnownTileSource.BingAerial); + otherTransparency.Transparency = (RoundedDouble) ((otherTransparency.Transparency + 0.5) % 1); yield return new TestCaseData(otherTransparency).SetName("WellKnownTileSourceOtherTransparency"); }