Index: Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/DesignWaterLevelCalculationServiceConfigTest.cs =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/DesignWaterLevelCalculationServiceConfigTest.cs (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/DesignWaterLevelCalculationServiceConfigTest.cs (revision c6176d50a690c3ff5ee1c4b2902dcabc2e270201) @@ -0,0 +1,65 @@ +// 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 System; +using NUnit.Framework; + +namespace Ringtoets.Common.Service.TestUtil.Test +{ + [TestFixture] + public class DesignWaterLevelCalculationServiceConfigTest + { + [Test] + public void Constructor_NewInstanceCanBeDisposed() + { + // Call + var service = new DesignWaterLevelCalculationServiceConfig(); + + // Assert + Assert.IsInstanceOf(service); + Assert.DoesNotThrow(() => service.Dispose()); + } + + [Test] + public void Constructor_SetsTestWaveConditionsCalculationService() + { + // Call + using (new DesignWaterLevelCalculationServiceConfig()) + { + // Assert + Assert.IsInstanceOf(DesignWaterLevelCalculationService.Instance); + } + } + + [Test] + public void Dispose_Always_ResetsDesignWaterLevelCalculationServiceToPreviousValue() + { + // Setup + var expectedService = DesignWaterLevelCalculationService.Instance; + + // Call + using (new DesignWaterLevelCalculationServiceConfig()) {} + + // Assert + Assert.AreSame(expectedService, DesignWaterLevelCalculationService.Instance); + } + } +} \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/Ringtoets.Common.Service.TestUtil.Test.csproj =================================================================== diff -u -rd9fc827247231ca9d40e18e9f989a8bd978cb53b -rc6176d50a690c3ff5ee1c4b2902dcabc2e270201 --- Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/Ringtoets.Common.Service.TestUtil.Test.csproj (.../Ringtoets.Common.Service.TestUtil.Test.csproj) (revision d9fc827247231ca9d40e18e9f989a8bd978cb53b) +++ Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/Ringtoets.Common.Service.TestUtil.Test.csproj (.../Ringtoets.Common.Service.TestUtil.Test.csproj) (revision c6176d50a690c3ff5ee1c4b2902dcabc2e270201) @@ -39,20 +39,57 @@ MinimumRecommendedRules.ruleset + + ..\..\..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll + True + + + ..\..\..\..\packages\RhinoMocks.3.6.1\lib\net\Rhino.Mocks.dll + True + Properties\GlobalAssembly.cs + + Copying.licenseheader + + + + {3bbfd65b-b277-4e50-ae6d-bd24c3434609} + Core.Common.Base + + + {F49BD8B2-332A-4C91-A196-8CCE0A2C7D98} + Core.Common.Utils + + + {888d4097-8bc2-4703-9fb1-8744c94d525e} + Ringtoets.HydraRing.Calculation + + + {70F8CC9C-5BC8-4FB2-B201-EAE7FA8088C2} + Ringtoets.HydraRing.Data + + + {D951D6DA-FE83-4920-9FDB-63BF96480B54} + Ringtoets.Common.Service + + + {73E7E100-C015-4874-A548-AD6E33E7955E} + Ringtoets.Common.Service.TestUtil + + + + + \ No newline at end of file Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Service.TestUtil.Test/WaveConditionsCalculationServiceConfigTest.cs =================================================================== diff -u -r5b3041efe0fd2d334984d6c730815242b30229aa -rc6176d50a690c3ff5ee1c4b2902dcabc2e270201 --- Ringtoets/Revetment/test/Ringtoets.Revetment.Service.TestUtil.Test/WaveConditionsCalculationServiceConfigTest.cs (.../WaveConditionsCalculationServiceConfigTest.cs) (revision 5b3041efe0fd2d334984d6c730815242b30229aa) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.Service.TestUtil.Test/WaveConditionsCalculationServiceConfigTest.cs (.../WaveConditionsCalculationServiceConfigTest.cs) (revision c6176d50a690c3ff5ee1c4b2902dcabc2e270201) @@ -39,7 +39,7 @@ } [Test] - public void Constructor_SetsTestFactoryForPipingCalculatorService() + public void Constructor_SetsTestWaveConditionsCalculationService() { // Call using (new WaveConditionsCalculationServiceConfig()) @@ -50,7 +50,7 @@ } [Test] - public void Dispose_Always_ResetsFactoryToPreviousValue() + public void Dispose_Always_ResetsWaveConditionsCalculationServiceToPreviousValue() { // Setup var expectedService = WaveConditionsCalculationService.Instance;