Index: Core/Components/src/Core.Components.BruTile/Configurations/PersistentCacheConfiguration.cs =================================================================== diff -u -r684e249584f81413e836ca8fb3382ea56e5d7a3b -rf9b88340659806b9eb5d3547677284ed6cd87bde --- Core/Components/src/Core.Components.BruTile/Configurations/PersistentCacheConfiguration.cs (.../PersistentCacheConfiguration.cs) (revision 684e249584f81413e836ca8fb3382ea56e5d7a3b) +++ Core/Components/src/Core.Components.BruTile/Configurations/PersistentCacheConfiguration.cs (.../PersistentCacheConfiguration.cs) (revision f9b88340659806b9eb5d3547677284ed6cd87bde) @@ -159,7 +159,7 @@ BruTileSettings.MemoryCacheMaximum, tileCache); } - catch (Exception e) when (e is NotSupportedException) + catch (NotSupportedException e) { throw new CannotReceiveTilesException(Resources.Configuration_InitializeFromTileSource_TileSource_does_not_allow_access_to_provider, e); } Index: Core/Components/test/Core.Components.BruTile.Data.Test/BruTileSettingsTest.cs =================================================================== diff -u --- Core/Components/test/Core.Components.BruTile.Data.Test/BruTileSettingsTest.cs (revision 0) +++ Core/Components/test/Core.Components.BruTile.Data.Test/BruTileSettingsTest.cs (revision f9b88340659806b9eb5d3547677284ed6cd87bde) @@ -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 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.Gui.Settings; +using NUnit.Framework; + +namespace Core.Components.BruTile.Data.Test +{ + [TestFixture] + public class BruTileSettingsTest + { + [Test] + public void BruTileSettings_Always_ReturnExpectedSettings() + { + Assert.AreEqual(4, BruTileSettings.MaximumNumberOfThreads); + Assert.AreEqual("png", BruTileSettings.PersistentCacheFormat); + Assert.AreEqual(14, BruTileSettings.PersistentCacheExpireInDays); + Assert.AreEqual(100, BruTileSettings.MemoryCacheMinimum); + Assert.AreEqual(200, BruTileSettings.MemoryCacheMaximum); + Assert.AreEqual(SettingsHelper.Instance.GetApplicationLocalUserSettingsDirectory("tilecaches"), BruTileSettings.PersistentCacheDirectoryRoot); + } + } +} \ No newline at end of file Index: Core/Components/test/Core.Components.BruTile.Data.Test/Core.Components.BruTile.Data.Test.csproj =================================================================== diff -u -r99f9004206bfb9de084275d749b7aeccafd6da18 -rf9b88340659806b9eb5d3547677284ed6cd87bde --- Core/Components/test/Core.Components.BruTile.Data.Test/Core.Components.BruTile.Data.Test.csproj (.../Core.Components.BruTile.Data.Test.csproj) (revision 99f9004206bfb9de084275d749b7aeccafd6da18) +++ Core/Components/test/Core.Components.BruTile.Data.Test/Core.Components.BruTile.Data.Test.csproj (.../Core.Components.BruTile.Data.Test.csproj) (revision f9b88340659806b9eb5d3547677284ed6cd87bde) @@ -39,20 +39,36 @@ MinimumRecommendedRules.ruleset + + ..\..\..\..\packages\NUnit.3.6.0\lib\net40\nunit.framework.dll + True + Properties\GlobalAssembly.cs + Copying.Lesser.licenseheader + + + + {30E4C2AE-719E-4D70-9FA9-668A9767FBFA} + Core.Common.Gui + + + {3DCEF8F6-CB6D-435C-9539-50143DACD86C} + Core.Components.BruTile.Data + + + + + + \ No newline at end of file Index: Core/Components/test/Core.Components.BruTile.Test/Configurations/WmtsLayerConfigurationTest.cs =================================================================== diff -u -r684e249584f81413e836ca8fb3382ea56e5d7a3b -rf9b88340659806b9eb5d3547677284ed6cd87bde --- Core/Components/test/Core.Components.BruTile.Test/Configurations/WmtsLayerConfigurationTest.cs (.../WmtsLayerConfigurationTest.cs) (revision 684e249584f81413e836ca8fb3382ea56e5d7a3b) +++ Core/Components/test/Core.Components.BruTile.Test/Configurations/WmtsLayerConfigurationTest.cs (.../WmtsLayerConfigurationTest.cs) (revision f9b88340659806b9eb5d3547677284ed6cd87bde) @@ -24,7 +24,6 @@ using System.Security.AccessControl; using BruTile; using BruTile.Web; -using BruTile.Wmts; using Core.Common.Gui.TestUtil.Settings; using Core.Common.TestUtil; using Core.Components.BruTile.Configurations; @@ -122,11 +121,14 @@ IRequest nullRequest = null; var tileSource = new HttpTileSource(TileSchemaFactory.CreateWmtsTileSchema(targetMapData), - nullRequest); - + nullRequest); + var mocks = new MockRepository(); var factory = mocks.Stub(); - factory.Stub(f => f.GetWmtsTileSources(targetMapData.SourceCapabilitiesUrl)).Return(new [] { tileSource }); + factory.Stub(f => f.GetWmtsTileSources(targetMapData.SourceCapabilitiesUrl)).Return(new[] + { + tileSource + }); mocks.ReplayAll(); using (new UseCustomSettingsHelper(testSettingsHelper)) @@ -153,7 +155,7 @@ } mocks.VerifyAll(); } - + [Test] public void CreateInitializedConfiguration_MatchingLayerAvailable_ReturnConfiguration() {