Index: Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Calculators/Assembly/FailureMechanismSectionAssemblyCalculator.cs =================================================================== diff -u -rb90b8432fcedf5597edc6a33f23f04e7612f88da -r712c1aad8e5486980f259491130e4ae07ea48149 --- Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Calculators/Assembly/FailureMechanismSectionAssemblyCalculator.cs (.../FailureMechanismSectionAssemblyCalculator.cs) (revision b90b8432fcedf5597edc6a33f23f04e7612f88da) +++ Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Calculators/Assembly/FailureMechanismSectionAssemblyCalculator.cs (.../FailureMechanismSectionAssemblyCalculator.cs) (revision 712c1aad8e5486980f259491130e4ae07ea48149) @@ -143,7 +143,7 @@ } } - public FailureMechanismSectionAssembly AssembleTailorMadeAssessment(TailorMadeAssessmentResultType tailorMadeAssessmentResult, + public FailureMechanismSectionAssembly AssembleTailorMadeAssessment(TailorMadeAssessmentProbabilityAndDetailedCalculationResultType tailorMadeAssessmentResult, double probability, IEnumerable categories) { Index: Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Calculators/Assembly/IFailureMechanismSectionAssemblyCalculator.cs =================================================================== diff -u -rc5ff1feae4c3520b11b6ea2df683d8e323705de6 -r712c1aad8e5486980f259491130e4ae07ea48149 --- Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Calculators/Assembly/IFailureMechanismSectionAssemblyCalculator.cs (.../IFailureMechanismSectionAssemblyCalculator.cs) (revision c5ff1feae4c3520b11b6ea2df683d8e323705de6) +++ Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Calculators/Assembly/IFailureMechanismSectionAssemblyCalculator.cs (.../IFailureMechanismSectionAssemblyCalculator.cs) (revision 712c1aad8e5486980f259491130e4ae07ea48149) @@ -89,7 +89,7 @@ /// A . /// Thrown when /// an error occurs when performing the assembly. - FailureMechanismSectionAssembly AssembleTailorMadeAssessment(TailorMadeAssessmentResultType tailorMadeAssessmentResult, + FailureMechanismSectionAssembly AssembleTailorMadeAssessment(TailorMadeAssessmentProbabilityAndDetailedCalculationResultType tailorMadeAssessmentResult, double probability, IEnumerable categories); Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/FailureMechanismSectionAssemblyCalculatorTest.cs =================================================================== diff -u -rb90b8432fcedf5597edc6a33f23f04e7612f88da -r712c1aad8e5486980f259491130e4ae07ea48149 --- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/FailureMechanismSectionAssemblyCalculatorTest.cs (.../FailureMechanismSectionAssemblyCalculatorTest.cs) (revision b90b8432fcedf5597edc6a33f23f04e7612f88da) +++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/FailureMechanismSectionAssemblyCalculatorTest.cs (.../FailureMechanismSectionAssemblyCalculatorTest.cs) (revision 712c1aad8e5486980f259491130e4ae07ea48149) @@ -89,9 +89,10 @@ var calculator = new FailureMechanismSectionAssemblyCalculator(factory); // Call - FailureMechanismSectionAssembly assembly = calculator.AssembleTailorMadeAssessment(random.NextEnumValue(), - probability, - categories); + FailureMechanismSectionAssembly assembly = calculator.AssembleTailorMadeAssessment( + random.NextEnumValue(), + probability, + categories); // Assert Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.VIIv, assembly.Group); Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Test/Calculators/Assembly/FailureMechanismSectionAssemblyCalculatorStubTest.cs =================================================================== diff -u -r5056f97154c3012f3aa30ad9a4fca336a275a737 -r712c1aad8e5486980f259491130e4ae07ea48149 --- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Test/Calculators/Assembly/FailureMechanismSectionAssemblyCalculatorStubTest.cs (.../FailureMechanismSectionAssemblyCalculatorStubTest.cs) (revision 5056f97154c3012f3aa30ad9a4fca336a275a737) +++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Test/Calculators/Assembly/FailureMechanismSectionAssemblyCalculatorStubTest.cs (.../FailureMechanismSectionAssemblyCalculatorStubTest.cs) (revision 712c1aad8e5486980f259491130e4ae07ea48149) @@ -54,7 +54,7 @@ Assert.IsNull(calculator.TailorMadeAssessmentCategoriesInput); Assert.AreEqual(0.0, calculator.TailorMadeAssessmentProbabilityInput); - Assert.AreEqual((TailorMadeAssessmentResultType) 0, calculator.TailorMadeAssessmentResultInput); + Assert.AreEqual((TailorMadeAssessmentProbabilityAndDetailedCalculationResultType) 0, calculator.TailorMadeProbabilityAndDetailedCalculationResult); Assert.IsNull(calculator.TailorMadeAssessmentAssemblyOutput); Assert.IsNull(calculator.CombinedSimpleAssemblyInput); @@ -315,7 +315,7 @@ // Call FailureMechanismSectionAssembly assembly = calculator.AssembleTailorMadeAssessment( - random.NextEnumValue(), + random.NextEnumValue(), random.NextDouble(), new[] { @@ -335,7 +335,7 @@ // Setup var random = new Random(39); double probability = random.NextDouble(); - var tailorMadeAssessmentResult = random.NextEnumValue(); + var tailorMadeAssessmentResult = random.NextEnumValue(); IEnumerable categoryInput = Enumerable.Empty(); var calculator = new FailureMechanismSectionAssemblyCalculatorStub(); @@ -344,7 +344,7 @@ calculator.AssembleTailorMadeAssessment(tailorMadeAssessmentResult, probability, categoryInput); // Assert - Assert.AreEqual(tailorMadeAssessmentResult, calculator.TailorMadeAssessmentResultInput); + Assert.AreEqual(tailorMadeAssessmentResult, calculator.TailorMadeProbabilityAndDetailedCalculationResult); Assert.AreEqual(probability, calculator.TailorMadeAssessmentProbabilityInput); Assert.AreSame(categoryInput, calculator.TailorMadeAssessmentCategoriesInput); } @@ -361,7 +361,7 @@ // Call TestDelegate test = () => calculator.AssembleTailorMadeAssessment( - random.NextEnumValue(), + random.NextEnumValue(), random.NextDouble(), new[] { Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.TestUtil/Calculators/Assembly/FailureMechanismSectionAssemblyCalculatorStub.cs =================================================================== diff -u -r5056f97154c3012f3aa30ad9a4fca336a275a737 -r712c1aad8e5486980f259491130e4ae07ea48149 --- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.TestUtil/Calculators/Assembly/FailureMechanismSectionAssemblyCalculatorStub.cs (.../FailureMechanismSectionAssemblyCalculatorStub.cs) (revision 5056f97154c3012f3aa30ad9a4fca336a275a737) +++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.TestUtil/Calculators/Assembly/FailureMechanismSectionAssemblyCalculatorStub.cs (.../FailureMechanismSectionAssemblyCalculatorStub.cs) (revision 712c1aad8e5486980f259491130e4ae07ea48149) @@ -78,9 +78,9 @@ public FailureMechanismSectionAssembly TailorMadeAssessmentAssemblyOutput { get; private set; } /// - /// Gets the result type of the tailor made assessment calculation. + /// Gets the result type of the tailor made assessment calculation with probability or detailed calculation result. /// - public TailorMadeAssessmentResultType TailorMadeAssessmentResultInput { get; private set; } + public TailorMadeAssessmentProbabilityAndDetailedCalculationResultType TailorMadeProbabilityAndDetailedCalculationResult { get; private set; } /// /// Gets the probability input of the tailor made assessment calculation. @@ -198,7 +198,7 @@ return DetailedAssessmentAssemblyOutput = new FailureMechanismSectionAssembly(0, FailureMechanismSectionAssemblyCategoryGroup.VIv); } - public FailureMechanismSectionAssembly AssembleTailorMadeAssessment(TailorMadeAssessmentResultType tailorMadeAssessmentResult, + public FailureMechanismSectionAssembly AssembleTailorMadeAssessment(TailorMadeAssessmentProbabilityAndDetailedCalculationResultType tailorMadeAssessmentResult, double probability, IEnumerable categories) { @@ -207,7 +207,7 @@ throw new FailureMechanismSectionAssemblyCalculatorException("Message", new Exception()); } - TailorMadeAssessmentResultInput = tailorMadeAssessmentResult; + TailorMadeProbabilityAndDetailedCalculationResult = tailorMadeAssessmentResult; TailorMadeAssessmentProbabilityInput = probability; TailorMadeAssessmentCategoriesInput = categories; Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Builders/FailureMechanismSectionResultColumnBuilder.cs =================================================================== diff -u -r1c6c2405bf85bf76ffd242478df9a10d4ae3c966 -r712c1aad8e5486980f259491130e4ae07ea48149 --- Ringtoets/Common/src/Ringtoets.Common.Forms/Builders/FailureMechanismSectionResultColumnBuilder.cs (.../FailureMechanismSectionResultColumnBuilder.cs) (revision 1c6c2405bf85bf76ffd242478df9a10d4ae3c966) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Builders/FailureMechanismSectionResultColumnBuilder.cs (.../FailureMechanismSectionResultColumnBuilder.cs) (revision 712c1aad8e5486980f259491130e4ae07ea48149) @@ -153,12 +153,12 @@ /// /// Adds a column to the showing a - /// . + /// . /// /// The to add the column to. /// The data property name of the column. /// Thrown when any parameter is null. - public static void AddTailorMadeAssessmentResultColumn(DataGridViewControl dataGridViewControl, string dataPropertyName) + public static void AddTailorMadeAssessmentProbabilityAndDetailedCalculationResultColumn(DataGridViewControl dataGridViewControl, string dataPropertyName) { if (dataGridViewControl == null) { @@ -170,14 +170,15 @@ throw new ArgumentNullException(nameof(dataPropertyName)); } - IEnumerable> dataSource = CreateEnumDisplayWrappers(); + IEnumerable> dataSource = + CreateEnumDisplayWrappers(); dataGridViewControl.AddComboBoxColumn( dataPropertyName, Resources.FailureMechanismResultView_TailorMadeAssessmentResult_DisplayName, dataSource, - nameof(EnumDisplayWrapper.Value), - nameof(EnumDisplayWrapper.DisplayName)); + nameof(EnumDisplayWrapper.Value), + nameof(EnumDisplayWrapper.DisplayName)); } /// Index: Ringtoets/Common/src/Ringtoets.Common.Primitives/Properties/Resources.Designer.cs =================================================================== diff -u -ree067be0b11728670314dd61f2dd885fd69f82ea -r712c1aad8e5486980f259491130e4ae07ea48149 --- Ringtoets/Common/src/Ringtoets.Common.Primitives/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision ee067be0b11728670314dd61f2dd885fd69f82ea) +++ Ringtoets/Common/src/Ringtoets.Common.Primitives/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 712c1aad8e5486980f259491130e4ae07ea48149) @@ -82,6 +82,15 @@ } /// + /// Looks up a localized string similar to VN. + /// + internal static string AssessmentResultType_Insufficient { + get { + return ResourceManager.GetString("AssessmentResultType_Insufficient", resourceCulture); + } + } + + /// /// Looks up a localized string similar to <selecteer>. /// internal static string AssessmentResultType_None { @@ -109,57 +118,48 @@ } /// - /// Looks up a localized string similar to VB. + /// Looks up a localized string similar to FV. /// - internal static string SimpleAssessmentResultType_AssessFurther { + internal static string AssessmentResultType_ProbabilityNegligible { get { - return ResourceManager.GetString("SimpleAssessmentResultType_AssessFurther", resourceCulture); + return ResourceManager.GetString("AssessmentResultType_ProbabilityNegligible", resourceCulture); } } /// - /// Looks up a localized string similar to NVT. + /// Looks up a localized string similar to V. /// - internal static string SimpleAssessmentResultType_NotApplicable { + internal static string AssessmentResultType_Sufficient { get { - return ResourceManager.GetString("SimpleAssessmentResultType_NotApplicable", resourceCulture); + return ResourceManager.GetString("AssessmentResultType_Sufficient", resourceCulture); } } /// - /// Looks up a localized string similar to FV. + /// Looks up a localized string similar to VB. /// - internal static string SimpleAssessmentResultType_ProbabilityNegligible { + internal static string SimpleAssessmentResultType_AssessFurther { get { - return ResourceManager.GetString("SimpleAssessmentResultType_ProbabilityNegligible", resourceCulture); + return ResourceManager.GetString("SimpleAssessmentResultType_AssessFurther", resourceCulture); } } /// - /// Looks up a localized string similar to WVT. + /// Looks up a localized string similar to NVT. /// - internal static string SimpleAssessmentResultValidityOnlyType_Applicable { + internal static string SimpleAssessmentResultType_NotApplicable { get { - return ResourceManager.GetString("SimpleAssessmentResultValidityOnlyType_Applicable", resourceCulture); + return ResourceManager.GetString("SimpleAssessmentResultType_NotApplicable", resourceCulture); } } /// - /// Looks up a localized string similar to VN. + /// Looks up a localized string similar to WVT. /// - internal static string TailorMadeAssessmentResultType_Insufficient { + internal static string SimpleAssessmentResultValidityOnlyType_Applicable { get { - return ResourceManager.GetString("TailorMadeAssessmentResultType_Insufficient", resourceCulture); + return ResourceManager.GetString("SimpleAssessmentResultValidityOnlyType_Applicable", resourceCulture); } } - - /// - /// Looks up a localized string similar to V. - /// - internal static string TailorMadeAssessmentResultType_Sufficient { - get { - return ResourceManager.GetString("TailorMadeAssessmentResultType_Sufficient", resourceCulture); - } - } } } Index: Ringtoets/Common/src/Ringtoets.Common.Primitives/Properties/Resources.resx =================================================================== diff -u -ree067be0b11728670314dd61f2dd885fd69f82ea -r712c1aad8e5486980f259491130e4ae07ea48149 --- Ringtoets/Common/src/Ringtoets.Common.Primitives/Properties/Resources.resx (.../Resources.resx) (revision ee067be0b11728670314dd61f2dd885fd69f82ea) +++ Ringtoets/Common/src/Ringtoets.Common.Primitives/Properties/Resources.resx (.../Resources.resx) (revision 712c1aad8e5486980f259491130e4ae07ea48149) @@ -132,16 +132,16 @@ NVT - + FV WVT - + VN - + V \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Primitives/Ringtoets.Common.Primitives.csproj =================================================================== diff -u -ree067be0b11728670314dd61f2dd885fd69f82ea -r712c1aad8e5486980f259491130e4ae07ea48149 --- Ringtoets/Common/src/Ringtoets.Common.Primitives/Ringtoets.Common.Primitives.csproj (.../Ringtoets.Common.Primitives.csproj) (revision ee067be0b11728670314dd61f2dd885fd69f82ea) +++ Ringtoets/Common/src/Ringtoets.Common.Primitives/Ringtoets.Common.Primitives.csproj (.../Ringtoets.Common.Primitives.csproj) (revision 712c1aad8e5486980f259491130e4ae07ea48149) @@ -11,7 +11,8 @@ - + + True @@ -37,6 +38,7 @@ ResXFileCodeGenerator Resources.Designer.cs + Designer \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Primitives/SimpleAssessmentResultType.cs =================================================================== diff -u -ree067be0b11728670314dd61f2dd885fd69f82ea -r712c1aad8e5486980f259491130e4ae07ea48149 --- Ringtoets/Common/src/Ringtoets.Common.Primitives/SimpleAssessmentResultType.cs (.../SimpleAssessmentResultType.cs) (revision ee067be0b11728670314dd61f2dd885fd69f82ea) +++ Ringtoets/Common/src/Ringtoets.Common.Primitives/SimpleAssessmentResultType.cs (.../SimpleAssessmentResultType.cs) (revision 712c1aad8e5486980f259491130e4ae07ea48149) @@ -47,7 +47,7 @@ /// The probability of failure for the failure mechanism /// section is negligible. /// - [ResourcesDisplayName(typeof(Resources), nameof(Resources.SimpleAssessmentResultType_ProbabilityNegligible))] + [ResourcesDisplayName(typeof(Resources), nameof(Resources.AssessmentResultType_ProbabilityNegligible))] ProbabilityNegligible = 3, /// Index: Ringtoets/Common/src/Ringtoets.Common.Primitives/TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.cs =================================================================== diff -u --- Ringtoets/Common/src/Ringtoets.Common.Primitives/TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.cs (revision 0) +++ Ringtoets/Common/src/Ringtoets.Common.Primitives/TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.cs (revision 712c1aad8e5486980f259491130e4ae07ea48149) @@ -0,0 +1,70 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using Core.Common.Util.Attributes; +using Ringtoets.Common.Primitives.Properties; + +namespace Ringtoets.Common.Primitives +{ + /// + /// This enum defines the possible result types for a tailor made assessment + /// on a failure mechanism section with either a probability or detailed + /// calculation result. + /// + public enum TailorMadeAssessmentProbabilityAndDetailedCalculationResultType + { + /// + /// No option has been selected for this failure + /// mechanism section. + /// + [ResourcesDisplayName(typeof(Resources), nameof(Resources.AssessmentResultType_None))] + None = 1, + + /// + /// The calculated probability for this failure + /// mechanism section has to be entered. + /// + [ResourcesDisplayName(typeof(Resources), nameof(Resources.AssessmentResultType_Probability))] + Probability = 2, + + /// + /// The assessment for this failure mechanism + /// section was sufficient. + /// + [ResourcesDisplayName(typeof(Resources), nameof(Resources.AssessmentResultType_Sufficient))] + Sufficient = 3, + + /// + /// The assessment for this failure mechanism + /// section was insufficient. + /// + [ResourcesDisplayName(typeof(Resources), nameof(Resources.AssessmentResultType_Insufficient))] + Insufficient = 4, + + /// + /// No assessment has been performed for this failure + /// mechanism section. + /// + [ResourcesDisplayName(typeof(Resources), nameof(Resources.AssessmentResultType_NotAssessed))] + NotAssessed = 5 + + } +} \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Primitives/TailorMadeAssessmentProbabilityCalculationResultType.cs =================================================================== diff -u --- Ringtoets/Common/src/Ringtoets.Common.Primitives/TailorMadeAssessmentProbabilityCalculationResultType.cs (revision 0) +++ Ringtoets/Common/src/Ringtoets.Common.Primitives/TailorMadeAssessmentProbabilityCalculationResultType.cs (revision 712c1aad8e5486980f259491130e4ae07ea48149) @@ -0,0 +1,62 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using Core.Common.Util.Attributes; +using Ringtoets.Common.Primitives.Properties; + +namespace Ringtoets.Common.Primitives +{ + /// + /// This enum defines the possible result types for a tailor made assessment + /// on a failure mechanism section with a probability calculation. + /// + public enum TailorMadeAssessmentProbabilityCalculationResultType + { + /// + /// No option has been selected for this failure + /// mechanism section. + /// + [ResourcesDisplayName(typeof(Resources), nameof(Resources.AssessmentResultType_None))] + None = 1, + + /// + /// The probability of failure for the failure mechanism + /// section is negligible. + /// + [ResourcesDisplayName(typeof(Resources), nameof(Resources.AssessmentResultType_ProbabilityNegligible))] + ProbabilityNegligible = 2, + + /// + /// The calculated probability for this failure + /// mechanism section has to be entered. + /// + [ResourcesDisplayName(typeof(Resources), nameof(Resources.AssessmentResultType_Sufficient))] + Probability = 3, + + /// + /// No assessment has been performed for this failure + /// mechanism section. + /// + [ResourcesDisplayName(typeof(Resources), nameof(Resources.AssessmentResultType_NotAssessed))] + NotAssessed = 4 + + } +} \ No newline at end of file Fisheye: Tag 712c1aad8e5486980f259491130e4ae07ea48149 refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.Primitives/TailorMadeAssessmentResultType.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Builders/FailureMechanismSectionResultColumnBuilderTest.cs =================================================================== diff -u -r1c6c2405bf85bf76ffd242478df9a10d4ae3c966 -r712c1aad8e5486980f259491130e4ae07ea48149 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Builders/FailureMechanismSectionResultColumnBuilderTest.cs (.../FailureMechanismSectionResultColumnBuilderTest.cs) (revision 1c6c2405bf85bf76ffd242478df9a10d4ae3c966) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Builders/FailureMechanismSectionResultColumnBuilderTest.cs (.../FailureMechanismSectionResultColumnBuilderTest.cs) (revision 712c1aad8e5486980f259491130e4ae07ea48149) @@ -281,29 +281,30 @@ #region Tailor Made Assessment [Test] - public void AddTailorMadeAssessmentResultColumn_DataGridViewControlNull_ThrowsArgumentNullException() + public void AddTailorMadeAssessmentProbabilityAndDetailedCalculationResultColumn_DataGridViewControlNull_ThrowsArgumentNullException() { // Call - TestDelegate test = () => FailureMechanismSectionResultColumnBuilder.AddTailorMadeAssessmentResultColumn(null, "property"); + TestDelegate test = () => FailureMechanismSectionResultColumnBuilder.AddTailorMadeAssessmentProbabilityAndDetailedCalculationResultColumn(null, "property"); // Assert var exception = Assert.Throws(test); Assert.AreEqual("dataGridViewControl", exception.ParamName); } [Test] - public void AddTailorMadeAssessmentResultColumn_DataPropertyNameNull_ThrowsArgumentNullException() + public void AddTailorMadeAssessmentProbabilityAndDetailedCalculationResultColumn_DataPropertyNameNull_ThrowsArgumentNullException() { // Call - TestDelegate test = () => FailureMechanismSectionResultColumnBuilder.AddTailorMadeAssessmentResultColumn(new DataGridViewControl(), null); + TestDelegate test = () => + FailureMechanismSectionResultColumnBuilder.AddTailorMadeAssessmentProbabilityAndDetailedCalculationResultColumn(new DataGridViewControl(), null); // Assert var exception = Assert.Throws(test); Assert.AreEqual("dataPropertyName", exception.ParamName); } [Test] - public void AddTailorMadeAssessmentResultColumn_WithParameters_AddsColumnToDataGridViewControl() + public void AddTailorMadeAssessmentProbabilityAndDetailedCalculationResultColumn_WithParameters_AddsColumnToDataGridViewControl() { // Setup using (var form = new Form()) @@ -317,7 +318,7 @@ Assert.AreEqual(0, dataGridView.ColumnCount); // Call - FailureMechanismSectionResultColumnBuilder.AddTailorMadeAssessmentResultColumn(control, dataPropertyName); + FailureMechanismSectionResultColumnBuilder.AddTailorMadeAssessmentProbabilityAndDetailedCalculationResultColumn(control, dataPropertyName); // Assert Assert.AreEqual(1, dataGridView.ColumnCount); @@ -328,8 +329,10 @@ Assert.AreEqual("Value", columnData.ValueMember); Assert.AreEqual("DisplayName", columnData.DisplayMember); - IEnumerable> expectedDataSource = CreateExpectedEnumDisplayWrappers(); - AssertEnumDisplayWrappersAreEqual(expectedDataSource, (EnumDisplayWrapper[]) columnData.DataSource); + IEnumerable> expectedDataSource = + CreateExpectedEnumDisplayWrappers(); + AssertEnumDisplayWrappersAreEqual(expectedDataSource, + (EnumDisplayWrapper[]) columnData.DataSource); } } Index: Ringtoets/Common/test/Ringtoets.Common.Primitives.Test/Ringtoets.Common.Primitives.Test.csproj =================================================================== diff -u -ree067be0b11728670314dd61f2dd885fd69f82ea -r712c1aad8e5486980f259491130e4ae07ea48149 --- Ringtoets/Common/test/Ringtoets.Common.Primitives.Test/Ringtoets.Common.Primitives.Test.csproj (.../Ringtoets.Common.Primitives.Test.csproj) (revision ee067be0b11728670314dd61f2dd885fd69f82ea) +++ Ringtoets/Common/test/Ringtoets.Common.Primitives.Test/Ringtoets.Common.Primitives.Test.csproj (.../Ringtoets.Common.Primitives.Test.csproj) (revision 712c1aad8e5486980f259491130e4ae07ea48149) @@ -14,7 +14,8 @@ - + + Index: Ringtoets/Common/test/Ringtoets.Common.Primitives.Test/TailorMadeAssessmentProbabilityAndDetailedCalculationResultTypeTest.cs =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Primitives.Test/TailorMadeAssessmentProbabilityAndDetailedCalculationResultTypeTest.cs (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Primitives.Test/TailorMadeAssessmentProbabilityAndDetailedCalculationResultTypeTest.cs (revision 712c1aad8e5486980f259491130e4ae07ea48149) @@ -0,0 +1,81 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System.Collections.Generic; +using Core.Common.TestUtil; +using NUnit.Framework; + +namespace Ringtoets.Common.Primitives.Test +{ + [TestFixture] + public class TailorMadeAssessmentProbabilityAndDetailedCalculationResultTypeTest : EnumWithDisplayNameTestFixture + { + protected override IDictionary ExpectedValueForEnumValues + { + get + { + return new Dictionary + { + { + TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.None, 1 + }, + { + TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.Probability, 2 + }, + { + TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.Sufficient, 3 + }, + { + TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.Insufficient, 4 + }, + { + TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.NotAssessed, 5 + } + }; + } + } + + protected override IDictionary ExpectedDisplayNameForEnumValues + { + get + { + return new Dictionary + { + { + TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.None, "" + }, + { + TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.Probability, "Faalkans" + }, + { + TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.Sufficient, "V" + }, + { + TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.Insufficient, "VN" + }, + { + TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.NotAssessed, "NGO" + } + }; + } + } + } +} \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Primitives.Test/TailorMadeAssessmentProbabilityCalculationResultTypeTest.cs =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Primitives.Test/TailorMadeAssessmentProbabilityCalculationResultTypeTest.cs (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Primitives.Test/TailorMadeAssessmentProbabilityCalculationResultTypeTest.cs (revision 712c1aad8e5486980f259491130e4ae07ea48149) @@ -0,0 +1,75 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System.Collections.Generic; +using Core.Common.TestUtil; +using NUnit.Framework; + +namespace Ringtoets.Common.Primitives.Test +{ + [TestFixture] + public class TailorMadeAssessmentProbabilityCalculationResultTypeTest : EnumWithDisplayNameTestFixture + { + protected override IDictionary ExpectedValueForEnumValues + { + get + { + return new Dictionary + { + { + TailorMadeAssessmentProbabilityCalculationResultType.None, 1 + }, + { + TailorMadeAssessmentProbabilityCalculationResultType.ProbabilityNegligible, 2 + }, + { + TailorMadeAssessmentProbabilityCalculationResultType.Probability, 3 + }, + { + TailorMadeAssessmentProbabilityCalculationResultType.NotAssessed, 4 + } + }; + } + } + + protected override IDictionary ExpectedDisplayNameForEnumValues + { + get + { + return new Dictionary + { + { + TailorMadeAssessmentProbabilityCalculationResultType.None, "" + }, + { + TailorMadeAssessmentProbabilityCalculationResultType.ProbabilityNegligible, "FV" + }, + { + TailorMadeAssessmentProbabilityCalculationResultType.Probability, "Faalkans" + }, + { + TailorMadeAssessmentProbabilityCalculationResultType.NotAssessed, "NGO" + } + }; + } + } + } +} \ No newline at end of file Fisheye: Tag 712c1aad8e5486980f259491130e4ae07ea48149 refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.Primitives.Test/TailorMadeAssessmentResultTypeTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/SectionResults/MacroStabilityOutwardsFailureMechanismSectionResult.cs =================================================================== diff -u -r365e06f746e65c52a04743c92b427f3e743520b9 -r712c1aad8e5486980f259491130e4ae07ea48149 --- Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/SectionResults/MacroStabilityOutwardsFailureMechanismSectionResult.cs (.../MacroStabilityOutwardsFailureMechanismSectionResult.cs) (revision 365e06f746e65c52a04743c92b427f3e743520b9) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/StandAlone/SectionResults/MacroStabilityOutwardsFailureMechanismSectionResult.cs (.../MacroStabilityOutwardsFailureMechanismSectionResult.cs) (revision 712c1aad8e5486980f259491130e4ae07ea48149) @@ -49,7 +49,7 @@ SimpleAssessmentResult = SimpleAssessmentResultType.None; DetailedAssessmentResult = DetailedAssessmentResultType.Probability; DetailedAssessmentProbability = double.NaN; - TailorMadeAssessmentResult = TailorMadeAssessmentResultType.None; + TailorMadeAssessmentResult = TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.None; TailorMadeAssessmentProbability = double.NaN; ManualAssemblyCategoryGroup = FailureMechanismSectionAssemblyCategoryGroup.None; } @@ -67,7 +67,7 @@ /// /// Gets or sets the tailor made assessment result. /// - public TailorMadeAssessmentResultType TailorMadeAssessmentResult { get; set; } + public TailorMadeAssessmentProbabilityAndDetailedCalculationResultType TailorMadeAssessmentResult { get; set; } /// /// Gets or sets the value for the detailed assessment of safety per failure mechanism section as a probability. Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultRows/MacroStabilityOutwardsSectionResultRow.cs =================================================================== diff -u -r675f7c90056894a60a20233cd9f146a0f84ceb01 -r712c1aad8e5486980f259491130e4ae07ea48149 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultRows/MacroStabilityOutwardsSectionResultRow.cs (.../MacroStabilityOutwardsSectionResultRow.cs) (revision 675f7c90056894a60a20233cd9f146a0f84ceb01) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultRows/MacroStabilityOutwardsSectionResultRow.cs (.../MacroStabilityOutwardsSectionResultRow.cs) (revision 712c1aad8e5486980f259491130e4ae07ea48149) @@ -121,7 +121,7 @@ /// /// Gets or sets the value representing the tailor made assessment result. /// - public TailorMadeAssessmentResultType TailorMadeAssessmentResult + public TailorMadeAssessmentProbabilityAndDetailedCalculationResultType TailorMadeAssessmentResult { get { Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/MacroStabilityOutwardsResultView.cs =================================================================== diff -u -r1c6c2405bf85bf76ffd242478df9a10d4ae3c966 -r712c1aad8e5486980f259491130e4ae07ea48149 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/MacroStabilityOutwardsResultView.cs (.../MacroStabilityOutwardsResultView.cs) (revision 1c6c2405bf85bf76ffd242478df9a10d4ae3c966) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/MacroStabilityOutwardsResultView.cs (.../MacroStabilityOutwardsResultView.cs) (revision 712c1aad8e5486980f259491130e4ae07ea48149) @@ -98,7 +98,7 @@ DataGridViewControl, nameof(MacroStabilityOutwardsSectionResultRow.DetailedAssessmentProbability)); - FailureMechanismSectionResultColumnBuilder.AddTailorMadeAssessmentResultColumn( + FailureMechanismSectionResultColumnBuilder.AddTailorMadeAssessmentProbabilityAndDetailedCalculationResultColumn( DataGridViewControl, nameof(MacroStabilityOutwardsSectionResultRow.TailorMadeAssessmentResult)); @@ -155,7 +155,7 @@ { tailorMadeAssessmentProbabilityIndex }, - row => row.TailorMadeAssessmentResult != TailorMadeAssessmentResultType.Probability), + row => row.TailorMadeAssessmentResult != TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.Probability), new DataGridViewColumnFormattingRule( new[] { Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/MacroStabilityOutwardsFailureMechanismSectionResultAssemblyFactoryTest.cs =================================================================== diff -u -r675f7c90056894a60a20233cd9f146a0f84ceb01 -r712c1aad8e5486980f259491130e4ae07ea48149 --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/MacroStabilityOutwardsFailureMechanismSectionResultAssemblyFactoryTest.cs (.../MacroStabilityOutwardsFailureMechanismSectionResultAssemblyFactoryTest.cs) (revision 675f7c90056894a60a20233cd9f146a0f84ceb01) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/AssemblyFactories/MacroStabilityOutwardsFailureMechanismSectionResultAssemblyFactoryTest.cs (.../MacroStabilityOutwardsFailureMechanismSectionResultAssemblyFactoryTest.cs) (revision 712c1aad8e5486980f259491130e4ae07ea48149) @@ -370,7 +370,7 @@ // Assert Assert.AreEqual(sectionResult.TailorMadeAssessmentProbability, calculator.TailorMadeAssessmentProbabilityInput); - Assert.AreEqual(sectionResult.TailorMadeAssessmentResult, calculator.TailorMadeAssessmentResultInput); + Assert.AreEqual(sectionResult.TailorMadeAssessmentResult, calculator.TailorMadeProbabilityAndDetailedCalculationResult); Assert.AreEqual(assessmentSection.FailureMechanismContribution.SignalingNorm, categoryCalculator.SignalingNorm); Assert.AreEqual(assessmentSection.FailureMechanismContribution.LowerLimitNorm, categoryCalculator.LowerLimitNorm); Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/SectionResults/MacroStabilityOutwardsFailureMechanismSectionResultTest.cs =================================================================== diff -u -r365e06f746e65c52a04743c92b427f3e743520b9 -r712c1aad8e5486980f259491130e4ae07ea48149 --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/SectionResults/MacroStabilityOutwardsFailureMechanismSectionResultTest.cs (.../MacroStabilityOutwardsFailureMechanismSectionResultTest.cs) (revision 365e06f746e65c52a04743c92b427f3e743520b9) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/StandAlone/SectionResults/MacroStabilityOutwardsFailureMechanismSectionResultTest.cs (.../MacroStabilityOutwardsFailureMechanismSectionResultTest.cs) (revision 712c1aad8e5486980f259491130e4ae07ea48149) @@ -47,7 +47,7 @@ Assert.AreEqual(SimpleAssessmentResultType.None, result.SimpleAssessmentResult); Assert.AreEqual(DetailedAssessmentResultType.Probability, result.DetailedAssessmentResult); Assert.IsNaN(result.DetailedAssessmentProbability); - Assert.AreEqual(TailorMadeAssessmentResultType.None, result.TailorMadeAssessmentResult); + Assert.AreEqual(TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.None, result.TailorMadeAssessmentResult); Assert.IsNaN(result.TailorMadeAssessmentProbability); Assert.IsFalse(result.UseManualAssemblyCategoryGroup); Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.None, result.ManualAssemblyCategoryGroup); Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MacroStabilityOutwardsSectionResultRowTest.cs =================================================================== diff -u -r675f7c90056894a60a20233cd9f146a0f84ceb01 -r712c1aad8e5486980f259491130e4ae07ea48149 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MacroStabilityOutwardsSectionResultRowTest.cs (.../MacroStabilityOutwardsSectionResultRowTest.cs) (revision 675f7c90056894a60a20233cd9f146a0f84ceb01) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MacroStabilityOutwardsSectionResultRowTest.cs (.../MacroStabilityOutwardsSectionResultRowTest.cs) (revision 712c1aad8e5486980f259491130e4ae07ea48149) @@ -288,7 +288,7 @@ mocks.ReplayAll(); var random = new Random(39); - var newValue = random.NextEnumValue(); + var newValue = random.NextEnumValue(); FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); var result = new MacroStabilityOutwardsFailureMechanismSectionResult(section); Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/MacrostabilityOutwardsResultViewTest.cs =================================================================== diff -u -r5d6a25ce612951e84d7e1408164da6ff3847b6d4 -r712c1aad8e5486980f259491130e4ae07ea48149 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/MacrostabilityOutwardsResultViewTest.cs (.../MacrostabilityOutwardsResultViewTest.cs) (revision 5d6a25ce612951e84d7e1408164da6ff3847b6d4) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/MacrostabilityOutwardsResultViewTest.cs (.../MacrostabilityOutwardsResultViewTest.cs) (revision 712c1aad8e5486980f259491130e4ae07ea48149) @@ -224,7 +224,7 @@ FailureMechanismSectionTestFactory.CreateFailureMechanismSection()) { SimpleAssessmentResult = simpleAssessmentResult, - TailorMadeAssessmentResult = TailorMadeAssessmentResultType.Probability + TailorMadeAssessmentResult = TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.Probability }; var sectionResults = new ObservableList { @@ -297,13 +297,13 @@ } [Test] - [TestCase(TailorMadeAssessmentResultType.NotAssessed, false)] - [TestCase(TailorMadeAssessmentResultType.Insufficient, false)] - [TestCase(TailorMadeAssessmentResultType.None, false)] - [TestCase(TailorMadeAssessmentResultType.Sufficient, false)] - [TestCase(TailorMadeAssessmentResultType.Probability, true)] + [TestCase(TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.NotAssessed, false)] + [TestCase(TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.Insufficient, false)] + [TestCase(TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.None, false)] + [TestCase(TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.Sufficient, false)] + [TestCase(TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.Probability, true)] public void FailureMechanismResultView_TailorMadeAssessmentResultSet_CellDisabledEnabled( - TailorMadeAssessmentResultType tailorMadeAssessmentResult, + TailorMadeAssessmentProbabilityAndDetailedCalculationResultType tailorMadeAssessmentResult, bool cellEnabled) { // Setup @@ -354,7 +354,7 @@ var result = new MacroStabilityOutwardsFailureMechanismSectionResult( FailureMechanismSectionTestFactory.CreateFailureMechanismSection()) { - TailorMadeAssessmentResult = TailorMadeAssessmentResultType.Probability, + TailorMadeAssessmentResult = TailorMadeAssessmentProbabilityAndDetailedCalculationResultType.Probability, UseManualAssemblyCategoryGroup = useManualAssemblyCategoryGroup }; var sectionResults = new ObservableList