Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/StabilityStoneCover/StabilityStoneCoverFailureMechanismSectionResultCreateExtensions.cs =================================================================== diff -u -rd7a86167971eb09628fea9ac02c50f9eaa80d5c5 -r3435e2709ffcbcccc59b0edb3799b328511bd066 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/StabilityStoneCover/StabilityStoneCoverFailureMechanismSectionResultCreateExtensions.cs (.../StabilityStoneCoverFailureMechanismSectionResultCreateExtensions.cs) (revision d7a86167971eb09628fea9ac02c50f9eaa80d5c5) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/StabilityStoneCover/StabilityStoneCoverFailureMechanismSectionResultCreateExtensions.cs (.../StabilityStoneCoverFailureMechanismSectionResultCreateExtensions.cs) (revision 3435e2709ffcbcccc59b0edb3799b328511bd066) @@ -40,8 +40,7 @@ { var sectionResultEntity = new StabilityStoneCoverSectionResultEntity { - LayerOne = Convert.ToByte(result.AssessmentLayerOne), - LayerThree = result.AssessmentLayerThree.ToNaNAsNull() + LayerOne = Convert.ToByte(result.AssessmentLayerOne) }; return sectionResultEntity; Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StabilityStoneCover/StabilityStoneCoverSectionResultEntityReadExtensions.cs =================================================================== diff -u -rd7a86167971eb09628fea9ac02c50f9eaa80d5c5 -r3435e2709ffcbcccc59b0edb3799b328511bd066 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StabilityStoneCover/StabilityStoneCoverSectionResultEntityReadExtensions.cs (.../StabilityStoneCoverSectionResultEntityReadExtensions.cs) (revision d7a86167971eb09628fea9ac02c50f9eaa80d5c5) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StabilityStoneCover/StabilityStoneCoverSectionResultEntityReadExtensions.cs (.../StabilityStoneCoverSectionResultEntityReadExtensions.cs) (revision 3435e2709ffcbcccc59b0edb3799b328511bd066) @@ -49,7 +49,6 @@ } sectionResult.AssessmentLayerOne = (AssessmentLayerOneState) entity.LayerOne; - sectionResult.AssessmentLayerThree = (RoundedDouble) entity.LayerThree.ToNullAsNaN(); } } } \ No newline at end of file Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityStoneCover/StabilityStoneCoverFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -rd7a86167971eb09628fea9ac02c50f9eaa80d5c5 -r3435e2709ffcbcccc59b0edb3799b328511bd066 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityStoneCover/StabilityStoneCoverFailureMechanismSectionResultCreateExtensionsTest.cs (.../StabilityStoneCoverFailureMechanismSectionResultCreateExtensionsTest.cs) (revision d7a86167971eb09628fea9ac02c50f9eaa80d5c5) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityStoneCover/StabilityStoneCoverFailureMechanismSectionResultCreateExtensionsTest.cs (.../StabilityStoneCoverFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 3435e2709ffcbcccc59b0edb3799b328511bd066) @@ -23,11 +23,9 @@ using Application.Ringtoets.Storage.Create.StabilityStoneCover; using Application.Ringtoets.Storage.DbContext; using Application.Ringtoets.Storage.TestUtil; -using Core.Common.Base.Data; using Core.Common.TestUtil; using NUnit.Framework; using Ringtoets.Common.Data.FailureMechanism; -using Ringtoets.Common.Data.TestUtil; using Ringtoets.StabilityStoneCover.Data; namespace Application.Ringtoets.Storage.Test.Create.StabilityStoneCover @@ -44,32 +42,13 @@ var sectionResult = new StabilityStoneCoverFailureMechanismSectionResult(new TestFailureMechanismSection()) { AssessmentLayerOne = random.NextEnumValue(), - AssessmentLayerThree = random.NextRoundedDouble() }; // Call StabilityStoneCoverSectionResultEntity result = sectionResult.Create(); // Assert Assert.AreEqual(Convert.ToByte(sectionResult.AssessmentLayerOne), result.LayerOne); - Assert.AreEqual(sectionResult.AssessmentLayerThree, result.LayerThree, - sectionResult.AssessmentLayerThree.GetAccuracy()); } - - [Test] - public void Create_WithNaNLevel3Result_ReturnsEntityWithExpectedResults() - { - // Setup - var sectionResult = new StabilityStoneCoverFailureMechanismSectionResult(new TestFailureMechanismSection()) - { - AssessmentLayerThree = RoundedDouble.NaN - }; - - // Call - StabilityStoneCoverSectionResultEntity result = sectionResult.Create(); - - // Assert - Assert.IsNull(result.LayerThree); - } } } \ No newline at end of file Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs =================================================================== diff -u -rcb5473dc9372632b858565eef6a48a1efb6f14a2 -r3435e2709ffcbcccc59b0edb3799b328511bd066 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs (.../StorageSqLiteIntegrationTest.cs) (revision cb5473dc9372632b858565eef6a48a1efb6f14a2) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs (.../StorageSqLiteIntegrationTest.cs) (revision 3435e2709ffcbcccc59b0edb3799b328511bd066) @@ -1832,18 +1832,12 @@ private static void AssertFailureMechanismSectionResults(IEnumerable expectedSectionResults, IEnumerable actualSectionResults) { - StabilityStoneCoverFailureMechanismSectionResult[] expectedSectionResultsArray = expectedSectionResults.ToArray(); - StabilityStoneCoverFailureMechanismSectionResult[] actualSectionResultsArray = actualSectionResults.ToArray(); - - Assert.AreEqual(expectedSectionResultsArray.Length, actualSectionResultsArray.Length); - - for (var i = 0; i < expectedSectionResultsArray.Length; i++) - { - StabilityStoneCoverFailureMechanismSectionResult expectedSection = expectedSectionResultsArray[i]; - StabilityStoneCoverFailureMechanismSectionResult actualSection = actualSectionResultsArray[i]; - - Assert.AreEqual(expectedSection.AssessmentLayerThree, actualSection.AssessmentLayerThree); - } + AssertCollectionAndItems(expectedSectionResults, + actualSectionResults, + (expectedItem, actualItem) => + { + Assert.AreEqual(expectedItem.AssessmentLayerOne, actualItem.AssessmentLayerOne); + }); } private static void AssertStabilityStoneCoverWaveConditionsCalculation(StabilityStoneCoverWaveConditionsCalculation expectedCalculation, Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityStoneCover/StabilityStoneCoverSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -rd7a86167971eb09628fea9ac02c50f9eaa80d5c5 -r3435e2709ffcbcccc59b0edb3799b328511bd066 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityStoneCover/StabilityStoneCoverSectionResultEntityReadExtensionsTest.cs (.../StabilityStoneCoverSectionResultEntityReadExtensionsTest.cs) (revision d7a86167971eb09628fea9ac02c50f9eaa80d5c5) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityStoneCover/StabilityStoneCoverSectionResultEntityReadExtensionsTest.cs (.../StabilityStoneCoverSectionResultEntityReadExtensionsTest.cs) (revision 3435e2709ffcbcccc59b0edb3799b328511bd066) @@ -75,7 +75,6 @@ // Assert Assert.AreEqual(layerOne, sectionResult.AssessmentLayerOne); - Assert.AreEqual(layerThree, sectionResult.AssessmentLayerThree, 1e-6); } [Test] @@ -104,7 +103,6 @@ // Assert Assert.AreEqual(layerOne, sectionResult.AssessmentLayerOne); - Assert.IsNaN(sectionResult.AssessmentLayerThree); } } } \ No newline at end of file Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs =================================================================== diff -u -rcb5473dc9372632b858565eef6a48a1efb6f14a2 -r3435e2709ffcbcccc59b0edb3799b328511bd066 --- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision cb5473dc9372632b858565eef6a48a1efb6f14a2) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision 3435e2709ffcbcccc59b0edb3799b328511bd066) @@ -1971,7 +1971,6 @@ foreach (StabilityStoneCoverFailureMechanismSectionResult sectionResult in sectionResults) { sectionResult.AssessmentLayerOne = GetAssessmentLayerOneState(); - sectionResult.AssessmentLayerThree = (RoundedDouble) random.NextDouble(); } } Index: Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Data/StabilityStoneCoverFailureMechanismSectionResult.cs =================================================================== diff -u -rc3a3e2cf9b928ed796d4122ff91d59507f0e6426 -r3435e2709ffcbcccc59b0edb3799b328511bd066 --- Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Data/StabilityStoneCoverFailureMechanismSectionResult.cs (.../StabilityStoneCoverFailureMechanismSectionResult.cs) (revision c3a3e2cf9b928ed796d4122ff91d59507f0e6426) +++ Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Data/StabilityStoneCoverFailureMechanismSectionResult.cs (.../StabilityStoneCoverFailureMechanismSectionResult.cs) (revision 3435e2709ffcbcccc59b0edb3799b328511bd066) @@ -20,7 +20,6 @@ // All rights reserved. using System; -using Core.Common.Base.Data; using Ringtoets.AssemblyTool.Data; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Primitives; @@ -48,7 +47,6 @@ DetailedAssessmentResultForLowerLimitNorm = DetailedAssessmentResultType.None; DetailedAssessmentResultForFactorizedLowerLimitNorm = DetailedAssessmentResultType.None; TailorMadeAssessmentResult = FailureMechanismSectionAssemblyCategoryGroup.None; - AssessmentLayerThree = RoundedDouble.NaN; } /// @@ -90,10 +88,5 @@ /// Gets or sets the tailor made assessment result. /// public FailureMechanismSectionAssemblyCategoryGroup TailorMadeAssessmentResult { get; set; } - - /// - /// Gets or sets the value of the tailored assessment of safety. - /// - public RoundedDouble AssessmentLayerThree { get; set; } } } \ No newline at end of file Index: Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Forms/Views/StabilityStoneCoverResultView.cs =================================================================== diff -u -rb957c72614eb59438dc821b9b5ba8414ccfe9597 -r3435e2709ffcbcccc59b0edb3799b328511bd066 --- Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Forms/Views/StabilityStoneCoverResultView.cs (.../StabilityStoneCoverResultView.cs) (revision b957c72614eb59438dc821b9b5ba8414ccfe9597) +++ Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Forms/Views/StabilityStoneCoverResultView.cs (.../StabilityStoneCoverResultView.cs) (revision 3435e2709ffcbcccc59b0edb3799b328511bd066) @@ -80,10 +80,6 @@ FailureMechanismSectionResultViewColumnBuilder.AddDetailedAssessmentResultForFactorizedLowerLimitNormColumn( DataGridViewControl, nameof(StabilityStoneCoverSectionResultRow.DetailedAssessmentResultForFactorizedLowerLimitNorm)); - - DataGridViewControl.AddTextBoxColumn( - nameof(StabilityStoneCoverSectionResultRow.AssessmentLayerThree), - RingtoetsCommonFormsResources.FailureMechanismResultView_TailorMadeAssessmentResult_DisplayName); } } } \ No newline at end of file Index: Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Forms/Views/StabilityStoneCoverSectionResultRow.cs =================================================================== diff -u -r67147b9ea56db9da6125261582125cd5b53b75a3 -r3435e2709ffcbcccc59b0edb3799b328511bd066 --- Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Forms/Views/StabilityStoneCoverSectionResultRow.cs (.../StabilityStoneCoverSectionResultRow.cs) (revision 67147b9ea56db9da6125261582125cd5b53b75a3) +++ Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Forms/Views/StabilityStoneCoverSectionResultRow.cs (.../StabilityStoneCoverSectionResultRow.cs) (revision 3435e2709ffcbcccc59b0edb3799b328511bd066) @@ -162,22 +162,6 @@ } } - /// - /// Gets or sets the value of the tailored assessment of safety. - /// - [TypeConverter(typeof(NoValueRoundedDoubleConverter))] - public RoundedDouble AssessmentLayerThree - { - get - { - return SectionResult.AssessmentLayerThree; - } - set - { - SectionResult.AssessmentLayerThree = value.ToPrecision(SectionResult.AssessmentLayerThree.NumberOfDecimalPlaces); - } - } - public override void Update() {} } } \ No newline at end of file Index: Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Data.Test/StabilityStoneCoverFailureMechanismSectionResultTest.cs =================================================================== diff -u -rc3a3e2cf9b928ed796d4122ff91d59507f0e6426 -r3435e2709ffcbcccc59b0edb3799b328511bd066 --- Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Data.Test/StabilityStoneCoverFailureMechanismSectionResultTest.cs (.../StabilityStoneCoverFailureMechanismSectionResultTest.cs) (revision c3a3e2cf9b928ed796d4122ff91d59507f0e6426) +++ Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Data.Test/StabilityStoneCoverFailureMechanismSectionResultTest.cs (.../StabilityStoneCoverFailureMechanismSectionResultTest.cs) (revision 3435e2709ffcbcccc59b0edb3799b328511bd066) @@ -50,27 +50,6 @@ Assert.AreEqual(DetailedAssessmentResultType.None, result.DetailedAssessmentResultForLowerLimitNorm); Assert.AreEqual(DetailedAssessmentResultType.None, result.DetailedAssessmentResultForFactorizedLowerLimitNorm); Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.None, result.TailorMadeAssessmentResult); - Assert.IsNaN(result.AssessmentLayerThree); } - - [Test] - [TestCase(double.NaN)] - [TestCase(double.PositiveInfinity)] - [TestCase(double.NegativeInfinity)] - [TestCase(5)] - [TestCase(0.5)] - public void AssessmentLayerThree_SetNewValue_ReturnsNewValue(double newValue) - { - // Setup - FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); - var result = new StabilityStoneCoverFailureMechanismSectionResult(section); - - // Call - result.AssessmentLayerThree = (RoundedDouble) newValue; - - // Assert - Assert.AreEqual(newValue, result.AssessmentLayerThree, - result.AssessmentLayerThree.GetAccuracy()); - } } } \ No newline at end of file Index: Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/Views/StabilityStoneCoverResultViewTest.cs =================================================================== diff -u -r24b17ef1a15554434d0735d9d2e6fe800ab887a1 -r3435e2709ffcbcccc59b0edb3799b328511bd066 --- Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/Views/StabilityStoneCoverResultViewTest.cs (.../StabilityStoneCoverResultViewTest.cs) (revision 24b17ef1a15554434d0735d9d2e6fe800ab887a1) +++ Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/Views/StabilityStoneCoverResultViewTest.cs (.../StabilityStoneCoverResultViewTest.cs) (revision 3435e2709ffcbcccc59b0edb3799b328511bd066) @@ -40,8 +40,7 @@ private const int detailedAssessmentResultForMechanismSpecificLowerLimitNormIndex = 4; private const int detailedAssessmentResultForLowerLimitNormIndex = 5; private const int detailedAssessmentResultForFactorizedLowerLimitNormIndex = 6; - private const int assessmentLayerThreeIndex = 7; - private const int columnCount = 8; + private const int columnCount = 7; [Test] public void Constructor_ExpectedValues() @@ -86,15 +85,13 @@ Assert.IsInstanceOf(dataGridView.Columns[detailedAssessmentResultForMechanismSpecificLowerLimitNormIndex]); Assert.IsInstanceOf(dataGridView.Columns[detailedAssessmentResultForLowerLimitNormIndex]); Assert.IsInstanceOf(dataGridView.Columns[detailedAssessmentResultForFactorizedLowerLimitNormIndex]); - Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerThreeIndex]); Assert.AreEqual("Eenvoudige toets", dataGridView.Columns[simpleAssessmentResultIndex].HeaderText); Assert.AreEqual("Gedetailleerde toets\r\nper vak\r\nCat. Iv - IIv", dataGridView.Columns[detailedAssessmentResultForFactorizedSignalingNormIndex].HeaderText); Assert.AreEqual("Gedetailleerde toets\r\nper vak\r\nCat. IIv - IIIv", dataGridView.Columns[detailedAssessmentResultForSignalingNormIndex].HeaderText); Assert.AreEqual("Gedetailleerde toets\r\nper vak\r\nCat. IIIv - IVv", dataGridView.Columns[detailedAssessmentResultForMechanismSpecificLowerLimitNormIndex].HeaderText); Assert.AreEqual("Gedetailleerde toets\r\nper vak\r\nCat. IVv - Vv", dataGridView.Columns[detailedAssessmentResultForLowerLimitNormIndex].HeaderText); Assert.AreEqual("Gedetailleerde toets\r\nper vak\r\nCat. Vv - VIv", dataGridView.Columns[detailedAssessmentResultForFactorizedLowerLimitNormIndex].HeaderText); - Assert.AreEqual("Toets op maat", dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); Assert.AreEqual(DataGridViewAutoSizeColumnsMode.AllCells, dataGridView.AutoSizeColumnsMode); Assert.AreEqual(DataGridViewContentAlignment.MiddleCenter, dataGridView.ColumnHeadersDefaultCellStyle.Alignment); @@ -130,7 +127,6 @@ Assert.AreEqual(DetailedAssessmentResultType.None, cells[detailedAssessmentResultForMechanismSpecificLowerLimitNormIndex].Value); Assert.AreEqual(DetailedAssessmentResultType.None, cells[detailedAssessmentResultForLowerLimitNormIndex].Value); Assert.AreEqual(DetailedAssessmentResultType.None, cells[detailedAssessmentResultForFactorizedLowerLimitNormIndex].Value); - Assert.AreEqual("-", cells[assessmentLayerThreeIndex].FormattedValue); } } } Index: Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/Views/StabilityStoneCoverSectionResultRowTest.cs =================================================================== diff -u -r67147b9ea56db9da6125261582125cd5b53b75a3 -r3435e2709ffcbcccc59b0edb3799b328511bd066 --- Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/Views/StabilityStoneCoverSectionResultRowTest.cs (.../StabilityStoneCoverSectionResultRowTest.cs) (revision 67147b9ea56db9da6125261582125cd5b53b75a3) +++ Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/Views/StabilityStoneCoverSectionResultRowTest.cs (.../StabilityStoneCoverSectionResultRowTest.cs) (revision 3435e2709ffcbcccc59b0edb3799b328511bd066) @@ -60,10 +60,6 @@ Assert.AreEqual(result.DetailedAssessmentResultForFactorizedLowerLimitNorm, row.DetailedAssessmentResultForFactorizedLowerLimitNorm); Assert.AreEqual(SelectableFailureMechanismSectionAssemblyCategoryGroupConverter.ConvertTo(result.TailorMadeAssessmentResult), row.TailorMadeAssessmentResult); - Assert.AreEqual(result.AssessmentLayerThree, row.AssessmentLayerThree); - - TestHelper.AssertTypeConverter(nameof(StabilityStoneCoverSectionResultRow.AssessmentLayerThree)); } #region Registration @@ -251,23 +247,6 @@ mocks.VerifyAll(); } - [Test] - public void AssessmentLayerThree_AlwaysOnChange_ResultPropertyChanged() - { - // Setup - var random = new Random(21); - double newValue = random.NextDouble(); - FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); - var result = new StabilityStoneCoverFailureMechanismSectionResult(section); - var row = new StabilityStoneCoverSectionResultRow(result); - - // Call - row.AssessmentLayerThree = (RoundedDouble) newValue; - - // Assert - Assert.AreEqual(newValue, result.AssessmentLayerThree, row.AssessmentLayerThree.GetAccuracy()); - } - #endregion } } \ No newline at end of file