Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/AssessmentLevelCalculationData.cs =================================================================== diff -u -r9058670c6059b88f814daea133e3a5aed3117101 -r907f25f4a15204ce1b1ba29d0ada4410d1914930 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/AssessmentLevelCalculationData.cs (.../AssessmentLevelCalculationData.cs) (revision 9058670c6059b88f814daea133e3a5aed3117101) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/AssessmentLevelCalculationData.cs (.../AssessmentLevelCalculationData.cs) (revision 907f25f4a15204ce1b1ba29d0ada4410d1914930) @@ -19,6 +19,8 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using Ringtoets.HydraRing.Calculation.Types; + namespace Ringtoets.HydraRing.Calculation.Data { /// Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/HydraRingCalculationData.cs =================================================================== diff -u -r9058670c6059b88f814daea133e3a5aed3117101 -r907f25f4a15204ce1b1ba29d0ada4410d1914930 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/HydraRingCalculationData.cs (.../HydraRingCalculationData.cs) (revision 9058670c6059b88f814daea133e3a5aed3117101) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/HydraRingCalculationData.cs (.../HydraRingCalculationData.cs) (revision 907f25f4a15204ce1b1ba29d0ada4410d1914930) @@ -19,6 +19,8 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using Ringtoets.HydraRing.Calculation.Types; + namespace Ringtoets.HydraRing.Calculation.Data { /// Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/QVariantCalculationData.cs =================================================================== diff -u -r9058670c6059b88f814daea133e3a5aed3117101 -r907f25f4a15204ce1b1ba29d0ada4410d1914930 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/QVariantCalculationData.cs (.../QVariantCalculationData.cs) (revision 9058670c6059b88f814daea133e3a5aed3117101) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/QVariantCalculationData.cs (.../QVariantCalculationData.cs) (revision 907f25f4a15204ce1b1ba29d0ada4410d1914930) @@ -19,6 +19,8 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using Ringtoets.HydraRing.Calculation.Types; + namespace Ringtoets.HydraRing.Calculation.Data { /// Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/WaveHeightCalculationData.cs =================================================================== diff -u -r9058670c6059b88f814daea133e3a5aed3117101 -r907f25f4a15204ce1b1ba29d0ada4410d1914930 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/WaveHeightCalculationData.cs (.../WaveHeightCalculationData.cs) (revision 9058670c6059b88f814daea133e3a5aed3117101) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/WaveHeightCalculationData.cs (.../WaveHeightCalculationData.cs) (revision 907f25f4a15204ce1b1ba29d0ada4410d1914930) @@ -19,6 +19,8 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using Ringtoets.HydraRing.Calculation.Types; + namespace Ringtoets.HydraRing.Calculation.Data { /// Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/WavePeakPeriodCalculationData.cs =================================================================== diff -u -r9058670c6059b88f814daea133e3a5aed3117101 -r907f25f4a15204ce1b1ba29d0ada4410d1914930 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/WavePeakPeriodCalculationData.cs (.../WavePeakPeriodCalculationData.cs) (revision 9058670c6059b88f814daea133e3a5aed3117101) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/WavePeakPeriodCalculationData.cs (.../WavePeakPeriodCalculationData.cs) (revision 907f25f4a15204ce1b1ba29d0ada4410d1914930) @@ -19,6 +19,8 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using Ringtoets.HydraRing.Calculation.Types; + namespace Ringtoets.HydraRing.Calculation.Data { /// Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/WaveSpectralPeriodCalculationData.cs =================================================================== diff -u -r9058670c6059b88f814daea133e3a5aed3117101 -r907f25f4a15204ce1b1ba29d0ada4410d1914930 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/WaveSpectralPeriodCalculationData.cs (.../WaveSpectralPeriodCalculationData.cs) (revision 9058670c6059b88f814daea133e3a5aed3117101) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/WaveSpectralPeriodCalculationData.cs (.../WaveSpectralPeriodCalculationData.cs) (revision 907f25f4a15204ce1b1ba29d0ada4410d1914930) @@ -19,6 +19,8 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using Ringtoets.HydraRing.Calculation.Types; + namespace Ringtoets.HydraRing.Calculation.Data { /// Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/HydraRingConfiguration.cs =================================================================== diff -u -r23138b2af6c2ccccc60c0e081f398a1c0fdce7af -r907f25f4a15204ce1b1ba29d0ada4410d1914930 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/HydraRingConfiguration.cs (.../HydraRingConfiguration.cs) (revision 23138b2af6c2ccccc60c0e081f398a1c0fdce7af) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/HydraRingConfiguration.cs (.../HydraRingConfiguration.cs) (revision 907f25f4a15204ce1b1ba29d0ada4410d1914930) @@ -25,6 +25,7 @@ using System.Globalization; using System.Linq; using Ringtoets.HydraRing.Calculation.Data; +using Ringtoets.HydraRing.Calculation.Types; namespace Ringtoets.HydraRing.Calculation { @@ -40,7 +41,7 @@ public class HydraRingConfiguration { private readonly IList hydraRingCalculations; - private readonly IEnumerable defaultsPerFailureMechanism; + private readonly IDictionary defaultsPerFailureMechanism; private readonly IEnumerable configurationPerSubMechanism; /// @@ -50,67 +51,97 @@ { hydraRingCalculations = new List(); - defaultsPerFailureMechanism = new[] + defaultsPerFailureMechanism = new Dictionary { - new HydraRingConfigurationDefaults(HydraRingFailureMechanismType.AssessmentLevel, 2, 26, new[] { - 1 - }), - new HydraRingConfigurationDefaults(HydraRingFailureMechanismType.WaveHeight, 2, 28, new[] + HydraRingFailureMechanismType.AssessmentLevel, + new DefaultsPerFailureMechanism(1, 2, 26, new[] + { + 1 + }) + }, { - 11 - }), - new HydraRingConfigurationDefaults(HydraRingFailureMechanismType.WavePeakPeriod, 2, 29, new[] + HydraRingFailureMechanismType.WaveHeight, + new DefaultsPerFailureMechanism(11, 2, 28, new[] + { + 11 + }) + }, { - 14 - }), - new HydraRingConfigurationDefaults(HydraRingFailureMechanismType.WaveSpectralPeriod, 2, 29, new[] + HydraRingFailureMechanismType.WavePeakPeriod, + new DefaultsPerFailureMechanism(11, 2, 29, new[] + { + 14 + }) + }, { - 16 - }), - new HydraRingConfigurationDefaults(HydraRingFailureMechanismType.QVariant, 6, 114, new[] + HydraRingFailureMechanismType.WaveSpectralPeriod, + new DefaultsPerFailureMechanism(11, 2, 29, new[] + { + 16 + }) + }, { - 3, - 4, - 5 - }), - new HydraRingConfigurationDefaults(HydraRingFailureMechanismType.DikesOvertopping, 1, 1, new[] + HydraRingFailureMechanismType.QVariant, + new DefaultsPerFailureMechanism(3, 6, 114, new[] + { + 3, + 4, + 5 + }) + }, { - 102, - 103 - }), - new HydraRingConfigurationDefaults(HydraRingFailureMechanismType.DikesPiping, 1, 44, new[] + HydraRingFailureMechanismType.DikesOvertopping, + new DefaultsPerFailureMechanism(101, 1, 1, new[] + { + 102, + 103 + }) + }, { - 311, - 313, - 314 - }), - new HydraRingConfigurationDefaults(HydraRingFailureMechanismType.StructuresOvertopping, 1, 60, new[] + HydraRingFailureMechanismType.DikesPiping, + new DefaultsPerFailureMechanism(103, 1, 44, new[] + { + 311, + 313, + 314 + }) + }, { - 421, - 422, - 423 - }), - new HydraRingConfigurationDefaults(HydraRingFailureMechanismType.StructuresClosure, 1, 65, new[] + HydraRingFailureMechanismType.StructuresOvertopping, + new DefaultsPerFailureMechanism(110, 1, 60, new[] + { + 421, + 422, + 423 + }) + }, { - 422, - 424, - 425, - 426, - 427 - }), - new HydraRingConfigurationDefaults(HydraRingFailureMechanismType.StructuresStructuralFailure, 1, 65, new[] + HydraRingFailureMechanismType.StructuresClosure, + new DefaultsPerFailureMechanism(111, 1, 65, new[] + { + 422, + 424, + 425, + 426, + 427 + }) + }, { - 422, - 424, - 425, - 430, - 431, - 432, - 433, - 434, - 435 - }) + HydraRingFailureMechanismType.StructuresStructuralFailure, + new DefaultsPerFailureMechanism(112, 1, 65, new[] + { + 422, + 424, + 425, + 430, + 431, + 432, + 433, + 434, + 435 + }) + } }; configurationPerSubMechanism = new[] @@ -788,15 +819,15 @@ foreach (var hydraRingCalculation in hydraRingCalculations) { - var defaultsForFailureMechanism = defaultsPerFailureMechanism.First(cs => cs.FailureMechanismType == hydraRingCalculation.FailureMechanismType); + var defaultsForFailureMechanism = defaultsPerFailureMechanism[hydraRingCalculation.FailureMechanismType]; orderedDictionaries.Add(new OrderedDictionary { { "SectionId", 999 // TODO: Dike section integration }, { - "MechanismId", (int?) hydraRingCalculation.FailureMechanismType + "MechanismId", defaultsForFailureMechanism.MechanismId }, { "LayerId", null // Fixed: no support for revetments @@ -843,7 +874,7 @@ foreach (var hydraRingCalculation in hydraRingCalculations) { - var defaultsForFailureMechanism = defaultsPerFailureMechanism.First(cs => cs.FailureMechanismType == hydraRingCalculation.FailureMechanismType); + var defaultsForFailureMechanism = defaultsPerFailureMechanism[hydraRingCalculation.FailureMechanismType]; foreach (var subMechanimsId in defaultsForFailureMechanism.SubMechanismIds) { @@ -855,7 +886,7 @@ "SectionId", 999 // TODO: Dike section integration }, { - "MechanismId", (int?) hydraRingCalculation.FailureMechanismType + "MechanismId", defaultsForFailureMechanism.MechanismId }, { "LayerId", null // Fixed: no support for revetments @@ -1010,43 +1041,43 @@ # region Nested types /// - /// Container for default Hydra-Ring configuration settings. + /// Container for default Hydra-Ring settings on a per basis. /// - private class HydraRingConfigurationDefaults + private class DefaultsPerFailureMechanism { private readonly int variableId; + private readonly int mechanismId; private readonly int calculationTypeId; private readonly IEnumerable subMechanismIds; - private readonly HydraRingFailureMechanismType hydraRingFailureMechanismType; /// - /// Creates a new instance of the class. + /// Creates a new instance of the class. /// - /// The . + /// The corresponding mechanism id. /// The corresponding calculation type id. /// The corresponding variable id. /// The corresponding sub mechanism ids. - public HydraRingConfigurationDefaults(HydraRingFailureMechanismType hydraRingFailureMechanismType, int calculationTypeId, int variableId, IEnumerable subMechanismIds) + public DefaultsPerFailureMechanism(int mechanismId, int calculationTypeId, int variableId, IEnumerable subMechanismIds) { + this.mechanismId = mechanismId; this.variableId = variableId; this.calculationTypeId = calculationTypeId; this.subMechanismIds = subMechanismIds; - this.hydraRingFailureMechanismType = hydraRingFailureMechanismType; } /// - /// Gets the . + /// Gets the mechanism id that corresponds to a specific . /// - public HydraRingFailureMechanismType FailureMechanismType + public int MechanismId { get { - return hydraRingFailureMechanismType; + return mechanismId; } } /// - /// Gets the calculation type id that is applicable for the specified . + /// Gets the calculation type id that is applicable for a specific . /// public int CalculationTypeId { @@ -1057,7 +1088,7 @@ } /// - /// Gets the id of the variable that is relevant for the specified . + /// Gets the id of the variable that is relevant for a specific . /// public int VariableId { @@ -1068,7 +1099,7 @@ } /// - /// Gets the sub mechanism ids that are applicable for the specified . + /// Gets the sub mechanism ids that are applicable for a specific . /// public IEnumerable SubMechanismIds { Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/HydraRingConfigurationSettings.cs =================================================================== diff -u -r9058670c6059b88f814daea133e3a5aed3117101 -r907f25f4a15204ce1b1ba29d0ada4410d1914930 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/HydraRingConfigurationSettings.cs (.../HydraRingConfigurationSettings.cs) (revision 9058670c6059b88f814daea133e3a5aed3117101) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/HydraRingConfigurationSettings.cs (.../HydraRingConfigurationSettings.cs) (revision 907f25f4a15204ce1b1ba29d0ada4410d1914930) @@ -19,6 +19,8 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using Ringtoets.HydraRing.Calculation.Types; + namespace Ringtoets.HydraRing.Calculation { /// Fisheye: Tag 907f25f4a15204ce1b1ba29d0ada4410d1914930 refers to a dead (removed) revision in file `Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/HydraRingFailureMechanismType.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 907f25f4a15204ce1b1ba29d0ada4410d1914930 refers to a dead (removed) revision in file `Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/HydraRingTimeIntegrationSchemeType.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 907f25f4a15204ce1b1ba29d0ada4410d1914930 refers to a dead (removed) revision in file `Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/HydraRingUncertaintiesType.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Ringtoets.HydraRing.Calculation.csproj =================================================================== diff -u -rf0d1f1efe52ed4296368790158e28aea91393cc8 -r907f25f4a15204ce1b1ba29d0ada4410d1914930 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Ringtoets.HydraRing.Calculation.csproj (.../Ringtoets.HydraRing.Calculation.csproj) (revision f0d1f1efe52ed4296368790158e28aea91393cc8) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Ringtoets.HydraRing.Calculation.csproj (.../Ringtoets.HydraRing.Calculation.csproj) (revision 907f25f4a15204ce1b1ba29d0ada4410d1914930) @@ -41,13 +41,13 @@ - + - - + + Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Types/HydraRingFailureMechanismType.cs =================================================================== diff -u --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Types/HydraRingFailureMechanismType.cs (revision 0) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Types/HydraRingFailureMechanismType.cs (revision 907f25f4a15204ce1b1ba29d0ada4410d1914930) @@ -0,0 +1,43 @@ +// 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. + +namespace Ringtoets.HydraRing.Calculation.Types +{ + /// + /// Enumeration that defines the failure mechanism types supported by Hydra-Ring. + /// + /// + /// The integer values DON'T correspond to failure mechanism ids defined within Hydra-Ring. + /// + public enum HydraRingFailureMechanismType + { + AssessmentLevel, + QVariant, + WaveHeight, + WavePeakPeriod, + WaveSpectralPeriod, + DikesOvertopping, + DikesPiping, + StructuresOvertopping, + StructuresClosure, + StructuresStructuralFailure + } +} \ No newline at end of file Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Types/HydraRingTimeIntegrationSchemeType.cs =================================================================== diff -u --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Types/HydraRingTimeIntegrationSchemeType.cs (revision 0) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Types/HydraRingTimeIntegrationSchemeType.cs (revision 907f25f4a15204ce1b1ba29d0ada4410d1914930) @@ -0,0 +1,36 @@ +// 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. + +namespace Ringtoets.HydraRing.Calculation.Types +{ + /// + /// Enumeration that defines the time integration scheme types supported by Hydra-Ring. + /// + /// + /// The integer values correspond to time integration scheme ids defined within Hydra-Ring. + /// + public enum HydraRingTimeIntegrationSchemeType + { + FBC = 1, + APT = 2, + NTI = 3 + } +} \ No newline at end of file Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Types/HydraRingUncertaintiesType.cs =================================================================== diff -u --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Types/HydraRingUncertaintiesType.cs (revision 0) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Types/HydraRingUncertaintiesType.cs (revision 907f25f4a15204ce1b1ba29d0ada4410d1914930) @@ -0,0 +1,37 @@ +// 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. + +namespace Ringtoets.HydraRing.Calculation.Types +{ + /// + /// Enumeration that defines the uncertainties types supported by Hydra-Ring. + /// + /// + /// The integer values correspond to uncertainties ids defined within Hydra-Ring. + /// + public enum HydraRingUncertaintiesType + { + None = 0, // "No uncertainties" + All = 1, // "All uncertainties" + Model = 2, // "Only model uncertainties" + Statistic = 3 // "Only statistical uncertainties" + } +} \ No newline at end of file Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/HydraRingConfigurationTest.cs =================================================================== diff -u -r9058670c6059b88f814daea133e3a5aed3117101 -r907f25f4a15204ce1b1ba29d0ada4410d1914930 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/HydraRingConfigurationTest.cs (.../HydraRingConfigurationTest.cs) (revision 9058670c6059b88f814daea133e3a5aed3117101) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/HydraRingConfigurationTest.cs (.../HydraRingConfigurationTest.cs) (revision 907f25f4a15204ce1b1ba29d0ada4410d1914930) @@ -22,7 +22,7 @@ using System; using NUnit.Framework; using Ringtoets.HydraRing.Calculation.Data; -using Ringtoets.HydraRing.Data; +using Ringtoets.HydraRing.Calculation.Types; namespace Ringtoets.HydraRing.Calculation.Test { Fisheye: Tag 907f25f4a15204ce1b1ba29d0ada4410d1914930 refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/HydraRingFailureMechanismTypeTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 907f25f4a15204ce1b1ba29d0ada4410d1914930 refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/HydraRingTimeIntegrationSchemeTypeTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 907f25f4a15204ce1b1ba29d0ada4410d1914930 refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/HydraRingUncertaintiesTypeTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Ringtoets.HydraRing.Calculation.Test.csproj =================================================================== diff -u -r9e196d166be69221bf9cc0285136d20a7310fac8 -r907f25f4a15204ce1b1ba29d0ada4410d1914930 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Ringtoets.HydraRing.Calculation.Test.csproj (.../Ringtoets.HydraRing.Calculation.Test.csproj) (revision 9e196d166be69221bf9cc0285136d20a7310fac8) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Ringtoets.HydraRing.Calculation.Test.csproj (.../Ringtoets.HydraRing.Calculation.Test.csproj) (revision 907f25f4a15204ce1b1ba29d0ada4410d1914930) @@ -49,10 +49,10 @@ - + - - + + Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Types/HydraRingFailureMechanismTypeTest.cs =================================================================== diff -u --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Types/HydraRingFailureMechanismTypeTest.cs (revision 0) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Types/HydraRingFailureMechanismTypeTest.cs (revision 907f25f4a15204ce1b1ba29d0ada4410d1914930) @@ -0,0 +1,37 @@ +// 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; +using Ringtoets.HydraRing.Calculation.Types; + +namespace Ringtoets.HydraRing.Calculation.Test.Types +{ + [TestFixture] + public class HydraRingFailureMechanismTypeTest + { + [Test] + public void Values_HasTen() + { + Assert.AreEqual(10, Enum.GetValues(typeof(HydraRingFailureMechanismType)).Length); + } + } +} Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Types/HydraRingTimeIntegrationSchemeTypeTest.cs =================================================================== diff -u --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Types/HydraRingTimeIntegrationSchemeTypeTest.cs (revision 0) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Types/HydraRingTimeIntegrationSchemeTypeTest.cs (revision 907f25f4a15204ce1b1ba29d0ada4410d1914930) @@ -0,0 +1,45 @@ +// 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; +using Ringtoets.HydraRing.Calculation.Types; + +namespace Ringtoets.HydraRing.Calculation.Test.Types +{ + [TestFixture] + public class HydraRingTimeIntegrationSchemeTypeTest + { + [Test] + public void Values_HasThree() + { + Assert.AreEqual(3, Enum.GetValues(typeof(HydraRingTimeIntegrationSchemeType)).Length); + } + + [Test] + public void ConvertToInteger_ForAllValues_ReturnsExpectedInteger() + { + Assert.AreEqual(1, (int) HydraRingTimeIntegrationSchemeType.FBC); + Assert.AreEqual(2, (int) HydraRingTimeIntegrationSchemeType.APT); + Assert.AreEqual(3, (int) HydraRingTimeIntegrationSchemeType.NTI); + } + } +} Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Types/HydraRingUncertaintiesTypeTest.cs =================================================================== diff -u --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Types/HydraRingUncertaintiesTypeTest.cs (revision 0) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Types/HydraRingUncertaintiesTypeTest.cs (revision 907f25f4a15204ce1b1ba29d0ada4410d1914930) @@ -0,0 +1,46 @@ +// 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; +using Ringtoets.HydraRing.Calculation.Types; + +namespace Ringtoets.HydraRing.Calculation.Test.Types +{ + [TestFixture] + public class HydraRingUncertaintiesTypeTest + { + [Test] + public void Values_HasFour() + { + Assert.AreEqual(4, Enum.GetValues(typeof(HydraRingUncertaintiesType)).Length); + } + + [Test] + public void ConvertToInteger_ForAllValues_ReturnsExpectedInteger() + { + Assert.AreEqual(0, (int) HydraRingUncertaintiesType.None); + Assert.AreEqual(1, (int) HydraRingUncertaintiesType.All); + Assert.AreEqual(2, (int) HydraRingUncertaintiesType.Model); + Assert.AreEqual(3, (int) HydraRingUncertaintiesType.Statistic); + } + } +}