Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/HydraRingConfiguration.cs =================================================================== diff -u -ra100e8bcc81a29215449021e58dd25ab79e27718 -rf8d4623fffb36e31e3de990c3b125c6e42049b67 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/HydraRingConfiguration.cs (.../HydraRingConfiguration.cs) (revision a100e8bcc81a29215449021e58dd25ab79e27718) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/HydraRingConfiguration.cs (.../HydraRingConfiguration.cs) (revision f8d4623fffb36e31e3de990c3b125c6e42049b67) @@ -32,11 +32,25 @@ public class HydraRingConfiguration { /// - /// Gets or sets the . + /// Creates a new instance of the class. /// - public TimeIntegrationScheme TimeIntegrationScheme { get; set; } + public HydraRingConfiguration() + { + TimeIntegrationSchemeType = TimeIntegrationSchemeType.Undefined; + UncertaintiesType = UncertaintiesType.Undefined; + } /// + /// Gets or sets the . + /// + public TimeIntegrationSchemeType TimeIntegrationSchemeType { get; set; } + + /// + /// Gets or sets the . + /// + public UncertaintiesType UncertaintiesType { get; set; } + + /// /// Generates a database creation script that can be used to perform a Hydra-Ring calculation. /// /// The database creation script. @@ -56,10 +70,10 @@ new OrderedDictionary { { - "TimeIntegrationSchemeID", TimeIntegrationScheme != TimeIntegrationScheme.None ? (int?) TimeIntegrationScheme : null + "TimeIntegrationSchemeID", TimeIntegrationSchemeType != TimeIntegrationSchemeType.Undefined ? (int?) TimeIntegrationSchemeType : null }, { - "UncertaintiesID", null // Model property: HydraulicModelsUncertaintiesId + "UncertaintiesID", UncertaintiesType != UncertaintiesType.Undefined ? (int?) UncertaintiesType : null }, { "DataSetName", "WTI 2017" Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Ringtoets.HydraRing.Calculation.csproj =================================================================== diff -u -ra100e8bcc81a29215449021e58dd25ab79e27718 -rf8d4623fffb36e31e3de990c3b125c6e42049b67 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Ringtoets.HydraRing.Calculation.csproj (.../Ringtoets.HydraRing.Calculation.csproj) (revision a100e8bcc81a29215449021e58dd25ab79e27718) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Ringtoets.HydraRing.Calculation.csproj (.../Ringtoets.HydraRing.Calculation.csproj) (revision f8d4623fffb36e31e3de990c3b125c6e42049b67) @@ -41,7 +41,8 @@ - + + Fisheye: Tag f8d4623fffb36e31e3de990c3b125c6e42049b67 refers to a dead (removed) revision in file `Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/TimeIntegrationScheme.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/TimeIntegrationSchemeType.cs =================================================================== diff -u --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/TimeIntegrationSchemeType.cs (revision 0) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/TimeIntegrationSchemeType.cs (revision f8d4623fffb36e31e3de990c3b125c6e42049b67) @@ -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 +{ + /// + /// Enumeration that defines the possible time integration schemes. + /// + /// + /// Except for , the integer values correspond to time integration scheme ids defined by Hydra-Ring. + /// + public enum TimeIntegrationSchemeType + { + Undefined = -1, + FBC = 1, + APT = 2, + NTI = 3 + } +} Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/UncertaintiesType.cs =================================================================== diff -u --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/UncertaintiesType.cs (revision 0) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/UncertaintiesType.cs (revision f8d4623fffb36e31e3de990c3b125c6e42049b67) @@ -0,0 +1,38 @@ +// 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 +{ + /// + /// Enumeration that defines the possible uncertainties types. + /// + /// + /// Except for , the integer values correspond to uncertainties type ids defined by Hydra-Ring. + /// + public enum UncertaintiesType + { + Undefined = -1, + None = 0, // "Geen onzekerheden" + All = 1, // "Alle onzekerheden" + Model = 2, // "Model onzekerheden" + Statistic = 3 // "Statistische onzekerheden" + } +} Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/HydraRingConfigurationTest.cs =================================================================== diff -u -ra100e8bcc81a29215449021e58dd25ab79e27718 -rf8d4623fffb36e31e3de990c3b125c6e42049b67 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/HydraRingConfigurationTest.cs (.../HydraRingConfigurationTest.cs) (revision a100e8bcc81a29215449021e58dd25ab79e27718) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/HydraRingConfigurationTest.cs (.../HydraRingConfigurationTest.cs) (revision f8d4623fffb36e31e3de990c3b125c6e42049b67) @@ -44,11 +44,12 @@ { var hydraRingConfiguration = new HydraRingConfiguration { - TimeIntegrationScheme = TimeIntegrationScheme.NTI + TimeIntegrationSchemeType = TimeIntegrationSchemeType.NTI, + UncertaintiesType = UncertaintiesType.Model }; var expectedCreationScript = "DELETE FROM [HydraulicModels];" + Environment.NewLine + - "INSERT INTO [HydraulicModels] VALUES (" + (int) TimeIntegrationScheme.NTI + ", NULL, 'WTI 2017');" + Environment.NewLine; + "INSERT INTO [HydraulicModels] VALUES (" + (int) TimeIntegrationSchemeType.NTI + ", " + (int) UncertaintiesType.Model + ", 'WTI 2017');" + Environment.NewLine; var creationScript = hydraRingConfiguration.GenerateDataBaseCreationScript(); Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Ringtoets.HydraRing.Calculation.Test.csproj =================================================================== diff -u -ra100e8bcc81a29215449021e58dd25ab79e27718 -rf8d4623fffb36e31e3de990c3b125c6e42049b67 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Ringtoets.HydraRing.Calculation.Test.csproj (.../Ringtoets.HydraRing.Calculation.Test.csproj) (revision a100e8bcc81a29215449021e58dd25ab79e27718) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Ringtoets.HydraRing.Calculation.Test.csproj (.../Ringtoets.HydraRing.Calculation.Test.csproj) (revision f8d4623fffb36e31e3de990c3b125c6e42049b67) @@ -41,7 +41,8 @@ - + + Fisheye: Tag f8d4623fffb36e31e3de990c3b125c6e42049b67 refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/TimeIntegrationSchemeTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/TimeIntegrationSchemeTypeTest.cs =================================================================== diff -u --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/TimeIntegrationSchemeTypeTest.cs (revision 0) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/TimeIntegrationSchemeTypeTest.cs (revision f8d4623fffb36e31e3de990c3b125c6e42049b67) @@ -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; + +namespace Ringtoets.HydraRing.Calculation.Test +{ + [TestFixture] + public class TimeIntegrationSchemeTypeTest + { + [Test] + public void Values_HasFour() + { + Assert.AreEqual(4, Enum.GetValues(typeof(TimeIntegrationSchemeType)).Length); + } + + [Test] + public void ConvertToInteger_ForAllValues_ReturnsExpectedInteger() + { + Assert.AreEqual(-1, (int) TimeIntegrationSchemeType.Undefined); + Assert.AreEqual(1, (int) TimeIntegrationSchemeType.FBC); + Assert.AreEqual(2, (int) TimeIntegrationSchemeType.APT); + Assert.AreEqual(3, (int) TimeIntegrationSchemeType.NTI); + } + } +} Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/UncertaintiesTypeTest.cs =================================================================== diff -u --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/UncertaintiesTypeTest.cs (revision 0) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/UncertaintiesTypeTest.cs (revision f8d4623fffb36e31e3de990c3b125c6e42049b67) @@ -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; + +namespace Ringtoets.HydraRing.Calculation.Test +{ + [TestFixture] + public class UncertaintiesTypeTest + { + [Test] + public void Values_HasFive() + { + Assert.AreEqual(5, Enum.GetValues(typeof(UncertaintiesType)).Length); + } + + [Test] + public void ConvertToInteger_ForAllValues_ReturnsExpectedInteger() + { + Assert.AreEqual(-1, (int) UncertaintiesType.Undefined); + Assert.AreEqual(0, (int) UncertaintiesType.None); + Assert.AreEqual(1, (int) UncertaintiesType.All); + Assert.AreEqual(2, (int) UncertaintiesType.Model); + Assert.AreEqual(3, (int) UncertaintiesType.Statistic); + } + } +}