Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Defaults/FailureMechanismDefaults.cs =================================================================== diff -u -r425779031697be07adab6d24fe422c97898f73a2 -rc7843d3b8c846c4aab66ba32e67f883b6555932b --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Defaults/FailureMechanismDefaults.cs (.../FailureMechanismDefaults.cs) (revision 425779031697be07adab6d24fe422c97898f73a2) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Defaults/FailureMechanismDefaults.cs (.../FailureMechanismDefaults.cs) (revision c7843d3b8c846c4aab66ba32e67f883b6555932b) @@ -30,15 +30,15 @@ { private readonly int mechanismId; private readonly IEnumerable subMechanismIds; - private readonly double faultTreeModelId; + private readonly int faultTreeModelId; /// /// Creates a new instance of the class. /// /// The mechanism id. /// The sub mechanism ids that are applicable. /// The fault tree model id. - public FailureMechanismDefaults(int mechanismId, IEnumerable subMechanismIds, double faultTreeModelId) + public FailureMechanismDefaults(int mechanismId, IEnumerable subMechanismIds, int faultTreeModelId) { this.mechanismId = mechanismId; this.subMechanismIds = subMechanismIds; @@ -70,7 +70,7 @@ /// /// Gets the fault tree model id. /// - public double FaultTreeModelId + public int FaultTreeModelId { get { Fisheye: Tag c7843d3b8c846c4aab66ba32e67f883b6555932b refers to a dead (removed) revision in file `Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Settings/DesignTableSettings.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Settings/DesignTablesSetting.cs =================================================================== diff -u --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Settings/DesignTablesSetting.cs (revision 0) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Settings/DesignTablesSetting.cs (revision c7843d3b8c846c4aab66ba32e67f883b6555932b) @@ -0,0 +1,67 @@ +// 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.Data.Settings +{ + /// + /// Container for design tables settings. + /// + internal class DesignTablesSetting + { + private readonly double valueMin; + private readonly double valueMax; + + /// + /// Creates a new instance of the class. + /// + /// The minimum value to use while iterating to a target probability. + /// The maximum value to use while iterating to a target probability. + public DesignTablesSetting(double valueMin, double valueMax) + { + this.valueMin = valueMin; + this.valueMax = valueMax; + } + + /// + /// Gets the minimum value to use while iterating to a target probability. + /// + /// This property is only applicable in case of type II computations. + public double ValueMin + { + get + { + return valueMin; + } + } + + /// + /// Gets the maximum value to use while iterating to a target probability. + /// + /// This property is only applicable in case of type II computations. + public double ValueMax + { + get + { + return valueMax; + } + } + } +} \ No newline at end of file Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Settings/NumericsSetting.cs =================================================================== diff -u --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Settings/NumericsSetting.cs (revision 0) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Settings/NumericsSetting.cs (revision c7843d3b8c846c4aab66ba32e67f883b6555932b) @@ -0,0 +1,239 @@ +// 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.Data.Settings +{ + /// + /// Container for numerics settings. + /// + internal class NumericsSetting + { + private readonly int calculationTechniqueId; + private readonly int formStartMethod; + private readonly int formNumberOfIterations; + private readonly double formRelaxationFactor; + private readonly double formEpsBeta; + private readonly double formEpsHoh; + private readonly double formEpsZFunc; + private readonly int dsStartMethod; + private readonly int dsMinNumberOfIterations; + private readonly int dsMaxNumberOfIterations; + private readonly double dsVarCoefficient; + private readonly double niUMin; + private readonly double niUMax; + private readonly int niNumberSteps; + + /// + /// Creates a new instance of the class. + /// + /// The id of the calculation technique that should be used. + /// The FORM start method. + /// The maximum number of FORM iterations to perform. + /// A relaxation towards the design point for FORM. + /// One of the three convergence criteria for FORM. + /// One of the three convergence criteria for FORM. + /// One of the three convergence criteria for FORM. + /// The DIRS start method. + /// The minimum number of DIRS iterations to perform. + /// The maximum number of DIRS iterations to perform. + /// The variation coefficient to use within the DIRS iterations. + /// The lower size limit of a uniform grid deployed by NINT. + /// The upper size limit of a uniform grid deployed by NINT. + /// The number of steps between and for NINT + public NumericsSetting(int calculationTechniqueId, int formStartMethod, int formNumberOfIterations, double formRelaxationFactor, double formEpsBeta, double formEpsHoh, double formEpsZFunc, int dsStartMethod, int dsMinNumberOfIterations, int dsMaxNumberOfIterations, double dsVarCoefficient, double niUMin, double niUMax, int niNumberSteps) + { + this.calculationTechniqueId = calculationTechniqueId; + this.formStartMethod = formStartMethod; + this.formNumberOfIterations = formNumberOfIterations; + this.formRelaxationFactor = formRelaxationFactor; + this.formEpsBeta = formEpsBeta; + this.formEpsHoh = formEpsHoh; + this.formEpsZFunc = formEpsZFunc; + this.dsStartMethod = dsStartMethod; + this.dsMinNumberOfIterations = dsMinNumberOfIterations; + this.dsMaxNumberOfIterations = dsMaxNumberOfIterations; + this.dsVarCoefficient = dsVarCoefficient; + this.niUMin = niUMin; + this.niUMax = niUMax; + this.niNumberSteps = niNumberSteps; + } + + /// + /// Gets the id of the calculation technique that should be used. + /// + public int CalculationTechniqueId + { + get + { + return calculationTechniqueId; + } + } + + /// + /// Gets the FORM start method. + /// + public int FormStartMethod + { + get + { + return formStartMethod; + } + } + + /// + /// Gets the maximum number of FORM iterations to perform. + /// + public int FormNumberOfIterations + { + get + { + return formNumberOfIterations; + } + } + + /// + /// Gets a relaxation towards the design point for FORM. + /// + public double FormRelaxationFactor + { + get + { + return formRelaxationFactor; + } + } + + /// + /// Gets one of the three convergence criteria for FORM. + /// + /// + /// + public double FormEpsBeta + { + get + { + return formEpsBeta; + } + } + + /// + /// Gets one of the three convergence criteria for FORM. + /// + /// + /// + public double FormEpsHoh + { + get + { + return formEpsHoh; + } + } + + /// + /// Gets one of the three convergence criteria for FORM. + /// + /// + /// + public double FormEpsZFunc + { + get + { + return formEpsZFunc; + } + } + + /// + /// Gets the DIRS start method. + /// + public int DsStartMethod + { + get + { + return dsStartMethod; + } + } + + /// + /// Gets the minimum number of DIRS iterations to perform. + /// + public int DsMinNumberOfIterations + { + get + { + return dsMinNumberOfIterations; + } + } + + /// + /// Gets the maximum number of DIRS iterations to perform. + /// + public int DsMaxNumberOfIterations + { + get + { + return dsMaxNumberOfIterations; + } + } + + /// + /// Gets the variation coefficient to use within the DIRS iterations. + /// + public double DsVarCoefficient + { + get + { + return dsVarCoefficient; + } + } + + /// + /// Gets the lower size limit of a uniform grid deployed by NINT. + /// + public double NiUMin + { + get + { + return niUMin; + } + } + + /// + /// Gets the upper size limit of a uniform grid deployed by NINT. + /// + public double NiUMax + { + get + { + return niUMax; + } + } + + /// + /// Gets the number of steps between and for NINT. + /// + public int NiNumberSteps + { + get + { + return niNumberSteps; + } + } + } +} \ No newline at end of file Fisheye: Tag c7843d3b8c846c4aab66ba32e67f883b6555932b refers to a dead (removed) revision in file `Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Settings/NumericsSettings.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c7843d3b8c846c4aab66ba32e67f883b6555932b refers to a dead (removed) revision in file `Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/IO/DesignTableSettingsCsvReader.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/IO/DesignTablesSettingsCsvReader.cs =================================================================== diff -u --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/IO/DesignTablesSettingsCsvReader.cs (revision 0) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/IO/DesignTablesSettingsCsvReader.cs (revision c7843d3b8c846c4aab66ba32e67f883b6555932b) @@ -0,0 +1,134 @@ +// 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 System.Collections.Generic; +using Ringtoets.HydraRing.Calculation.Data; +using Ringtoets.HydraRing.Calculation.Data.Settings; + +namespace Ringtoets.HydraRing.Calculation.IO +{ + /// + /// The reader for in csv format. + /// + internal class DesignTablesSettingsCsvReader : HydraRingSettingsCsvReader>> + { + private readonly Dictionary columns = new Dictionary + { + { + ringIdKey, 0 + }, + { + variableKey, 1 + }, + { + minKey, 2 + }, + { + maxKey, 3 + } + }; + + private readonly Dictionary failureMechanismTypes = new Dictionary + { + { + assessmentLevelKey, HydraRingFailureMechanismType.AssessmentLevel + }, + { + waveHeightKey, HydraRingFailureMechanismType.WaveHeight + }, + { + wavePeakPeriodKey, HydraRingFailureMechanismType.WavePeakPeriod + }, + { + waveSpectralPeriodKey, HydraRingFailureMechanismType.WaveSpectralPeriod + }, + { + qVariantKey, HydraRingFailureMechanismType.QVariant + }, + { + dikeHeightKey, HydraRingFailureMechanismType.DikesHeight + } + }; + + /// + /// Creates a new instance of . + /// + /// The fileContents to read. + /// Thrown when is not set. + public DesignTablesSettingsCsvReader(string fileContents) + : base(fileContents, new Dictionary>()) {} + + protected override void CreateSetting(IList line) + { + // Get failure mechanism + var failureMechanismType = GetFailureMechanismType(line); + + if (!Settings.ContainsKey(failureMechanismType)) + { + Settings.Add(failureMechanismType, new Dictionary()); + } + + // Get TrajectId + var ringId = GetRingId(line); + if (!Settings[failureMechanismType].ContainsKey(ringId)) + { + Settings[failureMechanismType].Add(ringId, GetDesignTablesSettings(line)); + } + } + + private HydraRingFailureMechanismType GetFailureMechanismType(IList line) + { + return failureMechanismTypes[GetStringValueFromElement(line[columns[variableKey]])]; + } + + private string GetRingId(IList line) + { + return GetStringValueFromElement(line[columns[ringIdKey]]); + } + + private DesignTablesSetting GetDesignTablesSettings(IList line) + { + return new DesignTablesSetting(GetIntValueFromElement(line[columns[minKey]]), + GetIntValueFromElement(line[columns[maxKey]])); + } + + #region Csv column names + + private const string ringIdKey = "TrajectID"; + private const string variableKey = "Variable"; + private const string minKey = "Min"; + private const string maxKey = "Max"; + + #endregion + + #region Variable names + + private const string assessmentLevelKey = "Toetspeil"; + private const string waveHeightKey = "Hs"; + private const string wavePeakPeriodKey = "Tp"; + private const string waveSpectralPeriodKey = "Tm-1,0"; + private const string qVariantKey = "Q"; + private const string dikeHeightKey = "HBN"; + + #endregion + } +} \ No newline at end of file Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/IO/HydraRingSettingsCsvReader.cs =================================================================== diff -u -re43f4bf3f03c8566f64f02cac30dd9444f6dfa34 -rc7843d3b8c846c4aab66ba32e67f883b6555932b --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/IO/HydraRingSettingsCsvReader.cs (.../HydraRingSettingsCsvReader.cs) (revision e43f4bf3f03c8566f64f02cac30dd9444f6dfa34) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/IO/HydraRingSettingsCsvReader.cs (.../HydraRingSettingsCsvReader.cs) (revision c7843d3b8c846c4aab66ba32e67f883b6555932b) @@ -1,6 +1,6 @@ // Copyright (C) Stichting Deltares 2016. All rights reserved. // -// This file is part of Ringtoets. +// This fileContents 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 @@ -27,43 +27,43 @@ namespace Ringtoets.HydraRing.Calculation.IO { /// - /// An abstract reader base for HydraRing settings readers. + /// An abstract base for Hydra-Ring settings readers. /// - /// The output format of the read settings. - internal abstract class HydraRingSettingsCsvReader + /// The output format of the read settings. + internal abstract class HydraRingSettingsCsvReader { private const char separator = ';'; private readonly string fileContents; - private readonly TOuput settings; + private readonly TOutput settings; /// /// Creates a new instance of . /// - /// The file to read. - /// The provided settings object to import the read settings on. - /// Thrown when or is null. - protected HydraRingSettingsCsvReader(string file, TOuput settings) + /// The fileContents to read. + /// The provided settings object to add the read settings to. + /// Thrown when or is null. + protected HydraRingSettingsCsvReader(string fileContents, TOutput settings) { - if (string.IsNullOrEmpty(file)) + if (string.IsNullOrEmpty(fileContents)) { - throw new ArgumentNullException("file", @"A file must be set."); + throw new ArgumentNullException("fileContents", @"File contents must be set."); } if (settings == null) { - throw new ArgumentNullException("settings", @"The settinsg object must be provided."); + throw new ArgumentNullException("settings", @"The settings object must be provided."); } - fileContents = file; + this.fileContents = fileContents; this.settings = settings; } /// - /// Reads the settings from the file. + /// Reads the settings from the fileContents. /// /// A with the settings. - public TOuput ReadSettings() + public TOutput ReadSettings() { var lines = fileContents.Split('\n'); @@ -75,7 +75,10 @@ return settings; } - protected TOuput Settings + /// + /// Gets the read settings. + /// + protected TOutput Settings { get { @@ -84,36 +87,48 @@ } /// - /// Creates a setting from one line in the file. + // Creates a setting object from the provided line and adds it to . /// /// The line to create the setting for. protected abstract void CreateSetting(IList line); + /// + /// Gets a string value from the given . + /// + /// The element to extract the string value from. + /// The extracted string value. protected static string GetStringValueFromElement(string element) { return element.Trim().Replace("\"", ""); } + /// + /// Gets an int value from the given . + /// + /// The element to extract the int value from. + /// The extracted int value. protected static int GetIntValueFromElement(string element) { - return int.Parse(GetStringValueFromElement(element)); + return int.Parse(GetStringValueFromElement(element), CultureInfo.InvariantCulture); } + /// + /// Gets a double value from the given . + /// + /// The element to extract the double value from. + /// The extracted double value. protected static double GetDoubleValueFromElement(string element) { return double.Parse(GetStringValueFromElement(element), CultureInfo.InvariantCulture); } private static string[] TokenizeString(string readText) { - if (!readText.Contains(separator)) - { - return new string[] - {}; - } - return readText.Split(separator) - .TakeWhile(text => !string.IsNullOrEmpty(text)) - .ToArray(); + return !readText.Contains(separator) + ? new string[0] + : readText.Split(separator) + .TakeWhile(text => !string.IsNullOrEmpty(text)) + .ToArray(); } } } \ No newline at end of file Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/IO/NumericsSettingsCsvReader.cs =================================================================== diff -u -re43f4bf3f03c8566f64f02cac30dd9444f6dfa34 -rc7843d3b8c846c4aab66ba32e67f883b6555932b --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/IO/NumericsSettingsCsvReader.cs (.../NumericsSettingsCsvReader.cs) (revision e43f4bf3f03c8566f64f02cac30dd9444f6dfa34) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/IO/NumericsSettingsCsvReader.cs (.../NumericsSettingsCsvReader.cs) (revision c7843d3b8c846c4aab66ba32e67f883b6555932b) @@ -26,9 +26,9 @@ namespace Ringtoets.HydraRing.Calculation.IO { /// - /// The reader for the in csv format. + /// The reader for in csv format. /// - internal class NumericsSettingsCsvReader : HydraRingSettingsCsvReader>>> + internal class NumericsSettingsCsvReader : HydraRingSettingsCsvReader>>> { private readonly Dictionary columns = new Dictionary { @@ -88,9 +88,9 @@ /// /// Creates a new instance of . /// - /// The file to read. - /// Thrown when is not set. - public NumericsSettingsCsvReader(string file) : base(file, new Dictionary>>()) {} + /// The fileContents to read. + /// Thrown when is not set. + public NumericsSettingsCsvReader(string fileContents) : base(fileContents, new Dictionary>>()) {} protected override void CreateSetting(IList line) { @@ -99,15 +99,15 @@ if (!Settings.ContainsKey(failureMechanismType)) { - Settings.Add(failureMechanismType, new Dictionary>()); + Settings.Add(failureMechanismType, new Dictionary>()); } // Get sub mechanism var subMechanism = GetSubMechanismType(line); if (!Settings[failureMechanismType].ContainsKey(subMechanism)) { - Settings[failureMechanismType].Add(subMechanism, new Dictionary()); + Settings[failureMechanismType].Add(subMechanism, new Dictionary()); } // Get TrajectId @@ -134,9 +134,9 @@ return GetStringValueFromElement(line[columns[ringIdKey]]); } - private NumericsSettings GetNumericSettings(IList line) + private NumericsSetting GetNumericSettings(IList line) { - return new NumericsSettings(GetIntValueFromElement(line[columns[calculationMethodKey]]), + return new NumericsSetting(GetIntValueFromElement(line[columns[calculationMethodKey]]), GetIntValueFromElement(line[columns[formStartMethodKey]]), GetIntValueFromElement(line[columns[formIterationsKey]]), GetDoubleValueFromElement(line[columns[formRelaxationFactorKey]]), Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Properties/Resources.Designer.cs =================================================================== diff -u -r2a90d576840ec1028b7b7fcc051a635cff9c2cb0 -rc7843d3b8c846c4aab66ba32e67f883b6555932b --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 2a90d576840ec1028b7b7fcc051a635cff9c2cb0) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision c7843d3b8c846c4aab66ba32e67f883b6555932b) @@ -87,9 +87,9 @@ ///"34-2";"Tm-1,0";5;15 ///"34-2";"HBN";.... /// - internal static string DesignTableSettings { + internal static string DesignTablesSettings { get { - return ResourceManager.GetString("DesignTableSettings", resourceCulture); + return ResourceManager.GetString("DesignTablesSettings", resourceCulture); } } @@ -104,51 +104,6 @@ } /// - /// Looks up a localized string similar to TrajectID;MechanismID;SubMechanism;TimeIntegration - ///205;1;1;1 - ///205;11;11;1 - ///205;11;14;1 - ///205;11;16;1 - ///205;3;3;1 - ///205;101;102;1 - ///205;101;103;1 - ///11-1;1;1;1 - ///11-1;11;11;3 - ///11-1;11;14;3 - ///11-1;11;16;3 - ///11-1;3;5;3 - ///11-1;101;102;3 - ///11-1;101;103;3 - ///34-1;1;1;1 - ///34-1;11;11;3 - ///34-1;11;14;3 - ///34-1;11;16;3 - ///34-1;3;5;3 - ///34-1;101;102;3 - ///34-1;101;103;3 - ///34-2;1;1;3 - ///34-2;11;11;3 - ///34-2;11;14;3 - ///34-2;11;16;3 - ///34-2;3;5;3 - ///34-2;101;102;3 - ///34-2;101;103;3 - ///34a-1;1;1;1 - ///34a-1;11;11;1 - ///34a-1;11;14;1 - ///34a-1;11;16;1 - ///34a-1;3;5;1 - ///34a-1;101;102;1 - ///34a-1;101;103;1 - ///35-2;1 [rest of string was truncated]";. - /// - internal static string HydraulicModelSettings { - get { - return ResourceManager.GetString("HydraulicModelSettings", resourceCulture); - } - } - - /// /// Looks up a localized string similar to "TrajectID";"MechanismID";"SubMechanismID";"Rekenmethode";"FORM_StartMethod";"FORM_NrIterations";"FORM_RelaxationFactor";"FORM_EpsBeta";"FORM_EpsHOH";"FORM_EpsZFunc";"Ds_StartMethod";"Ds_Min";"Ds_Max";"Ds_VarCoefficient";"NI_UMin";"NI_Umax";"NI_NumberSteps" ///"205";1;1;1;4;50;0.15;0.01;0.01;0.01;2;20000;100000;0.1;-6;6;25 ///"205";11;11;1;4;50;0.15;0.01;0.01;0.01;2;20000;100000;0.1;-6;6;25 Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Properties/Resources.resx =================================================================== diff -u -r2a90d576840ec1028b7b7fcc051a635cff9c2cb0 -rc7843d3b8c846c4aab66ba32e67f883b6555932b --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Properties/Resources.resx (.../Resources.resx) (revision 2a90d576840ec1028b7b7fcc051a635cff9c2cb0) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Properties/Resources.resx (.../Resources.resx) (revision c7843d3b8c846c4aab66ba32e67f883b6555932b) @@ -128,10 +128,7 @@ ..\Resources\Numerics.csv;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - + ..\Resources\DesignTables.csv;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - ..\Resources\Defaults_HydraulicModels.csv;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - \ No newline at end of file Fisheye: Tag c7843d3b8c846c4aab66ba32e67f883b6555932b refers to a dead (removed) revision in file `Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Providers/DesignTableSettingsProvider.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag e4cd513fc0097acf2e99e0c5d001519b47a5c5b8 refers to a dead (removed) revision in file `Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Providers/DesignTablesSettingsProvider.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Providers/NumericsSettingsProvider.cs =================================================================== diff -u -r2a90d576840ec1028b7b7fcc051a635cff9c2cb0 -rc7843d3b8c846c4aab66ba32e67f883b6555932b --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Providers/NumericsSettingsProvider.cs (.../NumericsSettingsProvider.cs) (revision 2a90d576840ec1028b7b7fcc051a635cff9c2cb0) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Providers/NumericsSettingsProvider.cs (.../NumericsSettingsProvider.cs) (revision c7843d3b8c846c4aab66ba32e67f883b6555932b) @@ -28,12 +28,12 @@ namespace Ringtoets.HydraRing.Calculation.Providers { /// - /// Provider of . + /// Provider of . /// internal class NumericsSettingsProvider { - private readonly IDictionary>> fileNumericsSettings; - private IDictionary> defaultNumericsSettings; + private readonly IDictionary>> fileNumericsSettings; + private IDictionary> defaultNumericsSettings; /// /// Creates a new instance of the class. @@ -46,13 +46,13 @@ } /// - /// Returns based on the provided and sub mechanism id. + /// Returns based on the provided combination of failure mechanism type, sub mechanism id and ring id. /// - /// The to obtain the for. - /// The sub mechanism id to obtain the for. - /// The ring id to obtain the for. - /// The corresponding to the provided and sub mechanism id. - public NumericsSettings GetNumericsSettings(HydraRingFailureMechanismType failureMechanismType, int subMechanismId, string ringId) + /// The to obtain the for. + /// The sub mechanism id to obtain the for. + /// The ring id to obtain the for. + /// The corresponding to the provided failure mechanism type, sub mechanism id and ring id. + public NumericsSetting GetNumericsSettings(HydraRingFailureMechanismType failureMechanismType, int subMechanismId, string ringId) { var mechanismId = new FailureMechanismDefaultsProvider().GetFailureMechanismDefaults(failureMechanismType).MechanismId; @@ -69,153 +69,153 @@ private void InitializeDefaultNumericsSettings() { - defaultNumericsSettings = new Dictionary> + defaultNumericsSettings = new Dictionary> { { - HydraRingFailureMechanismType.AssessmentLevel, new Dictionary + HydraRingFailureMechanismType.AssessmentLevel, new Dictionary { { - 1, new NumericsSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 1, new NumericsSetting(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) } } }, { - HydraRingFailureMechanismType.WaveHeight, new Dictionary + HydraRingFailureMechanismType.WaveHeight, new Dictionary { { - 11, new NumericsSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 11, new NumericsSetting(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) } } }, { - HydraRingFailureMechanismType.WavePeakPeriod, new Dictionary + HydraRingFailureMechanismType.WavePeakPeriod, new Dictionary { { - 14, new NumericsSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 14, new NumericsSetting(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) } } }, { - HydraRingFailureMechanismType.WaveSpectralPeriod, new Dictionary + HydraRingFailureMechanismType.WaveSpectralPeriod, new Dictionary { { - 16, new NumericsSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 16, new NumericsSetting(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) } } }, { - HydraRingFailureMechanismType.QVariant, new Dictionary + HydraRingFailureMechanismType.QVariant, new Dictionary { { - 3, new NumericsSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 3, new NumericsSetting(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 4, new NumericsSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 4, new NumericsSetting(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 5, new NumericsSettings(4, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 5, new NumericsSetting(4, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) } } }, { - HydraRingFailureMechanismType.DikesOvertopping, new Dictionary + HydraRingFailureMechanismType.DikesOvertopping, new Dictionary { { - 102, new NumericsSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 102, new NumericsSetting(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 103, new NumericsSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 103, new NumericsSetting(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) } } }, { - HydraRingFailureMechanismType.DikesHeight, new Dictionary + HydraRingFailureMechanismType.DikesHeight, new Dictionary { { - 102, new NumericsSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 102, new NumericsSetting(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 103, new NumericsSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 103, new NumericsSetting(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) } } }, { - HydraRingFailureMechanismType.DikesPiping, new Dictionary + HydraRingFailureMechanismType.DikesPiping, new Dictionary { { - 311, new NumericsSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 311, new NumericsSetting(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 313, new NumericsSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 313, new NumericsSetting(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 314, new NumericsSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 314, new NumericsSetting(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) } } }, { - HydraRingFailureMechanismType.StructuresOvertopping, new Dictionary + HydraRingFailureMechanismType.StructuresOvertopping, new Dictionary { { - 421, new NumericsSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 421, new NumericsSetting(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 422, new NumericsSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 422, new NumericsSetting(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 423, new NumericsSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 423, new NumericsSetting(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) } } }, { - HydraRingFailureMechanismType.StructuresClosure, new Dictionary + HydraRingFailureMechanismType.StructuresClosure, new Dictionary { { - 422, new NumericsSettings(1, 1, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 422, new NumericsSetting(1, 1, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 424, new NumericsSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 424, new NumericsSetting(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 425, new NumericsSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 425, new NumericsSetting(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 426, new NumericsSettings(1, 1, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 426, new NumericsSetting(1, 1, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 427, new NumericsSettings(1, 1, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 427, new NumericsSetting(1, 1, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) } } }, { - HydraRingFailureMechanismType.StructuresStructuralFailure, new Dictionary + HydraRingFailureMechanismType.StructuresStructuralFailure, new Dictionary { { - 422, new NumericsSettings(1, 1, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 422, new NumericsSetting(1, 1, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 424, new NumericsSettings(1, 1, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 424, new NumericsSetting(1, 1, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 425, new NumericsSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 425, new NumericsSetting(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 430, new NumericsSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 430, new NumericsSetting(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 431, new NumericsSettings(1, 1, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 431, new NumericsSetting(1, 1, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 432, new NumericsSettings(1, 1, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 432, new NumericsSetting(1, 1, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 433, new NumericsSettings(1, 1, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 433, new NumericsSetting(1, 1, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 434, new NumericsSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 434, new NumericsSetting(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 435, new NumericsSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + 435, new NumericsSetting(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) } } } Fisheye: Tag c7843d3b8c846c4aab66ba32e67f883b6555932b refers to a dead (removed) revision in file `Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Resources/Defaults_HydraulicModels.csv'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c7843d3b8c846c4aab66ba32e67f883b6555932b refers to a dead (removed) revision in file `Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Resources/Hydra-Ring settings.csv'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Ringtoets.HydraRing.Calculation.csproj =================================================================== diff -u -re43f4bf3f03c8566f64f02cac30dd9444f6dfa34 -rc7843d3b8c846c4aab66ba32e67f883b6555932b --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Ringtoets.HydraRing.Calculation.csproj (.../Ringtoets.HydraRing.Calculation.csproj) (revision e43f4bf3f03c8566f64f02cac30dd9444f6dfa34) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Ringtoets.HydraRing.Calculation.csproj (.../Ringtoets.HydraRing.Calculation.csproj) (revision c7843d3b8c846c4aab66ba32e67f883b6555932b) @@ -67,7 +67,7 @@ - + @@ -89,12 +89,12 @@ - - + + - + @@ -110,30 +110,20 @@ Core.Common.Base False - - {F49BD8B2-332A-4C91-A196-8CCE0A2C7D98} - Core.Common.Utils - {c90b77da-e421-43cc-b82e-529651bc21ac} Core.Common.Version False - - {D4200F43-3F72-4F42-AF0A-8CED416A38EC} - Ringtoets.Common.Data - Copying.licenseheader - Always - Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Services/HydraRingConfigurationService.cs =================================================================== diff -u -r710dabb5baa577ffe6f59aa2a61d729c1504c874 -rc7843d3b8c846c4aab66ba32e67f883b6555932b --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Services/HydraRingConfigurationService.cs (.../HydraRingConfigurationService.cs) (revision 710dabb5baa577ffe6f59aa2a61d729c1504c874) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Services/HydraRingConfigurationService.cs (.../HydraRingConfigurationService.cs) (revision c7843d3b8c846c4aab66ba32e67f883b6555932b) @@ -64,7 +64,7 @@ private readonly string ringId; private readonly IList hydraRingCalculationInputs; private readonly NumericsSettingsProvider numericsSettingsProvider = new NumericsSettingsProvider(); - private readonly DesignTableSettingsProvider designTableSettingsProvider = new DesignTableSettingsProvider(); + private readonly DesignTablesSettingsProvider designTablesSettingsProvider = new DesignTablesSettingsProvider(); private readonly FailureMechanismDefaultsProvider failureMechanismDefaultsProvider = new FailureMechanismDefaultsProvider(); private readonly VariableDefaultsProvider variableDefaultsProvider = new VariableDefaultsProvider(); private readonly HydraRingTimeIntegrationSchemeType timeIntegrationSchemeType; @@ -252,7 +252,7 @@ foreach (var hydraRingCalculationInput in hydraRingCalculationInputs) { var failureMechanismDefaults = failureMechanismDefaultsProvider.GetFailureMechanismDefaults(hydraRingCalculationInput.FailureMechanismType); - var designTableSettings = designTableSettingsProvider.GetDesignTableSettings(hydraRingCalculationInput.FailureMechanismType, ringId); + var designTablesSettings = designTablesSettingsProvider.GetDesignTablesSettings(hydraRingCalculationInput.FailureMechanismType, ringId); orderedDictionaries.Add(new OrderedDictionary { @@ -287,10 +287,10 @@ "TableStepSize", defaultHydraRingValue // Fixed: no support for type III computations (see "Method") }, { - "ValueMin", GetHydraRingValue(designTableSettings.ValueMin) + "ValueMin", GetHydraRingValue(designTablesSettings.ValueMin) }, { - "ValueMax", GetHydraRingValue(designTableSettings.ValueMax) + "ValueMax", GetHydraRingValue(designTablesSettings.ValueMax) }, { "Beta", GetHydraRingValue(hydraRingCalculationInput.Beta) Fisheye: Tag c7843d3b8c846c4aab66ba32e67f883b6555932b refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Settings/DesignTableSettingsTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Settings/DesignTablesSettingTest.cs =================================================================== diff -u --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Settings/DesignTablesSettingTest.cs (revision 0) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Settings/DesignTablesSettingTest.cs (revision c7843d3b8c846c4aab66ba32e67f883b6555932b) @@ -0,0 +1,41 @@ +// 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 NUnit.Framework; +using Ringtoets.HydraRing.Calculation.Data.Settings; + +namespace Ringtoets.HydraRing.Calculation.Test.Data.Settings +{ + [TestFixture] + public class DesignTablesSettingTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Call + var designTablesSetting = new DesignTablesSetting(1.1, 2.2); + + // Assert + Assert.AreEqual(1.1, designTablesSetting.ValueMin); + Assert.AreEqual(2.2, designTablesSetting.ValueMax); + } + } +} \ No newline at end of file Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Settings/NumericsSettingTest.cs =================================================================== diff -u --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Settings/NumericsSettingTest.cs (revision 0) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Settings/NumericsSettingTest.cs (revision c7843d3b8c846c4aab66ba32e67f883b6555932b) @@ -0,0 +1,53 @@ +// 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 NUnit.Framework; +using Ringtoets.HydraRing.Calculation.Data.Settings; + +namespace Ringtoets.HydraRing.Calculation.Test.Data.Settings +{ + [TestFixture] + public class NumericsSettingTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Call + var numericsSettings = new NumericsSetting(1, 2, 3, 4.4, 5.5, 6.6, 7.7, 8, 9, 10, 11.11, 12.12, 13.13, 14); + + // Assert + Assert.AreEqual(1, numericsSettings.CalculationTechniqueId); + Assert.AreEqual(2, numericsSettings.FormStartMethod); + Assert.AreEqual(3, numericsSettings.FormNumberOfIterations); + Assert.AreEqual(4.4, numericsSettings.FormRelaxationFactor); + Assert.AreEqual(5.5, numericsSettings.FormEpsBeta); + Assert.AreEqual(6.6, numericsSettings.FormEpsHoh); + Assert.AreEqual(7.7, numericsSettings.FormEpsZFunc); + Assert.AreEqual(8, numericsSettings.DsStartMethod); + Assert.AreEqual(9, numericsSettings.DsMinNumberOfIterations); + Assert.AreEqual(10, numericsSettings.DsMaxNumberOfIterations); + Assert.AreEqual(11.11, numericsSettings.DsVarCoefficient); + Assert.AreEqual(12.12, numericsSettings.NiUMin); + Assert.AreEqual(13.13, numericsSettings.NiUMax); + Assert.AreEqual(14, numericsSettings.NiNumberSteps); + } + } +} \ No newline at end of file Fisheye: Tag c7843d3b8c846c4aab66ba32e67f883b6555932b refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Settings/NumericsSettingsTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c7843d3b8c846c4aab66ba32e67f883b6555932b refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/IO/DesignTableSettingsCsvReaderTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/IO/DesignTablesSettingsCsvReaderTest.cs =================================================================== diff -u --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/IO/DesignTablesSettingsCsvReaderTest.cs (revision 0) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/IO/DesignTablesSettingsCsvReaderTest.cs (revision c7843d3b8c846c4aab66ba32e67f883b6555932b) @@ -0,0 +1,125 @@ +// 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 System.Collections.Generic; +using System.IO; +using Core.Common.TestUtil; +using NUnit.Framework; +using Ringtoets.HydraRing.Calculation.Data; +using Ringtoets.HydraRing.Calculation.Data.Settings; +using Ringtoets.HydraRing.Calculation.IO; + +namespace Ringtoets.HydraRing.Calculation.Test.IO +{ + [TestFixture] + public class DesignTablesSettingsCsvReaderTest + { + private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.Calculation, "Settings"); + + [Test] + public void Constructor_ExpectedValues() + { + // Call + DesignTablesSettingsCsvReader reader = new DesignTablesSettingsCsvReader("path.csv"); + + // Assert + Assert.IsInstanceOf>>>(reader); + } + + [Test] + public void Constructor_PathNotSet_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => new DesignTablesSettingsCsvReader(null); + + // Assert + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, "File contents must be set."); + } + + [Test] + public void ReadSettings_ValidFile_ReturnsSettings() + { + // Setup + string testFile = Path.Combine(testDataPath, "DesignTablesSettingsTest.csv"); + + using (StreamReader streamReader = new StreamReader(testFile)) + { + string fileContents = streamReader.ReadToEnd(); + + DesignTablesSettingsCsvReader reader = new DesignTablesSettingsCsvReader(fileContents); + IDictionary> expectedDictionary = GetDictionary(); + + // Call + IDictionary> settings = reader.ReadSettings(); + + // Assert + Assert.AreEqual(2, settings.Count); + + foreach (KeyValuePair> expectedMechanism in expectedDictionary) + { + Assert.IsTrue(settings.ContainsKey(expectedMechanism.Key)); + Assert.IsInstanceOf>(settings[expectedMechanism.Key]); + + foreach (KeyValuePair expectedDesignTablesSettings in expectedMechanism.Value) + { + Assert.IsTrue(settings[expectedMechanism.Key].ContainsKey(expectedDesignTablesSettings.Key)); + Assert.IsInstanceOf(settings[expectedMechanism.Key][expectedDesignTablesSettings.Key]); + + DesignTablesSetting setting = settings[expectedMechanism.Key][expectedDesignTablesSettings.Key]; + + Assert.AreEqual(expectedDesignTablesSettings.Value.ValueMin, setting.ValueMin); + Assert.AreEqual(expectedDesignTablesSettings.Value.ValueMax, setting.ValueMax); + } + } + } + } + + private static IDictionary> GetDictionary() + { + return new Dictionary> + { + { + HydraRingFailureMechanismType.AssessmentLevel, new Dictionary + { + { + "205", new DesignTablesSetting(5, 15) + }, + { + "11-1", new DesignTablesSetting(5, 15) + } + } + }, + { + HydraRingFailureMechanismType.QVariant, new Dictionary + { + { + "205", new DesignTablesSetting(5, 15) + }, + { + "11-1", new DesignTablesSetting(5, 15) + } + } + } + }; + } + } +} \ No newline at end of file Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/IO/HydraRingSettingsCsvReaderTest.cs =================================================================== diff -u -re43f4bf3f03c8566f64f02cac30dd9444f6dfa34 -rc7843d3b8c846c4aab66ba32e67f883b6555932b --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/IO/HydraRingSettingsCsvReaderTest.cs (.../HydraRingSettingsCsvReaderTest.cs) (revision e43f4bf3f03c8566f64f02cac30dd9444f6dfa34) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/IO/HydraRingSettingsCsvReaderTest.cs (.../HydraRingSettingsCsvReaderTest.cs) (revision c7843d3b8c846c4aab66ba32e67f883b6555932b) @@ -37,7 +37,7 @@ TestDelegate call = () => new TestCsvReader(null, new object()); // Assert - TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, "A file must be set."); + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, "File contents must be set."); } [Test] @@ -47,7 +47,7 @@ TestDelegate call = () => new TestCsvReader("path.csv", null); // Assert - TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, "The settinsg object must be provided."); + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, "The settings object must be provided."); } [Test] @@ -65,7 +65,9 @@ private class TestCsvReader : HydraRingSettingsCsvReader { - public TestCsvReader(string file, object settings) : base(file, settings) {} + public TestCsvReader(string fileContents, object settings) + : base(fileContents, settings) {} + protected override void CreateSetting(IList line) { throw new NotImplementedException(); Fisheye: Tag c7843d3b8c846c4aab66ba32e67f883b6555932b refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/IO/NumericSettingsCsvReaderTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/IO/NumericsSettingsCsvReaderTest.cs =================================================================== diff -u --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/IO/NumericsSettingsCsvReaderTest.cs (revision 0) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/IO/NumericsSettingsCsvReaderTest.cs (revision c7843d3b8c846c4aab66ba32e67f883b6555932b) @@ -0,0 +1,147 @@ +// 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 System.Collections.Generic; +using System.IO; +using Core.Common.TestUtil; +using NUnit.Framework; +using Ringtoets.HydraRing.Calculation.Data.Settings; +using Ringtoets.HydraRing.Calculation.IO; + +namespace Ringtoets.HydraRing.Calculation.Test.IO +{ + [TestFixture] + public class NumericsSettingsCsvReaderTest + { + private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.Calculation, "Settings"); + + [Test] + public void Constructor_ExpectedValues() + { + // Call + NumericsSettingsCsvReader reader = new NumericsSettingsCsvReader("path.csv"); + + // Assert + Assert.IsInstanceOf>>>>(reader); + } + + [Test] + public void Constructor_PathNotSet_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => new NumericsSettingsCsvReader(null); + + // Assert + const string expectedMessage = "File contents must be set."; + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, expectedMessage); + } + + [Test] + public void ReadSettings_ValidFile_ReturnsSettings() + { + // Setup + string testFile = Path.Combine(testDataPath, "NumericsSettingsTest.csv"); + + using (StreamReader streamReader = new StreamReader(testFile)) + { + string fileContents = streamReader.ReadToEnd(); + + NumericsSettingsCsvReader reader = new NumericsSettingsCsvReader(fileContents); + IDictionary>> expectedDictionary = GetDictionary(); + + // Call + IDictionary>> settings = reader.ReadSettings(); + + // Assert + Assert.AreEqual(2, settings.Count); + + foreach (KeyValuePair>> expectedMechanism in expectedDictionary) + { + Assert.IsTrue(settings.ContainsKey(expectedMechanism.Key)); + Assert.IsInstanceOf>>(settings[expectedMechanism.Key]); + + foreach (KeyValuePair> expectedSubMechanism in expectedMechanism.Value) + { + Assert.IsTrue(settings[expectedMechanism.Key].ContainsKey(expectedSubMechanism.Key)); + Assert.IsInstanceOf>(settings[expectedMechanism.Key][expectedSubMechanism.Key]); + + foreach (KeyValuePair expectedNumericsSettings in expectedSubMechanism.Value) + { + Assert.IsTrue(settings[expectedMechanism.Key][expectedSubMechanism.Key].ContainsKey(expectedNumericsSettings.Key)); + Assert.IsInstanceOf(settings[expectedMechanism.Key][expectedSubMechanism.Key][expectedNumericsSettings.Key]); + + NumericsSetting setting = settings[expectedMechanism.Key][expectedSubMechanism.Key][expectedNumericsSettings.Key]; + + Assert.AreEqual(expectedNumericsSettings.Value.CalculationTechniqueId, setting.CalculationTechniqueId); + Assert.AreEqual(expectedNumericsSettings.Value.FormStartMethod, setting.FormStartMethod); + Assert.AreEqual(expectedNumericsSettings.Value.FormNumberOfIterations, setting.FormNumberOfIterations); + Assert.AreEqual(expectedNumericsSettings.Value.FormRelaxationFactor, setting.FormRelaxationFactor); + Assert.AreEqual(expectedNumericsSettings.Value.FormEpsBeta, setting.FormEpsBeta); + Assert.AreEqual(expectedNumericsSettings.Value.FormEpsHoh, setting.FormEpsHoh); + Assert.AreEqual(expectedNumericsSettings.Value.FormEpsZFunc, setting.FormEpsZFunc); + Assert.AreEqual(expectedNumericsSettings.Value.DsStartMethod, setting.DsStartMethod); + Assert.AreEqual(expectedNumericsSettings.Value.DsMaxNumberOfIterations, setting.DsMaxNumberOfIterations); + Assert.AreEqual(expectedNumericsSettings.Value.DsMinNumberOfIterations, setting.DsMinNumberOfIterations); + Assert.AreEqual(expectedNumericsSettings.Value.DsVarCoefficient, setting.DsVarCoefficient); + Assert.AreEqual(expectedNumericsSettings.Value.NiNumberSteps, setting.NiNumberSteps); + Assert.AreEqual(expectedNumericsSettings.Value.NiUMax, setting.NiUMax); + Assert.AreEqual(expectedNumericsSettings.Value.NiUMin, setting.NiUMin); + } + } + } + } + } + + private static IDictionary>> GetDictionary() + { + return new Dictionary>> + { + { + 1, new Dictionary> + { + { + 1, new Dictionary + { + { + "205", new NumericsSetting(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 20000, 100000, 0.1, -6, 6, 25) + } + } + } + } + }, + { + 11, new Dictionary> + { + { + 11, new Dictionary + { + { + "205", new NumericsSetting(2, 6, 30, 0.50, 0.06, 0.08, 0.02, 3, 1000, 2000, 0.4, -10, 10, 14) + } + } + } + } + } + }; + } + } +} \ No newline at end of file Fisheye: Tag c7843d3b8c846c4aab66ba32e67f883b6555932b refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Providers/DesignTableSettingsProviderTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Providers/DesignTablesSettingsProviderTest.cs =================================================================== diff -u --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Providers/DesignTablesSettingsProviderTest.cs (revision 0) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Providers/DesignTablesSettingsProviderTest.cs (revision c7843d3b8c846c4aab66ba32e67f883b6555932b) @@ -0,0 +1,74 @@ +// 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 NUnit.Framework; +using Ringtoets.HydraRing.Calculation.Data; +using Ringtoets.HydraRing.Calculation.Data.Settings; +using Ringtoets.HydraRing.Calculation.Providers; + +namespace Ringtoets.HydraRing.Calculation.Test.Providers +{ + [TestFixture] + public class DesignTablesSettingsProviderTest + { + [TestCase(HydraRingFailureMechanismType.AssessmentLevel, "4", 5.0, 15.0)] + [TestCase(HydraRingFailureMechanismType.QVariant, "4", 5.0, 15.0)] + [TestCase(HydraRingFailureMechanismType.WaveHeight, "205", 5.0, 15.0)] + [TestCase(HydraRingFailureMechanismType.WavePeakPeriod, "205", 5.0, 15.0)] + [TestCase(HydraRingFailureMechanismType.WaveSpectralPeriod, "205", 5.0, 15.0)] + [TestCase(HydraRingFailureMechanismType.DikesOvertopping, "205", double.NaN, double.NaN)] + [TestCase(HydraRingFailureMechanismType.DikesHeight, "205", 5.0, 15.0)] + [TestCase(HydraRingFailureMechanismType.DikesPiping, "205", double.NaN, double.NaN)] + [TestCase(HydraRingFailureMechanismType.StructuresOvertopping, "205", double.NaN, double.NaN)] + [TestCase(HydraRingFailureMechanismType.StructuresClosure, "205", double.NaN, double.NaN)] + [TestCase(HydraRingFailureMechanismType.StructuresStructuralFailure, "205", double.NaN, double.NaN)] + public void GetDesignTablesSettings_UnknownFailureMechanismTypeOrRingId_ReturnsDefaultDesignTablesSettings(HydraRingFailureMechanismType failureMechanismType, string ringId, double expectedValueMin, double expectedValueMax) + { + // Setup + DesignTablesSettingsProvider designTablesSettingsProvider = new DesignTablesSettingsProvider(); + + // Call + DesignTablesSetting designTablesSetting = designTablesSettingsProvider.GetDesignTablesSettings(failureMechanismType, ringId); + + // Assert + Assert.AreEqual(expectedValueMin, designTablesSetting.ValueMin); + Assert.AreEqual(expectedValueMax, designTablesSetting.ValueMax); + } + + [Test] + [TestCase(HydraRingFailureMechanismType.AssessmentLevel, "205", 5.0, 15.0)] + [TestCase(HydraRingFailureMechanismType.QVariant, "205", 5.0, 15.0)] + [TestCase(HydraRingFailureMechanismType.AssessmentLevel, "11-1", 5.0, 15.0)] + [TestCase(HydraRingFailureMechanismType.QVariant, "11-1", 5.0, 15.0)] + public void GetDesignTablesSettings_KnownRingIdAndFailureMechanismType_ReturnsExpectedDesignTablesSettings(HydraRingFailureMechanismType failureMechanismType, string ringId, double expectedValueMin, double expectedValueMax) + { + // Setup + DesignTablesSettingsProvider designTablesSettingsProvider = new DesignTablesSettingsProvider(); + + // Call + DesignTablesSetting settings = designTablesSettingsProvider.GetDesignTablesSettings(failureMechanismType, ringId); + + // Assert + Assert.AreEqual(expectedValueMin, settings.ValueMin); + Assert.AreEqual(expectedValueMax, settings.ValueMax); + } + } +} \ No newline at end of file Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Providers/NumericsSettingsProviderTest.cs =================================================================== diff -u -r2a90d576840ec1028b7b7fcc051a635cff9c2cb0 -rc7843d3b8c846c4aab66ba32e67f883b6555932b --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Providers/NumericsSettingsProviderTest.cs (.../NumericsSettingsProviderTest.cs) (revision 2a90d576840ec1028b7b7fcc051a635cff9c2cb0) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Providers/NumericsSettingsProviderTest.cs (.../NumericsSettingsProviderTest.cs) (revision c7843d3b8c846c4aab66ba32e67f883b6555932b) @@ -34,26 +34,26 @@ { // Setup NumericsSettingsProvider numericsSettingsProvider = new NumericsSettingsProvider(); - NumericsSettings expectedValues = GetExpectedNumericsSettings(); + NumericsSetting expectedValues = GetExpectedNumericsSettings(); // Call - NumericsSettings settings = numericsSettingsProvider.GetNumericsSettings(HydraRingFailureMechanismType.AssessmentLevel, 1, "205"); + NumericsSetting setting = numericsSettingsProvider.GetNumericsSettings(HydraRingFailureMechanismType.AssessmentLevel, 1, "205"); // Assert - Assert.AreEqual(expectedValues.CalculationTechniqueId, settings.CalculationTechniqueId); - Assert.AreEqual(expectedValues.FormStartMethod, settings.FormStartMethod); - Assert.AreEqual(expectedValues.FormNumberOfIterations, settings.FormNumberOfIterations); - Assert.AreEqual(expectedValues.FormRelaxationFactor, settings.FormRelaxationFactor); - Assert.AreEqual(expectedValues.FormEpsBeta, settings.FormEpsBeta); - Assert.AreEqual(expectedValues.FormEpsHoh, settings.FormEpsHoh); - Assert.AreEqual(expectedValues.FormEpsZFunc, settings.FormEpsZFunc); - Assert.AreEqual(expectedValues.DsStartMethod, settings.DsStartMethod); - Assert.AreEqual(expectedValues.DsMinNumberOfIterations, settings.DsMinNumberOfIterations); - Assert.AreEqual(expectedValues.DsMaxNumberOfIterations, settings.DsMaxNumberOfIterations); - Assert.AreEqual(expectedValues.DsVarCoefficient, settings.DsVarCoefficient); - Assert.AreEqual(expectedValues.NiNumberSteps, settings.NiNumberSteps); - Assert.AreEqual(expectedValues.NiUMax, settings.NiUMax); - Assert.AreEqual(expectedValues.NiUMin, settings.NiUMin); + Assert.AreEqual(expectedValues.CalculationTechniqueId, setting.CalculationTechniqueId); + Assert.AreEqual(expectedValues.FormStartMethod, setting.FormStartMethod); + Assert.AreEqual(expectedValues.FormNumberOfIterations, setting.FormNumberOfIterations); + Assert.AreEqual(expectedValues.FormRelaxationFactor, setting.FormRelaxationFactor); + Assert.AreEqual(expectedValues.FormEpsBeta, setting.FormEpsBeta); + Assert.AreEqual(expectedValues.FormEpsHoh, setting.FormEpsHoh); + Assert.AreEqual(expectedValues.FormEpsZFunc, setting.FormEpsZFunc); + Assert.AreEqual(expectedValues.DsStartMethod, setting.DsStartMethod); + Assert.AreEqual(expectedValues.DsMinNumberOfIterations, setting.DsMinNumberOfIterations); + Assert.AreEqual(expectedValues.DsMaxNumberOfIterations, setting.DsMaxNumberOfIterations); + Assert.AreEqual(expectedValues.DsVarCoefficient, setting.DsVarCoefficient); + Assert.AreEqual(expectedValues.NiNumberSteps, setting.NiNumberSteps); + Assert.AreEqual(expectedValues.NiUMax, setting.NiUMax); + Assert.AreEqual(expectedValues.NiUMin, setting.NiUMin); } [Test] @@ -94,28 +94,28 @@ NumericsSettingsProvider numericsSettingsProvider = new NumericsSettingsProvider(); // Call - NumericsSettings numericsSettings = numericsSettingsProvider.GetNumericsSettings(failureMechanismType, subMechanismId, "unknown ringId"); + NumericsSetting numericsSetting = numericsSettingsProvider.GetNumericsSettings(failureMechanismType, subMechanismId, "unknown ringId"); // Assert - Assert.AreEqual(expectedCalculationTechniqueId, numericsSettings.CalculationTechniqueId); - Assert.AreEqual(expectedFormStartMethod, numericsSettings.FormStartMethod); - Assert.AreEqual(50, numericsSettings.FormNumberOfIterations); - Assert.AreEqual(0.15, numericsSettings.FormRelaxationFactor); - Assert.AreEqual(0.01, numericsSettings.FormEpsBeta); - Assert.AreEqual(0.01, numericsSettings.FormEpsHoh); - Assert.AreEqual(0.01, numericsSettings.FormEpsZFunc); - Assert.AreEqual(2, numericsSettings.DsStartMethod); - Assert.AreEqual(10000, numericsSettings.DsMinNumberOfIterations); - Assert.AreEqual(20000, numericsSettings.DsMaxNumberOfIterations); - Assert.AreEqual(0.1, numericsSettings.DsVarCoefficient); - Assert.AreEqual(-6.0, numericsSettings.NiUMin); - Assert.AreEqual(6.0, numericsSettings.NiUMax); - Assert.AreEqual(25, numericsSettings.NiNumberSteps); + Assert.AreEqual(expectedCalculationTechniqueId, numericsSetting.CalculationTechniqueId); + Assert.AreEqual(expectedFormStartMethod, numericsSetting.FormStartMethod); + Assert.AreEqual(50, numericsSetting.FormNumberOfIterations); + Assert.AreEqual(0.15, numericsSetting.FormRelaxationFactor); + Assert.AreEqual(0.01, numericsSetting.FormEpsBeta); + Assert.AreEqual(0.01, numericsSetting.FormEpsHoh); + Assert.AreEqual(0.01, numericsSetting.FormEpsZFunc); + Assert.AreEqual(2, numericsSetting.DsStartMethod); + Assert.AreEqual(10000, numericsSetting.DsMinNumberOfIterations); + Assert.AreEqual(20000, numericsSetting.DsMaxNumberOfIterations); + Assert.AreEqual(0.1, numericsSetting.DsVarCoefficient); + Assert.AreEqual(-6.0, numericsSetting.NiUMin); + Assert.AreEqual(6.0, numericsSetting.NiUMax); + Assert.AreEqual(25, numericsSetting.NiNumberSteps); } - private static NumericsSettings GetExpectedNumericsSettings() + private static NumericsSetting GetExpectedNumericsSettings() { - return new NumericsSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 20000, 100000, 0.1, -6, 6, 25); + return new NumericsSetting(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 20000, 100000, 0.1, -6, 6, 25); } } } \ No newline at end of file Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Ringtoets.HydraRing.Calculation.Test.csproj =================================================================== diff -u -ra4eed06be1ec058f2dea53b95ec62e3380ed75c5 -rc7843d3b8c846c4aab66ba32e67f883b6555932b --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Ringtoets.HydraRing.Calculation.Test.csproj (.../Ringtoets.HydraRing.Calculation.Test.csproj) (revision a4eed06be1ec058f2dea53b95ec62e3380ed75c5) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Ringtoets.HydraRing.Calculation.Test.csproj (.../Ringtoets.HydraRing.Calculation.Test.csproj) (revision c7843d3b8c846c4aab66ba32e67f883b6555932b) @@ -48,9 +48,6 @@ ..\..\..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll - - ..\..\..\..\packages\RhinoMocks.3.6.1\lib\net\Rhino.Mocks.dll - @@ -74,7 +71,7 @@ - + @@ -87,13 +84,13 @@ - + - - + + - + @@ -110,10 +107,6 @@ {3BBFD65B-B277-4E50-AE6D-BD24C3434609} Core.Common.Base - - {F49BD8B2-332A-4C91-A196-8CCE0A2C7D98} - Core.Common.Utils - {D749EE4C-CE50-4C17-BF01-9A953028C126} Core.Common.TestUtil @@ -122,10 +115,6 @@ {888d4097-8bc2-4703-9fb1-8744c94d525e} Ringtoets.HydraRing.Calculation - - {74cba865-9338-447f-bad9-28312446ae84} - Ringtoets.HydraRing.Calculation.TestUtil - Fisheye: Tag c7843d3b8c846c4aab66ba32e67f883b6555932b refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/test-data/Settings/DesignTableSettingsTest.csv'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/test-data/Settings/DesignTablesSettingsTest.csv =================================================================== diff -u --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/test-data/Settings/DesignTablesSettingsTest.csv (revision 0) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/test-data/Settings/DesignTablesSettingsTest.csv (revision c7843d3b8c846c4aab66ba32e67f883b6555932b) @@ -0,0 +1,5 @@ +"TrajectID;""Variabele"";""Min"";""Max""" +"205;""Toetspeil"";5;15" +"205;""Q"";5;15" +"11-1;""Toetspeil"";5;15" +"11-1;""Q"";5;15" Fisheye: Tag c7843d3b8c846c4aab66ba32e67f883b6555932b refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/test-data/Settings/HydraulicModelSettingsTest.csv'. Fisheye: No comparison available. Pass `N' to diff?