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