Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/ClosingStructures/ClosingStructuresFailureMechanismSectionResultCreateExtensions.cs =================================================================== diff -u -r05ff5915c14e0d22ffddb03b7f98197d099736f2 -rbfd84af2152b697561a499f15caa6d1f9f5fd4ed --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/ClosingStructures/ClosingStructuresFailureMechanismSectionResultCreateExtensions.cs (.../ClosingStructuresFailureMechanismSectionResultCreateExtensions.cs) (revision 05ff5915c14e0d22ffddb03b7f98197d099736f2) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/ClosingStructures/ClosingStructuresFailureMechanismSectionResultCreateExtensions.cs (.../ClosingStructuresFailureMechanismSectionResultCreateExtensions.cs) (revision bfd84af2152b697561a499f15caa6d1f9f5fd4ed) @@ -50,7 +50,7 @@ var sectionResultEntity = new ClosingStructuresSectionResultEntity { LayerOne = Convert.ToByte(result.AssessmentLayerOne), - LayerThree = result.AssessmentLayerThree.ToNaNAsNull() + LayerThree = result.TailorMadeAssessmentProbability.ToNaNAsNull() }; if (result.Calculation != null) { Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/ClosingStructures/ClosingStructuresSectionResultEntityReadExtensions.cs =================================================================== diff -u -re0daf026606d3c52665d1574fb0f0f69d10edec7 -rbfd84af2152b697561a499f15caa6d1f9f5fd4ed --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/ClosingStructures/ClosingStructuresSectionResultEntityReadExtensions.cs (.../ClosingStructuresSectionResultEntityReadExtensions.cs) (revision e0daf026606d3c52665d1574fb0f0f69d10edec7) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/ClosingStructures/ClosingStructuresSectionResultEntityReadExtensions.cs (.../ClosingStructuresSectionResultEntityReadExtensions.cs) (revision bfd84af2152b697561a499f15caa6d1f9f5fd4ed) @@ -58,7 +58,7 @@ } sectionResult.AssessmentLayerOne = (AssessmentLayerOneState) entity.LayerOne; - sectionResult.AssessmentLayerThree = (RoundedDouble) entity.LayerThree.ToNullAsNaN(); + sectionResult.TailorMadeAssessmentProbability = entity.LayerThree.ToNullAsNaN(); if (entity.ClosingStructuresCalculationEntity != null) { Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/ClosingStructures/ClosingStructuresFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r05ff5915c14e0d22ffddb03b7f98197d099736f2 -rbfd84af2152b697561a499f15caa6d1f9f5fd4ed --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/ClosingStructures/ClosingStructuresFailureMechanismSectionResultCreateExtensionsTest.cs (.../ClosingStructuresFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 05ff5915c14e0d22ffddb03b7f98197d099736f2) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/ClosingStructures/ClosingStructuresFailureMechanismSectionResultCreateExtensionsTest.cs (.../ClosingStructuresFailureMechanismSectionResultCreateExtensionsTest.cs) (revision bfd84af2152b697561a499f15caa6d1f9f5fd4ed) @@ -55,20 +55,20 @@ // Setup var random = new Random(21); var assessmentLayerOneResult = random.NextEnumValue(); - RoundedDouble assessmentLayerThreeResult = random.NextRoundedDouble(); + double tailorMadeAssessmentProbability = random.NextDouble(); var sectionResult = new ClosingStructuresFailureMechanismSectionResult(new TestFailureMechanismSection()) { AssessmentLayerOne = assessmentLayerOneResult, - AssessmentLayerThree = assessmentLayerThreeResult + TailorMadeAssessmentProbability = tailorMadeAssessmentProbability }; // Call ClosingStructuresSectionResultEntity result = sectionResult.Create(new PersistenceRegistry()); // Assert Assert.AreEqual(Convert.ToByte(assessmentLayerOneResult), result.LayerOne); - Assert.AreEqual(assessmentLayerThreeResult, result.LayerThree); + Assert.AreEqual(tailorMadeAssessmentProbability, result.LayerThree); Assert.IsNull(result.ClosingStructuresCalculationEntityId); } @@ -78,7 +78,7 @@ // Setup var sectionResult = new ClosingStructuresFailureMechanismSectionResult(new TestFailureMechanismSection()) { - AssessmentLayerThree = RoundedDouble.NaN + TailorMadeAssessmentProbability = double.NaN }; // Call Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs =================================================================== diff -u -r8d37f4040238a84405d8f08363ec706232a35326 -rbfd84af2152b697561a499f15caa6d1f9f5fd4ed --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs (.../StorageSqLiteIntegrationTest.cs) (revision 8d37f4040238a84405d8f08363ec706232a35326) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs (.../StorageSqLiteIntegrationTest.cs) (revision bfd84af2152b697561a499f15caa6d1f9f5fd4ed) @@ -905,7 +905,7 @@ (expectedItem, actualItem) => { Assert.AreEqual(expectedItem.AssessmentLayerOne, actualItem.AssessmentLayerOne); - Assert.AreEqual(expectedItem.AssessmentLayerThree, actualItem.AssessmentLayerThree); + Assert.AreEqual(expectedItem.TailorMadeAssessmentProbability, actualItem.TailorMadeAssessmentProbability); if (expectedItem.Calculation == null) { Assert.IsNull(actualItem.Calculation); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ClosingStructures/ClosingStructuresSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -r05ff5915c14e0d22ffddb03b7f98197d099736f2 -rbfd84af2152b697561a499f15caa6d1f9f5fd4ed --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ClosingStructures/ClosingStructuresSectionResultEntityReadExtensionsTest.cs (.../ClosingStructuresSectionResultEntityReadExtensionsTest.cs) (revision 05ff5915c14e0d22ffddb03b7f98197d099736f2) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ClosingStructures/ClosingStructuresSectionResultEntityReadExtensionsTest.cs (.../ClosingStructuresSectionResultEntityReadExtensionsTest.cs) (revision bfd84af2152b697561a499f15caa6d1f9f5fd4ed) @@ -89,7 +89,7 @@ // Assert Assert.AreEqual(layerOne, sectionResult.AssessmentLayerOne); - Assert.AreEqual(layerThree, sectionResult.AssessmentLayerThree, 1e-6); + Assert.AreEqual(layerThree, sectionResult.TailorMadeAssessmentProbability, 1e-6); Assert.IsNull(sectionResult.Calculation); } @@ -117,7 +117,7 @@ // Assert Assert.AreEqual(layerOne, sectionResult.AssessmentLayerOne); - Assert.IsNaN(sectionResult.AssessmentLayerThree); + Assert.IsNaN(sectionResult.TailorMadeAssessmentProbability); Assert.IsNull(sectionResult.Calculation); } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs =================================================================== diff -u -r8d37f4040238a84405d8f08363ec706232a35326 -rbfd84af2152b697561a499f15caa6d1f9f5fd4ed --- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision 8d37f4040238a84405d8f08363ec706232a35326) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision bfd84af2152b697561a499f15caa6d1f9f5fd4ed) @@ -732,7 +732,7 @@ foreach (ClosingStructuresFailureMechanismSectionResult sectionResult in sectionResults) { sectionResult.AssessmentLayerOne = GetAssessmentLayerOneState(); - sectionResult.AssessmentLayerThree = (RoundedDouble) random.NextDouble(); + sectionResult.TailorMadeAssessmentProbability = random.NextDouble(); if (!firstSectionResultHasCalculation) { sectionResult.Calculation = calculation; Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresFailureMechanismSectionResult.cs =================================================================== diff -u -r81babcd71546964a4544b5400dbf7076d11ffddb -rbfd84af2152b697561a499f15caa6d1f9f5fd4ed --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresFailureMechanismSectionResult.cs (.../ClosingStructuresFailureMechanismSectionResult.cs) (revision 81babcd71546964a4544b5400dbf7076d11ffddb) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresFailureMechanismSectionResult.cs (.../ClosingStructuresFailureMechanismSectionResult.cs) (revision bfd84af2152b697561a499f15caa6d1f9f5fd4ed) @@ -34,7 +34,7 @@ /// public class ClosingStructuresFailureMechanismSectionResult : FailureMechanismSectionResult { - private double assessmentLayerThree; + private double tailorMadeAssessmentProbability; private double manualAssemblyProbability; /// @@ -47,7 +47,7 @@ SimpleAssessmentResult = SimpleAssessmentResultType.None; DetailedAssessmentResult = DetailedAssessmentResultType.Probability; TailorMadeAssessmentResult = TailorMadeAssessmentProbabilityCalculationResultType.None; - assessmentLayerThree = double.NaN; + TailorMadeAssessmentProbability = double.NaN; ManualAssemblyProbability = double.NaN; } @@ -73,22 +73,21 @@ public TailorMadeAssessmentProbabilityCalculationResultType TailorMadeAssessmentResult { get; set; } /// - /// Gets or sets the value of the tailored assessment of safety. + /// Gets or sets the value of the tailor made assessment of safety per failure mechanism section as a probability. /// - /// Thrown when - /// is outside of the valid ranges. - public double AssessmentLayerThree + /// Thrown when is not in range [0,1]. + public double TailorMadeAssessmentProbability { get { - return assessmentLayerThree; + return tailorMadeAssessmentProbability; } set { ProbabilityHelper.ValidateProbability(value, null, RingtoetsCommonDataResources.ArbitraryProbabilityFailureMechanismSectionResult_AssessmentProbability_Value_needs_to_be_in_Range_0_, true); - assessmentLayerThree = value; + tailorMadeAssessmentProbability = value; } } Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresFailureMechanismSectionResultRow.cs =================================================================== diff -u -re5d2b62a6626e9d34433859f6dccfcf5a1eff783 -rbfd84af2152b697561a499f15caa6d1f9f5fd4ed --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresFailureMechanismSectionResultRow.cs (.../ClosingStructuresFailureMechanismSectionResultRow.cs) (revision e5d2b62a6626e9d34433859f6dccfcf5a1eff783) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresFailureMechanismSectionResultRow.cs (.../ClosingStructuresFailureMechanismSectionResultRow.cs) (revision bfd84af2152b697561a499f15caa6d1f9f5fd4ed) @@ -91,11 +91,11 @@ { get { - return SectionResult.AssessmentLayerThree; + return SectionResult.TailorMadeAssessmentProbability; } set { - SectionResult.AssessmentLayerThree = value; + SectionResult.TailorMadeAssessmentProbability = value; } } Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresFailureMechanismSectionResultTest.cs =================================================================== diff -u -r81babcd71546964a4544b5400dbf7076d11ffddb -rbfd84af2152b697561a499f15caa6d1f9f5fd4ed --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresFailureMechanismSectionResultTest.cs (.../ClosingStructuresFailureMechanismSectionResultTest.cs) (revision 81babcd71546964a4544b5400dbf7076d11ffddb) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresFailureMechanismSectionResultTest.cs (.../ClosingStructuresFailureMechanismSectionResultTest.cs) (revision bfd84af2152b697561a499f15caa6d1f9f5fd4ed) @@ -46,7 +46,7 @@ Assert.AreEqual(SimpleAssessmentResultType.None, sectionResult.SimpleAssessmentResult); Assert.AreEqual(DetailedAssessmentResultType.Probability, sectionResult.DetailedAssessmentResult); Assert.AreEqual(TailorMadeAssessmentProbabilityCalculationResultType.None, sectionResult.TailorMadeAssessmentResult); - Assert.IsNaN(sectionResult.AssessmentLayerThree); + Assert.IsNaN(sectionResult.TailorMadeAssessmentProbability); Assert.AreSame(section, sectionResult.Section); Assert.IsFalse(sectionResult.UseManualAssemblyProbability); Assert.IsNaN(sectionResult.ManualAssemblyProbability); @@ -58,14 +58,14 @@ [TestCase(double.PositiveInfinity)] [TestCase(1.1)] [TestCase(-0.1)] - public void AssessmentLayerThree_SetInvalidValue_ThrowsArgumentOutOfRangeException(double invalidValue) + public void TailorMadeAssessmentProbability_SetInvalidValue_ThrowsArgumentOutOfRangeException(double invalidValue) { // Setup var sectionResult = new ClosingStructuresFailureMechanismSectionResult( FailureMechanismSectionTestFactory.CreateFailureMechanismSection()); // Call - TestDelegate call = () => sectionResult.AssessmentLayerThree = invalidValue; + TestDelegate call = () => sectionResult.TailorMadeAssessmentProbability = invalidValue; // Assert const string expectedMessage = "De waarde voor de faalkans moet in het bereik [0,0, 1,0] liggen."; @@ -77,17 +77,17 @@ [TestCase(0)] [TestCase(1)] [TestCase(0.5)] - public void AssessmentLayerThree_SetValidValue_SetsValue(double validValue) + public void TailorMadeAssessmentProbability_SetValidValue_SetsValue(double validValue) { // Setup var sectionResult = new ClosingStructuresFailureMechanismSectionResult( FailureMechanismSectionTestFactory.CreateFailureMechanismSection()); // Call - sectionResult.AssessmentLayerThree = validValue; + sectionResult.TailorMadeAssessmentProbability = validValue; // Assert - Assert.AreEqual(validValue, sectionResult.AssessmentLayerThree); + Assert.AreEqual(validValue, sectionResult.TailorMadeAssessmentProbability); } Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismResultViewTest.cs =================================================================== diff -u -r81babcd71546964a4544b5400dbf7076d11ffddb -rbfd84af2152b697561a499f15caa6d1f9f5fd4ed --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismResultViewTest.cs (.../ClosingStructuresFailureMechanismResultViewTest.cs) (revision 81babcd71546964a4544b5400dbf7076d11ffddb) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismResultViewTest.cs (.../ClosingStructuresFailureMechanismResultViewTest.cs) (revision bfd84af2152b697561a499f15caa6d1f9f5fd4ed) @@ -210,25 +210,25 @@ FailureMechanismSectionTestFactory.CreateFailureMechanismSection("Section 1")) { SimpleAssessmentResult = SimpleAssessmentResultType.ProbabilityNegligible, - AssessmentLayerThree = random.NextRoundedDouble() + TailorMadeAssessmentProbability = random.NextDouble() }; var result2 = new ClosingStructuresFailureMechanismSectionResult( FailureMechanismSectionTestFactory.CreateFailureMechanismSection("Section 2")) { SimpleAssessmentResult = SimpleAssessmentResultType.NotApplicable, - AssessmentLayerThree = random.NextRoundedDouble() + TailorMadeAssessmentProbability = random.NextDouble() }; var result3 = new ClosingStructuresFailureMechanismSectionResult( FailureMechanismSectionTestFactory.CreateFailureMechanismSection("Section 3")) { SimpleAssessmentResult = SimpleAssessmentResultType.None, - AssessmentLayerThree = random.NextRoundedDouble() + TailorMadeAssessmentProbability = random.NextDouble() }; var result4 = new ClosingStructuresFailureMechanismSectionResult( FailureMechanismSectionTestFactory.CreateFailureMechanismSection("Section 4")) { SimpleAssessmentResult = SimpleAssessmentResultType.AssessFurther, - AssessmentLayerThree = random.NextRoundedDouble() + TailorMadeAssessmentProbability = random.NextDouble() }; // Call @@ -251,7 +251,7 @@ Assert.AreEqual(result1.SimpleAssessmentResult, cells[simpleAssessmentIndex].Value); Assert.AreEqual("-", cells[detailedAssessmentIndex].FormattedValue); - Assert.AreEqual(ProbabilityFormattingHelper.Format(result1.AssessmentLayerThree), + Assert.AreEqual(ProbabilityFormattingHelper.Format(result1.TailorMadeAssessmentProbability), cells[assessmentLayerThreeIndex].FormattedValue); DataGridViewTestHelper.AssertCellIsDisabled(cells[detailedAssessmentIndex]); @@ -262,7 +262,7 @@ Assert.AreEqual("Section 2", cells[nameColumnIndex].FormattedValue); Assert.AreEqual(result2.SimpleAssessmentResult, cells[simpleAssessmentIndex].Value); Assert.AreEqual("-", cells[detailedAssessmentIndex].FormattedValue); - Assert.AreEqual(ProbabilityFormattingHelper.Format(result1.AssessmentLayerThree), + Assert.AreEqual(ProbabilityFormattingHelper.Format(result1.TailorMadeAssessmentProbability), cells[assessmentLayerThreeIndex].FormattedValue); DataGridViewTestHelper.AssertCellIsDisabled(cells[detailedAssessmentIndex]); @@ -273,7 +273,7 @@ Assert.AreEqual("Section 3", cells[nameColumnIndex].FormattedValue); Assert.AreEqual(result3.SimpleAssessmentResult, cells[simpleAssessmentIndex].Value); Assert.AreEqual("-", cells[detailedAssessmentIndex].FormattedValue); - Assert.AreEqual(ProbabilityFormattingHelper.Format(result3.AssessmentLayerThree), + Assert.AreEqual(ProbabilityFormattingHelper.Format(result3.TailorMadeAssessmentProbability), cells[assessmentLayerThreeIndex].FormattedValue); DataGridViewTestHelper.AssertCellIsEnabled(cells[detailedAssessmentIndex], true); @@ -284,7 +284,7 @@ Assert.AreEqual("Section 4", cells[nameColumnIndex].FormattedValue); Assert.AreEqual(result4.SimpleAssessmentResult, cells[simpleAssessmentIndex].Value); Assert.AreEqual("-", cells[detailedAssessmentIndex].FormattedValue); - Assert.AreEqual(ProbabilityFormattingHelper.Format(result4.AssessmentLayerThree), + Assert.AreEqual(ProbabilityFormattingHelper.Format(result4.TailorMadeAssessmentProbability), cells[assessmentLayerThreeIndex].FormattedValue); DataGridViewTestHelper.AssertCellIsEnabled(cells[detailedAssessmentIndex], true); @@ -303,7 +303,7 @@ var result = new ClosingStructuresFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()) { SimpleAssessmentResult = simpleAssessmentResult, - AssessmentLayerThree = random.NextRoundedDouble() + TailorMadeAssessmentProbability = random.NextDouble() }; using (ShowFailureMechanismResultsView(new ObservableList @@ -340,7 +340,7 @@ FailureMechanismSectionTestFactory.CreateFailureMechanismSection()) { SimpleAssessmentResult = simpleAssessmentResult, - AssessmentLayerThree = random.NextRoundedDouble() + TailorMadeAssessmentProbability = random.NextDouble() }; using (ShowFailureMechanismResultsView(new ObservableList @@ -629,7 +629,7 @@ // Assert Assert.IsEmpty(dataGridView.Rows[0].ErrorText); - Assert.AreEqual(newValue, result.AssessmentLayerThree); + Assert.AreEqual(newValue, result.TailorMadeAssessmentProbability); } } Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismSectionResultRowTest.cs =================================================================== diff -u -ra9cf6a3db67261dde6cb645b4f46ca23431d0416 -rbfd84af2152b697561a499f15caa6d1f9f5fd4ed --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismSectionResultRowTest.cs (.../ClosingStructuresFailureMechanismSectionResultRowTest.cs) (revision a9cf6a3db67261dde6cb645b4f46ca23431d0416) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismSectionResultRowTest.cs (.../ClosingStructuresFailureMechanismSectionResultRowTest.cs) (revision bfd84af2152b697561a499f15caa6d1f9f5fd4ed) @@ -60,7 +60,7 @@ Assert.IsInstanceOf>(row); Assert.AreEqual(result.SimpleAssessmentResult, row.SimpleAssessmentResult); Assert.AreEqual(result.GetDetailedAssessmentProbability(failureMechanism, assessmentSection), row.DetailedAssessmentProbability); - Assert.AreEqual(row.AssessmentLayerThree, result.AssessmentLayerThree); + Assert.AreEqual(row.AssessmentLayerThree, result.TailorMadeAssessmentProbability); TestHelper.AssertTypeConverter( nameof(ClosingStructuresFailureMechanismSectionResultRow.DetailedAssessmentProbability)); @@ -296,7 +296,7 @@ row.AssessmentLayerThree = assessmentLayerThree; // Assert - Assert.AreEqual(assessmentLayerThree, sectionResult.AssessmentLayerThree); + Assert.AreEqual(assessmentLayerThree, sectionResult.TailorMadeAssessmentProbability); mocks.VerifyAll(); } }