Index: Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/BreakWaterTypeHelperTest.cs =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/BreakWaterTypeHelperTest.cs (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/BreakWaterTypeHelperTest.cs (revision 3e308fc0e45b85abaf45888468beed0c5c3c22c0) @@ -0,0 +1,45 @@ +// Copyright (C) Stichting Deltares 2017. 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 NUnit.Framework; +using Ringtoets.Common.Data.DikeProfiles; + +namespace Ringtoets.Common.Service.TestUtil.Test +{ + [TestFixture] + public class BreakWaterTypeHelperTest + { + [Test] + [TestCase((BreakWaterType) 0, 0)] + [TestCase(BreakWaterType.Caisson, 1)] + [TestCase(BreakWaterType.Wall, 2)] + [TestCase(BreakWaterType.Dam, 3)] + [TestCase((BreakWaterType) 99, 0)] + public void GetHydraRingBreakWaterType(BreakWaterType breakWaterType, int expectedBreakWaterType) + { + // Call + int actualBreakWaterType = BreakWaterTypeHelper.GetHydraRingBreakWaterType(breakWaterType); + + // Assert + Assert.AreEqual(expectedBreakWaterType, actualBreakWaterType); + } + } +} \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/Ringtoets.Common.Service.TestUtil.Test.csproj =================================================================== diff -u -r04f5526f955c773d4987e820e2aca2614dfbd8d8 -r3e308fc0e45b85abaf45888468beed0c5c3c22c0 --- Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/Ringtoets.Common.Service.TestUtil.Test.csproj (.../Ringtoets.Common.Service.TestUtil.Test.csproj) (revision 04f5526f955c773d4987e820e2aca2614dfbd8d8) +++ Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil.Test/Ringtoets.Common.Service.TestUtil.Test.csproj (.../Ringtoets.Common.Service.TestUtil.Test.csproj) (revision 3e308fc0e45b85abaf45888468beed0c5c3c22c0) @@ -46,6 +46,7 @@ Properties\GlobalAssembly.cs + Index: Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil/BreakWaterTypeHelper.cs =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil/BreakWaterTypeHelper.cs (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil/BreakWaterTypeHelper.cs (revision 3e308fc0e45b85abaf45888468beed0c5c3c22c0) @@ -0,0 +1,51 @@ +// Copyright (C) Stichting Deltares 2017. 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 Ringtoets.Common.Data.DikeProfiles; + +namespace Ringtoets.Common.Service.TestUtil +{ + /// + /// A helper to be used while asserting Hydra-Ring break water types. + /// + public static class BreakWaterTypeHelper + { + /// + /// Gets the Hydra-Ring integer value corresponding to . + /// + /// The to get the Hydra-Ring value for. + /// A Hydra-Ring specific integer value. + public static int GetHydraRingBreakWaterType(BreakWaterType type) + { + switch (type) + { + case BreakWaterType.Caisson: + return 1; + case BreakWaterType.Wall: + return 2; + case BreakWaterType.Dam: + return 3; + default: + return 0; + } + } + } +} \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil/Ringtoets.Common.Service.TestUtil.csproj =================================================================== diff -u -r04f5526f955c773d4987e820e2aca2614dfbd8d8 -r3e308fc0e45b85abaf45888468beed0c5c3c22c0 --- Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil/Ringtoets.Common.Service.TestUtil.csproj (.../Ringtoets.Common.Service.TestUtil.csproj) (revision 04f5526f955c773d4987e820e2aca2614dfbd8d8) +++ Ringtoets/Common/test/Ringtoets.Common.Service.TestUtil/Ringtoets.Common.Service.TestUtil.csproj (.../Ringtoets.Common.Service.TestUtil.csproj) (revision 3e308fc0e45b85abaf45888468beed0c5c3c22c0) @@ -46,6 +46,7 @@ Properties\GlobalAssembly.cs +