Index: Core/Common/src/Core.Common.Gui/Settings/SettingsHelper.cs =================================================================== diff -u -r1c29823d3914c54b0b85d4787a80b68be804f523 -r86b2665e1dd51dc99d33568d1f4206f3da204254 --- Core/Common/src/Core.Common.Gui/Settings/SettingsHelper.cs (.../SettingsHelper.cs) (revision 1c29823d3914c54b0b85d4787a80b68be804f523) +++ Core/Common/src/Core.Common.Gui/Settings/SettingsHelper.cs (.../SettingsHelper.cs) (revision 86b2665e1dd51dc99d33568d1f4206f3da204254) @@ -40,7 +40,7 @@ /// /// Creates a new instance of . /// - private SettingsHelper() + protected SettingsHelper() { // set defaults based on executing assembly AssemblyUtils.AssemblyInfo info = AssemblyUtils.GetExecutingAssemblyInfo(); @@ -79,7 +79,7 @@ /// The postfix path to use after the local application data folder (if any). /// Directory path where the user settings can be found. /// Thrown when the application local user settings directory could not be created. - public string GetApplicationLocalUserSettingsDirectory(params string[] subPath) + public virtual string GetApplicationLocalUserSettingsDirectory(params string[] subPath) { var directorypath = new List { Index: Core/Common/test/Core.Common.TestUtil/TestDataPath.cs =================================================================== diff -u -ra7ef0ce28b31e7b9da38cf7a226d57228b319535 -r86b2665e1dd51dc99d33568d1f4206f3da204254 --- Core/Common/test/Core.Common.TestUtil/TestDataPath.cs (.../TestDataPath.cs) (revision a7ef0ce28b31e7b9da38cf7a226d57228b319535) +++ Core/Common/test/Core.Common.TestUtil/TestDataPath.cs (.../TestDataPath.cs) (revision 86b2665e1dd51dc99d33568d1f4206f3da204254) @@ -57,6 +57,10 @@ public static class Components { + public static class DotSpatial + { + public static readonly TestDataPath Forms = System.IO.Path.Combine("Core", "Components", "test", "Core.Components.DotSpatial.Forms.Test"); + } public static class Gis { public static readonly TestDataPath IO = System.IO.Path.Combine("Core", "Components", "test", "Core.Components.Gis.IO.Test"); Index: Core/Components/src/Core.Components.DotSpatial.Forms/Core.Components.DotSpatial.Forms.csproj =================================================================== diff -u -r336c86d498d517c66d854fc0e91a6a06f1e582c2 -r86b2665e1dd51dc99d33568d1f4206f3da204254 --- Core/Components/src/Core.Components.DotSpatial.Forms/Core.Components.DotSpatial.Forms.csproj (.../Core.Components.DotSpatial.Forms.csproj) (revision 336c86d498d517c66d854fc0e91a6a06f1e582c2) +++ Core/Components/src/Core.Components.DotSpatial.Forms/Core.Components.DotSpatial.Forms.csproj (.../Core.Components.DotSpatial.Forms.csproj) (revision 86b2665e1dd51dc99d33568d1f4206f3da204254) @@ -122,6 +122,11 @@ Core.Common.Controls False + + {30E4C2AE-719E-4D70-9FA9-668A9767FBFA} + Core.Common.Gui + False + {E344867E-9AC9-44C8-88A5-8185681679A9} Core.Common.IO Index: Core/Components/src/Core.Components.DotSpatial.Forms/Views/WmtsLocationControl.cs =================================================================== diff -u -rbe661775ee43fd33d21a2aff0068066a1903954b -r86b2665e1dd51dc99d33568d1f4206f3da204254 --- Core/Components/src/Core.Components.DotSpatial.Forms/Views/WmtsLocationControl.cs (.../WmtsLocationControl.cs) (revision be661775ee43fd33d21a2aff0068066a1903954b) +++ Core/Components/src/Core.Components.DotSpatial.Forms/Views/WmtsLocationControl.cs (.../WmtsLocationControl.cs) (revision 86b2665e1dd51dc99d33568d1f4206f3da204254) @@ -21,8 +21,11 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Windows.Forms; +using Core.Common.Gui.Settings; +using Core.Common.IO.Exceptions; using Core.Components.DotSpatial.Forms.IO; using Core.Components.DotSpatial.Forms.Properties; using Core.Components.DotSpatial.Layer.BruTile.Configurations; @@ -47,6 +50,7 @@ public WmtsLocationControl() { wmtsConnectionInfos = new List(); + wmtsConnectionInfos.AddRange(GetSavedWmtsConnectionInfos()); capabilities = new List(); InitializeComponent(); @@ -102,6 +106,23 @@ base.Dispose(disposing); } + private static IEnumerable GetSavedWmtsConnectionInfos() + { + string applicationVersion = SettingsHelper.Instance.ApplicationVersion; + const string wmtsConnectionInfoFileName = "wmtsConnectionInfo.config"; + + string folderPath = SettingsHelper.Instance.GetApplicationLocalUserSettingsDirectory(applicationVersion); + string filePath = Path.Combine(folderPath, wmtsConnectionInfoFileName); + + try + { + var reader = new WmtsConnectionInfoReader(); + return reader.ReadWmtsConnectionInfos(filePath); + } + catch (CriticalFileReadException exception) {} + return Enumerable.Empty(); + } + private WmtsConnectionInfo TryCreateWmtsConnectionInfo(string wmtsConnectionName, string wmtsConnectionUrl) { try Index: Core/Components/src/Core.Components.DotSpatial/Core.Components.DotSpatial.csproj =================================================================== diff -u -rd931a61857360da73c642ea9decf7882cd4cdb1c -r86b2665e1dd51dc99d33568d1f4206f3da204254 --- Core/Components/src/Core.Components.DotSpatial/Core.Components.DotSpatial.csproj (.../Core.Components.DotSpatial.csproj) (revision d931a61857360da73c642ea9decf7882cd4cdb1c) +++ Core/Components/src/Core.Components.DotSpatial/Core.Components.DotSpatial.csproj (.../Core.Components.DotSpatial.csproj) (revision 86b2665e1dd51dc99d33568d1f4206f3da204254) @@ -132,6 +132,11 @@ Core.Common.Base False + + {30E4C2AE-719E-4D70-9FA9-668A9767FBFA} + Core.Common.Gui + False + {f49bd8b2-332a-4c91-a196-8cce0a2c7d98} Core.Common.Utils Index: Core/Components/src/Core.Components.DotSpatial/Layer/BruTile/BruTileSettings.cs =================================================================== diff -u -rfa3b352bc1b1c01fc73a9a45268c5573807a6381 -r86b2665e1dd51dc99d33568d1f4206f3da204254 --- Core/Components/src/Core.Components.DotSpatial/Layer/BruTile/BruTileSettings.cs (.../BruTileSettings.cs) (revision fa3b352bc1b1c01fc73a9a45268c5573807a6381) +++ Core/Components/src/Core.Components.DotSpatial/Layer/BruTile/BruTileSettings.cs (.../BruTileSettings.cs) (revision 86b2665e1dd51dc99d33568d1f4206f3da204254) @@ -19,10 +19,8 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System; -using System.IO; using BruTile.Cache; -using Core.Components.DotSpatial.Layer.BruTile.Configurations; +using Core.Common.Gui.Settings; namespace Core.Components.DotSpatial.Layer.BruTile { @@ -64,7 +62,6 @@ /// /// Gets the root directory path for the persistent cache. /// - public static string PersistentCacheDirectoryRoot { get; } = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), - "WTI", "Ringtoets", "tilecaches"); + public static string PersistentCacheDirectoryRoot { get; } = SettingsHelper.Instance.GetApplicationLocalUserSettingsDirectory("tilecaches"); } } \ No newline at end of file Index: Core/Components/test/Core.Components.DotSpatial.Forms.Test/Core.Components.DotSpatial.Forms.Test.csproj =================================================================== diff -u -r8a885188327983ccc75c5ae70c6abf91fb6cdac1 -r86b2665e1dd51dc99d33568d1f4206f3da204254 --- Core/Components/test/Core.Components.DotSpatial.Forms.Test/Core.Components.DotSpatial.Forms.Test.csproj (.../Core.Components.DotSpatial.Forms.Test.csproj) (revision 8a885188327983ccc75c5ae70c6abf91fb6cdac1) +++ Core/Components/test/Core.Components.DotSpatial.Forms.Test/Core.Components.DotSpatial.Forms.Test.csproj (.../Core.Components.DotSpatial.Forms.Test.csproj) (revision 86b2665e1dd51dc99d33568d1f4206f3da204254) @@ -108,10 +108,18 @@ {9A2D67E6-26AC-4D17-B11A-2B4372F2F572} Core.Common.Controls + + {30E4C2AE-719E-4D70-9FA9-668A9767FBFA} + Core.Common.Gui + {E344867E-9AC9-44C8-88A5-8185681679A9} Core.Common.IO + + {26214BD0-DAFB-4CFC-8EB2-80C5D53C859E} + Core.Common.Gui.TestUtil + {d749ee4c-ce50-4c17-bf01-9a953028c126} Core.Common.TestUtil Index: Core/Components/test/Core.Components.DotSpatial.Forms.Test/Views/WmtsLocationControlTest.cs =================================================================== diff -u -rbe661775ee43fd33d21a2aff0068066a1903954b -r86b2665e1dd51dc99d33568d1f4206f3da204254 --- Core/Components/test/Core.Components.DotSpatial.Forms.Test/Views/WmtsLocationControlTest.cs (.../WmtsLocationControlTest.cs) (revision be661775ee43fd33d21a2aff0068066a1903954b) +++ Core/Components/test/Core.Components.DotSpatial.Forms.Test/Views/WmtsLocationControlTest.cs (.../WmtsLocationControlTest.cs) (revision 86b2665e1dd51dc99d33568d1f4206f3da204254) @@ -22,9 +22,12 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Threading; using System.Windows.Forms; using BruTile; using Core.Common.Controls.DataGrid; +using Core.Common.Gui.Settings; +using Core.Common.Gui.TestUtil.Settings; using Core.Common.TestUtil; using Core.Components.DotSpatial.Forms.Views; using Core.Components.DotSpatial.Layer.BruTile.Configurations; @@ -44,6 +47,8 @@ private const int mapLayerTitleColumnIndex = 2; private const int mapLayerCoordinateSystemColumnIndex = 3; + private static readonly TestDataPath testPath = TestDataPath.Core.Components.DotSpatial.Forms; + [Test] public void Constructor_DefaultValues() { @@ -148,9 +153,16 @@ } [Test] + [Apartment(ApartmentState.STA)] public void WmtsLocationControl_WithData_DataGridViewCorrectlyInitialized() { - // Setup & Call + // Setup + SettingsHelper.Instance = new TestSettingsHelper + { + ExpectedApplicationLocalUserSettingsDirectory = TestHelper.GetTestDataPath(testPath, "noConfig") + }; + + // Call using (WmtsLocationControl control = ShowFullyConfiguredWmtsLocationControl()) { Form form = control.FindForm(); @@ -197,7 +209,13 @@ [Test] public void GetSelectedMapData_WithSelectedComboBoxWithoutSelectedRow_ReturnsNull() { - // Setup & Call + // Setup + SettingsHelper.Instance = new TestSettingsHelper + { + ExpectedApplicationLocalUserSettingsDirectory = TestHelper.GetTestDataPath(testPath, "noConfig") + }; + + // Call using (WmtsLocationControl control = ShowFullyConfiguredWmtsLocationControl()) { // Assert @@ -237,6 +255,11 @@ public void GetSelectedMapData_WithSelectedData_ReturnsSelectedMapData() { // Setup + SettingsHelper.Instance = new TestSettingsHelper + { + ExpectedApplicationLocalUserSettingsDirectory = TestHelper.GetTestDataPath(testPath, "noConfig") + }; + using (WmtsLocationControl control = ShowFullyConfiguredWmtsLocationControl()) { Form form = control.FindForm(); @@ -258,9 +281,49 @@ } [Test] + [Apartment(ApartmentState.STA)] + public void GivenValidWmtsConnectionInfos_WhenConstructed_ThenExpectedProperties() + { + // Given + SettingsHelper.Instance = new TestSettingsHelper + { + ExpectedApplicationVersion = "twoValidWmtsConnectionInfos", + ExpectedApplicationLocalUserSettingsDirectory = TestHelper.GetTestDataPath(testPath) + }; + + // When + using (var control = new WmtsLocationControl()) + using (var form = new Form()) + { + form.Controls.Add(control); + + // Then + var comboBox = (ComboBox) new ComboBoxTester("urlLocationComboBox", form).TheObject; + var dataSource = (List) comboBox.DataSource; + Assert.AreEqual(2, dataSource.Count); + + var firstWmtsConnectionInfo = (WmtsConnectionInfo) comboBox.Items[0]; + Assert.AreEqual("Actueel Hoogtebestand Nederland (AHN1)", firstWmtsConnectionInfo.Name); + Assert.AreEqual("https://geodata.nationaalgeoregister.nl/tiles/service/wmts/ahn1?request=GetCapabilities", + firstWmtsConnectionInfo.Url); + + var secondWmtsConnectionInfo = (WmtsConnectionInfo) comboBox.Items[1]; + Assert.AreEqual("Zeegraskartering", secondWmtsConnectionInfo.Name); + Assert.AreEqual("https://geodata.nationaalgeoregister.nl/zeegraskartering/wfs?request=GetCapabilities", + secondWmtsConnectionInfo.Url); + } + } + + [Test] + [Apartment(ApartmentState.STA)] public void GivenWmtsLocationControlAndAddLocationClicked_WhenDialogCanceled_ThenWmtsLocationsNotUpdated() { // Given + SettingsHelper.Instance = new TestSettingsHelper + { + ExpectedApplicationLocalUserSettingsDirectory = TestHelper.GetTestDataPath(testPath, "noConfig") + }; + DialogBoxHandler = (formName, wnd) => { using (new FormTester(formName)) {} @@ -285,12 +348,18 @@ } [Test] + [Apartment(ApartmentState.STA)] public void GivenWmtsLocationControlAndAddLocationClicked_WhenValidDataInDialog_ThenWmtsLocationsUpdated() { // Given const string name = @"someName"; const string url = @"someUrl"; + SettingsHelper.Instance = new TestSettingsHelper + { + ExpectedApplicationLocalUserSettingsDirectory = TestHelper.GetTestDataPath(testPath, "noConfig") + }; + var mockRepository = new MockRepository(); var tileFactory = mockRepository.StrictMock(); tileFactory.Expect(tf => tf.GetWmtsTileSources(url)).Return(Enumerable.Empty()); @@ -340,9 +409,15 @@ } [Test] + [Apartment(ApartmentState.STA)] public void GivenWmtsLocationControlAndAddLocationClicked_WhenInValidDataInDialog_ThenWmtsLocationsNotUpdated() { // Given + SettingsHelper.Instance = new TestSettingsHelper + { + ExpectedApplicationLocalUserSettingsDirectory = TestHelper.GetTestDataPath(testPath, "noConfig") + }; + DialogBoxHandler = (formName, wnd) => { using (var formTester = new FormTester(formName)) @@ -378,9 +453,15 @@ } [Test] + [Apartment(ApartmentState.STA)] public void GivenWmtsLocationControlAndEditLocationClicked_WhenDialogCanceled_ThenWmtsLocationsNotUpdated() { // Given + SettingsHelper.Instance = new TestSettingsHelper + { + ExpectedApplicationLocalUserSettingsDirectory = TestHelper.GetTestDataPath(testPath, "noConfig") + }; + DialogBoxHandler = (formName, wnd) => { using (new FormTester(formName)) {} @@ -414,12 +495,18 @@ } [Test] + [Apartment(ApartmentState.STA)] public void GivenWmtsLocationControlAndEditLocationClicked_WhenValidDataInDialog_ThenWmtsLocationsUpdated() { // Given const string newName = @"newName"; const string newUrl = @"newUrl"; + SettingsHelper.Instance = new TestSettingsHelper + { + ExpectedApplicationLocalUserSettingsDirectory = TestHelper.GetTestDataPath(testPath, "noConfig") + }; + var mockRepository = new MockRepository(); var tileFactory = mockRepository.StrictMock(); tileFactory.Expect(tf => tf.GetWmtsTileSources(newUrl)).Return(Enumerable.Empty()); @@ -472,9 +559,15 @@ } [Test] + [Apartment(ApartmentState.STA)] public void GivenWmtsLocationControlAndEditLocationClicked_WhenInValidDataInDialog_ThenWmtsLocationsNotUpdated() { // Given + SettingsHelper.Instance = new TestSettingsHelper + { + ExpectedApplicationLocalUserSettingsDirectory = TestHelper.GetTestDataPath(testPath, "noConfig") + }; + DialogBoxHandler = (formName, wnd) => { using (var formTester = new FormTester(formName)) Index: Core/Components/test/Core.Components.DotSpatial.Forms.Test/test-data/twoValidWmtsConnectionInfos/wmtsConnectionInfo.config =================================================================== diff -u --- Core/Components/test/Core.Components.DotSpatial.Forms.Test/test-data/twoValidWmtsConnectionInfos/wmtsConnectionInfo.config (revision 0) +++ Core/Components/test/Core.Components.DotSpatial.Forms.Test/test-data/twoValidWmtsConnectionInfos/wmtsConnectionInfo.config (revision 86b2665e1dd51dc99d33568d1f4206f3da204254) @@ -0,0 +1 @@ +Actueel Hoogtebestand Nederland (AHN1)https://geodata.nationaalgeoregister.nl/tiles/service/wmts/ahn1?request=GetCapabilitiesZeegraskarteringhttps://geodata.nationaalgeoregister.nl/zeegraskartering/wfs?request=GetCapabilities \ No newline at end of file Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/RingtoetsSettingsHelper.cs =================================================================== diff -u -rff47dc9d3989152e8793676ec3e8375fe6e06fd7 -r86b2665e1dd51dc99d33568d1f4206f3da204254 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/RingtoetsSettingsHelper.cs (.../RingtoetsSettingsHelper.cs) (revision ff47dc9d3989152e8793676ec3e8375fe6e06fd7) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/RingtoetsSettingsHelper.cs (.../RingtoetsSettingsHelper.cs) (revision 86b2665e1dd51dc99d33568d1f4206f3da204254) @@ -20,15 +20,27 @@ // All rights reserved. using System; +using System.Collections.Generic; using System.IO; +using Core.Common.Gui.Settings; namespace Ringtoets.Integration.Forms { /// /// Class that defines helper methods related to Ringtoets settings. /// - public static class RingtoetsSettingsHelper + public class RingtoetsSettingsHelper : SettingsHelper { + public override string GetApplicationLocalUserSettingsDirectory(params string[] subPath) + { + var ringtoetsApplicationPath = new List + { + "WTI", "Ringtoets" + }; + ringtoetsApplicationPath.AddRange(subPath); + return base.GetApplicationLocalUserSettingsDirectory(ringtoetsApplicationPath.ToArray()); + } + /// /// Gets the directory of the "NBPW" shape file within the common documents directory. /// Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs =================================================================== diff -u -r8eb717ca45b6518cccfef85e481e0da52ce1df4e -r86b2665e1dd51dc99d33568d1f4206f3da204254 --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision 8eb717ca45b6518cccfef85e481e0da52ce1df4e) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision 86b2665e1dd51dc99d33568d1f4206f3da204254) @@ -34,6 +34,7 @@ using Core.Common.Gui.ContextMenu; using Core.Common.Gui.Forms; using Core.Common.Gui.Plugin; +using Core.Common.Gui.Settings; using Core.Common.IO.Exceptions; using Core.Common.Utils.Extensions; using Core.Components.Gis.Data; @@ -261,6 +262,8 @@ assessmentSectionFromFileCommandHandler = new AssessmentSectionFromFileCommandHandler(Gui.MainWindow, Gui, Gui.DocumentViewController); hydraulicBoundaryLocationCalculationGuiService = new HydraulicBoundaryLocationCalculationGuiService(Gui.MainWindow); + SettingsHelper.Instance = new RingtoetsSettingsHelper(); + ribbonCommandHandler = new RingtoetsRibbon { AddAssessmentSectionButtonCommand = new AddAssessmentSectionCommand(assessmentSectionFromFileCommandHandler) Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/RingtoetsSettingsHelperTest.cs =================================================================== diff -u -r37235d0863116292cc4b095dcf2d19cf6d14c6b2 -r86b2665e1dd51dc99d33568d1f4206f3da204254 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/RingtoetsSettingsHelperTest.cs (.../RingtoetsSettingsHelperTest.cs) (revision 37235d0863116292cc4b095dcf2d19cf6d14c6b2) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/RingtoetsSettingsHelperTest.cs (.../RingtoetsSettingsHelperTest.cs) (revision 86b2665e1dd51dc99d33568d1f4206f3da204254) @@ -21,6 +21,8 @@ using System; using System.IO; +using Core.Common.Gui.Settings; +using Core.Common.TestUtil; using NUnit.Framework; namespace Ringtoets.Integration.Forms.Test @@ -29,6 +31,50 @@ public class RingtoetsSettingsHelperTest { [Test] + public void Constructor_ExpectedProperties() + { + // Call + var settingsHelper = new RingtoetsSettingsHelper(); + + // Assert + Assert.IsInstanceOf(settingsHelper); + } + + [Test] + public void GetApplicationLocalUserSettingsDirectory_WithoutParams_ReturnsExpectedDirectory() + { + // Setup + var settingsHelper = new RingtoetsSettingsHelper(); + + // Call + string ringtoetsLocalApplicationDataPath = settingsHelper.GetApplicationLocalUserSettingsDirectory(); + + // Assert + string localApplicationDataPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); + string expectedPath = Path.Combine(localApplicationDataPath, "WTI", "Ringtoets"); + Assert.AreEqual(expectedPath, ringtoetsLocalApplicationDataPath); + } + + [Test] + public void GetApplicationLocalUserSettingsDirectory_WithParams_ReturnsExpectedDirectory() + { + // Setup + var settingsHelper = new RingtoetsSettingsHelper(); + string localApplicationDataPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); + string rootPath = Path.Combine(localApplicationDataPath, "WTI", "Ringtoets"); + + using (new DirectoryDisposeHelper(rootPath, "subFolder")) + { + // Call + string ringtoetsLocalApplicationDataPath = settingsHelper.GetApplicationLocalUserSettingsDirectory("subFolder", "subSubFolder"); + + // Assert + string expectedPath = Path.Combine(rootPath, "subFolder", "subSubFolder"); + Assert.AreEqual(expectedPath, ringtoetsLocalApplicationDataPath); + } + } + + [Test] public void GetCommonDocumentsRingtoetsDirectory_ReturnsExpectedDirectory() { // Setup Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsPluginTest.cs =================================================================== diff -u -r51ddda3656dd349582d7790169a34080d79da68a -r86b2665e1dd51dc99d33568d1f4206f3da204254 --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsPluginTest.cs (.../RingtoetsPluginTest.cs) (revision 51ddda3656dd349582d7790169a34080d79da68a) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsPluginTest.cs (.../RingtoetsPluginTest.cs) (revision 86b2665e1dd51dc99d33568d1f4206f3da204254) @@ -52,6 +52,7 @@ using Ringtoets.GrassCoverErosionInwards.Forms.PresentationObjects; using Ringtoets.Integration.Data; using Ringtoets.Integration.Data.StandAlone.SectionResults; +using Ringtoets.Integration.Forms; using Ringtoets.Integration.Forms.PresentationObjects; using Ringtoets.Integration.Forms.PropertyClasses; using Ringtoets.Integration.Forms.Views; @@ -526,7 +527,7 @@ [Test] [Apartment(ApartmentState.STA)] // Due to creating fluent Ribbon - public void Activate_WithGui_DoesNotThrowException() + public void Activate_WithGui_ExpectedProperties() { // Setup var mockRepository = new MockRepository(); @@ -544,11 +545,11 @@ plugin.Gui = guiMock; // Call - TestDelegate test = () => plugin.Activate(); + plugin.Activate(); // Assert - Assert.DoesNotThrow(test); Assert.IsInstanceOf(plugin.RibbonCommandHandler); + Assert.IsInstanceOf(SettingsHelper.Instance); } mockRepository.VerifyAll();