Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/BackgroundDataCreateExtensions.cs =================================================================== diff -u -rfde2f5bd7dfb9f60e298ecf2afe9623dd540e16c -r7071a71d08d7bd205f608b10100665481b94c27a --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/BackgroundDataCreateExtensions.cs (.../BackgroundDataCreateExtensions.cs) (revision fde2f5bd7dfb9f60e298ecf2afe9623dd540e16c) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/BackgroundDataCreateExtensions.cs (.../BackgroundDataCreateExtensions.cs) (revision 7071a71d08d7bd205f608b10100665481b94c27a) @@ -79,7 +79,7 @@ entity.BackgroundDataMetaEntities.Add(new BackgroundDataMetaEntity { Key = BackgroundDataIdentifiers.WellKnownTileSource.DeepClone(), - Value = ((int) wellKnownConfiguration.WellKnownTileSource).ToString().DeepClone() + Value = ((int) wellKnownConfiguration.WellKnownTileSource).ToString() }); } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/BackgroundDataCreateExtensionsTest.cs =================================================================== diff -u -rfde2f5bd7dfb9f60e298ecf2afe9623dd540e16c -r7071a71d08d7bd205f608b10100665481b94c27a --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/BackgroundDataCreateExtensionsTest.cs (.../BackgroundDataCreateExtensionsTest.cs) (revision fde2f5bd7dfb9f60e298ecf2afe9623dd540e16c) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/BackgroundDataCreateExtensionsTest.cs (.../BackgroundDataCreateExtensionsTest.cs) (revision 7071a71d08d7bd205f608b10100665481b94c27a) @@ -58,7 +58,7 @@ const string preferredFormat = "image/png"; const bool isVisible = true; const bool isConfigured = true; - RoundedDouble transparancy = (RoundedDouble) 0.3; + var transparancy = (RoundedDouble) 0.3; var configuration = new WmtsBackgroundDataConfiguration(isConfigured, sourceCapabilitiesUrl, @@ -94,7 +94,6 @@ { BackgroundDataIdentifiers.PreferredFormat, preferredFormat } - }; var actualKeyValuePairs = entity.BackgroundDataMetaEntities.Select( @@ -109,7 +108,7 @@ const string name = "background"; const bool isVisible = true; const bool isConfigured = false; - RoundedDouble transparancy = (RoundedDouble)0.3; + var transparancy = (RoundedDouble) 0.3; var configuration = new WmtsBackgroundDataConfiguration(); @@ -150,7 +149,7 @@ const string name = "background"; const bool isVisible = true; const BackgroundDataType backgroundDataType = BackgroundDataType.WellKnown; - RoundedDouble transparancy = (RoundedDouble) 0.3; + var transparancy = (RoundedDouble) 0.3; var configuration = new WellKnownBackgroundDataConfiguration(wellKnownTileSource); var backgroundData = new BackgroundData(configuration) Index: Core/Components/test/Core.Components.BruTile.Test/Configurations/WellKnownTileSourceLayerConfigurationTest.cs =================================================================== diff -u -r4b24b9c98dd06f31acd9e1282b287c491b07ab2f -r7071a71d08d7bd205f608b10100665481b94c27a --- Core/Components/test/Core.Components.BruTile.Test/Configurations/WellKnownTileSourceLayerConfigurationTest.cs (.../WellKnownTileSourceLayerConfigurationTest.cs) (revision 4b24b9c98dd06f31acd9e1282b287c491b07ab2f) +++ Core/Components/test/Core.Components.BruTile.Test/Configurations/WellKnownTileSourceLayerConfigurationTest.cs (.../WellKnownTileSourceLayerConfigurationTest.cs) (revision 7071a71d08d7bd205f608b10100665481b94c27a) @@ -56,7 +56,7 @@ using (new UseCustomSettingsHelper(testSettingsHelper)) { foreach (WellKnownTileSource wellKnownTileSource in Enum.GetValues(typeof(WellKnownTileSource))) - { + { using (new UseCustomTileSourceFactoryConfig(new WellKnownTileSourceMapData(wellKnownTileSource))) { // When Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/Ringtoets.Common.Data.TestUtil.Test.csproj =================================================================== diff -u -r7f540fc512a6c291d69612b1d0b9241d42288aef -r7071a71d08d7bd205f608b10100665481b94c27a --- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/Ringtoets.Common.Data.TestUtil.Test.csproj (.../Ringtoets.Common.Data.TestUtil.Test.csproj) (revision 7f540fc512a6c291d69612b1d0b9241d42288aef) +++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/Ringtoets.Common.Data.TestUtil.Test.csproj (.../Ringtoets.Common.Data.TestUtil.Test.csproj) (revision 7071a71d08d7bd205f608b10100665481b94c27a) @@ -80,10 +80,6 @@ {3BBFD65B-B277-4E50-AE6D-BD24C3434609} Core.Common.Base - - {F49BD8B2-332A-4C91-A196-8CCE0A2C7D98} - Core.Common.Utils - {D749EE4C-CE50-4C17-BF01-9A953028C126} Core.Common.TestUtil Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/BackgroundDataTestHelper.cs =================================================================== diff -u -r92be34a088da8406be8d0cb37aa19b2462acebe0 -r7071a71d08d7bd205f608b10100665481b94c27a --- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/BackgroundDataTestHelper.cs (.../BackgroundDataTestHelper.cs) (revision 92be34a088da8406be8d0cb37aa19b2462acebe0) +++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/BackgroundDataTestHelper.cs (.../BackgroundDataTestHelper.cs) (revision 7071a71d08d7bd205f608b10100665481b94c27a) @@ -35,7 +35,8 @@ /// The background data with the expected properties. /// The background data to assert. /// Thrown when the properties of the - /// are not equal to the properties of . + /// are not equal to the properties of or when + /// the set is not supported. public static void AssertBackgroundData(BackgroundData expectedBackgroundData, BackgroundData actualBackgroundData) { Assert.AreEqual(expectedBackgroundData.Name, actualBackgroundData.Name); @@ -44,18 +45,22 @@ IBackgroundDataConfiguration backgroundDataConfiguration = expectedBackgroundData.Configuration; var wmtsBackgroundDataConfiguration = backgroundDataConfiguration as WmtsBackgroundDataConfiguration; + var wellKnownBackgroundDataConfiguration = backgroundDataConfiguration as WellKnownBackgroundDataConfiguration; + if (wmtsBackgroundDataConfiguration != null) { - var actualWmtsBackgroundDataConfiguration = (WmtsBackgroundDataConfiguration)actualBackgroundData.Configuration; + var actualWmtsBackgroundDataConfiguration = (WmtsBackgroundDataConfiguration) actualBackgroundData.Configuration; AssertWmtsBackgroundConfiguration(wmtsBackgroundDataConfiguration, actualWmtsBackgroundDataConfiguration); + return; } - var wellKnownBackgroundDataConfiguration = backgroundDataConfiguration as WellKnownBackgroundDataConfiguration; if (wellKnownBackgroundDataConfiguration != null) { - var actualWellKnownBackgroundDataConfiguration = (WellKnownBackgroundDataConfiguration)actualBackgroundData.Configuration; + var actualWellKnownBackgroundDataConfiguration = (WellKnownBackgroundDataConfiguration) actualBackgroundData.Configuration; AssertWellKnownBackgroundConfiguration(wellKnownBackgroundDataConfiguration, actualWellKnownBackgroundDataConfiguration); + return; } + Assert.Fail($"Unsupported type of {nameof(IBackgroundDataConfiguration)} in {expectedBackgroundData.Configuration}"); } private static void AssertWellKnownBackgroundConfiguration(WellKnownBackgroundDataConfiguration wellKnownBackgroundDataConfiguration, Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/RingtoetsBackgroundMapDataFactoryTest.cs =================================================================== diff -u -rfa68b38773452b965a9ee25db20436446c1a50b8 -r7071a71d08d7bd205f608b10100665481b94c27a --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/RingtoetsBackgroundMapDataFactoryTest.cs (.../RingtoetsBackgroundMapDataFactoryTest.cs) (revision fa68b38773452b965a9ee25db20436446c1a50b8) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/RingtoetsBackgroundMapDataFactoryTest.cs (.../RingtoetsBackgroundMapDataFactoryTest.cs) (revision 7071a71d08d7bd205f608b10100665481b94c27a) @@ -94,7 +94,7 @@ var backgroundData = new BackgroundData(new WellKnownBackgroundDataConfiguration((RingtoetsWellKnownTileSource) 1337)); // Call - TestDelegate call = ()=> RingtoetsBackgroundMapDataFactory.CreateBackgroundMapData(backgroundData); + TestDelegate call = () => RingtoetsBackgroundMapDataFactory.CreateBackgroundMapData(backgroundData); // Assert Assert.Throws(call);