Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/DuneErosion/DuneErosionFailureMechanismSectionResultCreateExtensions.cs =================================================================== diff -u -r11f0867b39150ae5fac83dc178a89fee46d27611 -rfdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/DuneErosion/DuneErosionFailureMechanismSectionResultCreateExtensions.cs (.../DuneErosionFailureMechanismSectionResultCreateExtensions.cs) (revision 11f0867b39150ae5fac83dc178a89fee46d27611) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/DuneErosion/DuneErosionFailureMechanismSectionResultCreateExtensions.cs (.../DuneErosionFailureMechanismSectionResultCreateExtensions.cs) (revision fdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74) @@ -46,6 +46,7 @@ } var sectionResultEntity = new DuneErosionSectionResultEntity { + LayerOne = Convert.ToByte(result.AssessmentLayerOne), LayerTwoA = Convert.ToByte(result.AssessmentLayerTwoA), LayerThree = result.AssessmentLayerThree.Value.ToNaNAsNull() }; Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/StabilityPointStructures/StabilityPointStructuresFailureMechanismSectionResultCreateExtensions.cs =================================================================== diff -u -rae14c5d4e4624fa87390e6d63bb419c648e12dda -rfdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/StabilityPointStructures/StabilityPointStructuresFailureMechanismSectionResultCreateExtensions.cs (.../StabilityPointStructuresFailureMechanismSectionResultCreateExtensions.cs) (revision ae14c5d4e4624fa87390e6d63bb419c648e12dda) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/StabilityPointStructures/StabilityPointStructuresFailureMechanismSectionResultCreateExtensions.cs (.../StabilityPointStructuresFailureMechanismSectionResultCreateExtensions.cs) (revision fdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74) @@ -46,6 +46,7 @@ } var sectionResultEntity = new StabilityPointStructuresSectionResultEntity { + LayerOne = Convert.ToByte(result.AssessmentLayerOne), LayerTwoA = result.AssessmentLayerTwoA.ToNaNAsNull(), LayerThree = result.AssessmentLayerThree.Value.ToNaNAsNull() }; Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/StabilityStoneCover/StabilityStoneCoverFailureMechanismSectionResultCreateExtensions.cs =================================================================== diff -u -r11f0867b39150ae5fac83dc178a89fee46d27611 -rfdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/StabilityStoneCover/StabilityStoneCoverFailureMechanismSectionResultCreateExtensions.cs (.../StabilityStoneCoverFailureMechanismSectionResultCreateExtensions.cs) (revision 11f0867b39150ae5fac83dc178a89fee46d27611) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/StabilityStoneCover/StabilityStoneCoverFailureMechanismSectionResultCreateExtensions.cs (.../StabilityStoneCoverFailureMechanismSectionResultCreateExtensions.cs) (revision fdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74) @@ -46,6 +46,7 @@ } var sectionResultEntity = new StabilityStoneCoverSectionResultEntity { + LayerOne = Convert.ToByte(result.AssessmentLayerOne), LayerTwoA = Convert.ToByte(result.AssessmentLayerTwoA), LayerThree = result.AssessmentLayerThree.Value.ToNaNAsNull() }; Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/DuneErosionSectionResultEntityReadExtensions.cs =================================================================== diff -u -r11f0867b39150ae5fac83dc178a89fee46d27611 -rfdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/DuneErosionSectionResultEntityReadExtensions.cs (.../DuneErosionSectionResultEntityReadExtensions.cs) (revision 11f0867b39150ae5fac83dc178a89fee46d27611) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/DuneErosionSectionResultEntityReadExtensions.cs (.../DuneErosionSectionResultEntityReadExtensions.cs) (revision fdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74) @@ -48,7 +48,8 @@ throw new ArgumentNullException("sectionResult"); } - sectionResult.AssessmentLayerTwoA = (AssessmentLayerTwoAResult) entity.LayerTwoA; + sectionResult.AssessmentLayerOne = Convert.ToBoolean(entity.LayerOne); + sectionResult.AssessmentLayerTwoA = (AssessmentLayerTwoAResult)entity.LayerTwoA; sectionResult.AssessmentLayerThree = (RoundedDouble) entity.LayerThree.ToNullAsNaN(); } } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StabilityPointStructures/StabilityPointStructuresSectionResultEntityReadExtensions.cs =================================================================== diff -u -rae14c5d4e4624fa87390e6d63bb419c648e12dda -rfdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StabilityPointStructures/StabilityPointStructuresSectionResultEntityReadExtensions.cs (.../StabilityPointStructuresSectionResultEntityReadExtensions.cs) (revision ae14c5d4e4624fa87390e6d63bb419c648e12dda) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StabilityPointStructures/StabilityPointStructuresSectionResultEntityReadExtensions.cs (.../StabilityPointStructuresSectionResultEntityReadExtensions.cs) (revision fdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74) @@ -47,7 +47,8 @@ throw new ArgumentNullException("sectionResult"); } - sectionResult.AssessmentLayerTwoA = (RoundedDouble) entity.LayerTwoA.ToNullAsNaN(); + sectionResult.AssessmentLayerOne = Convert.ToBoolean(entity.LayerOne); + sectionResult.AssessmentLayerTwoA = (RoundedDouble)entity.LayerTwoA.ToNullAsNaN(); sectionResult.AssessmentLayerThree = (RoundedDouble) entity.LayerThree.ToNullAsNaN(); } } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StabilityStoneCoverSectionResultEntityReadExtensions.cs =================================================================== diff -u -r11f0867b39150ae5fac83dc178a89fee46d27611 -rfdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StabilityStoneCoverSectionResultEntityReadExtensions.cs (.../StabilityStoneCoverSectionResultEntityReadExtensions.cs) (revision 11f0867b39150ae5fac83dc178a89fee46d27611) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StabilityStoneCoverSectionResultEntityReadExtensions.cs (.../StabilityStoneCoverSectionResultEntityReadExtensions.cs) (revision fdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74) @@ -48,7 +48,8 @@ throw new ArgumentNullException("sectionResult"); } - sectionResult.AssessmentLayerTwoA = (AssessmentLayerTwoAResult) entity.LayerTwoA; + sectionResult.AssessmentLayerOne = Convert.ToBoolean(entity.LayerOne); + sectionResult.AssessmentLayerTwoA = (AssessmentLayerTwoAResult)entity.LayerTwoA; sectionResult.AssessmentLayerThree = (RoundedDouble) entity.LayerThree.ToNullAsNaN(); } } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/DuneErosion/DuneErosionFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r05013c44d1273bac219a442dc7959706c6bac715 -rfdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/DuneErosion/DuneErosionFailureMechanismSectionResultCreateExtensionsTest.cs (.../DuneErosionFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 05013c44d1273bac219a442dc7959706c6bac715) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/DuneErosion/DuneErosionFailureMechanismSectionResultCreateExtensionsTest.cs (.../DuneErosionFailureMechanismSectionResultCreateExtensionsTest.cs) (revision fdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74) @@ -48,12 +48,14 @@ [Test] public void Create_WithDifferentResults_ReturnsEntityWithExpectedResults( + [Values(true, false)] bool assessmentLayerOneResult, [Values(AssessmentLayerTwoAResult.NotCalculated, AssessmentLayerTwoAResult.Failed)] AssessmentLayerTwoAResult assessmentLayerTwoAResult, [Values(3.2, 4.5)] double assessmentLayerThreeResult) { // Setup var sectionResult = new DuneErosionFailureMechanismSectionResult(new TestFailureMechanismSection()) { + AssessmentLayerOne = assessmentLayerOneResult, AssessmentLayerTwoA = assessmentLayerTwoAResult, AssessmentLayerThree = (RoundedDouble) assessmentLayerThreeResult }; @@ -62,6 +64,7 @@ var result = sectionResult.Create(new PersistenceRegistry()); // Assert + Assert.AreEqual(Convert.ToByte(assessmentLayerOneResult), result.LayerOne); Assert.AreEqual(Convert.ToByte(assessmentLayerTwoAResult), result.LayerTwoA); Assert.AreEqual(assessmentLayerThreeResult, result.LayerThree); } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityPointStructures/StabilityPointStructuresFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -rae14c5d4e4624fa87390e6d63bb419c648e12dda -rfdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityPointStructures/StabilityPointStructuresFailureMechanismSectionResultCreateExtensionsTest.cs (.../StabilityPointStructuresFailureMechanismSectionResultCreateExtensionsTest.cs) (revision ae14c5d4e4624fa87390e6d63bb419c648e12dda) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityPointStructures/StabilityPointStructuresFailureMechanismSectionResultCreateExtensionsTest.cs (.../StabilityPointStructuresFailureMechanismSectionResultCreateExtensionsTest.cs) (revision fdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74) @@ -54,14 +54,16 @@ // Setup var sectionResult = new StabilityPointStructuresFailureMechanismSectionResult(new TestFailureMechanismSection()) { - AssessmentLayerTwoA = (RoundedDouble) assessmentLayerTwoAResult, + AssessmentLayerOne = assessmentLayerOneResult, + AssessmentLayerTwoA = (RoundedDouble)assessmentLayerTwoAResult, AssessmentLayerThree = (RoundedDouble) assessmentLayerThreeResult }; // Call var result = sectionResult.Create(new PersistenceRegistry()); // Assert + Assert.AreEqual(Convert.ToByte(assessmentLayerOneResult), result.LayerOne); Assert.AreEqual(assessmentLayerTwoAResult, result.LayerTwoA); Assert.AreEqual(assessmentLayerThreeResult, result.LayerThree); } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityStoneCover/StabilityStoneCoverFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r1ff2f27e84cbd5da25a9da66d478467a773cb573 -rfdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityStoneCover/StabilityStoneCoverFailureMechanismSectionResultCreateExtensionsTest.cs (.../StabilityStoneCoverFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 1ff2f27e84cbd5da25a9da66d478467a773cb573) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityStoneCover/StabilityStoneCoverFailureMechanismSectionResultCreateExtensionsTest.cs (.../StabilityStoneCoverFailureMechanismSectionResultCreateExtensionsTest.cs) (revision fdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74) @@ -48,12 +48,14 @@ [Test] public void Create_WithDifferentResults_ReturnsEntityWithExpectedResults( + [Values(true, false)] bool assessmentLayerOneResult, [Values(AssessmentLayerTwoAResult.NotCalculated, AssessmentLayerTwoAResult.Failed)] AssessmentLayerTwoAResult assessmentLayerTwoAResult, [Values(3.2, 4.5)] double assessmentLayerThreeResult) { // Setup var sectionResult = new StabilityStoneCoverFailureMechanismSectionResult(new TestFailureMechanismSection()) { + AssessmentLayerOne = assessmentLayerOneResult, AssessmentLayerTwoA = assessmentLayerTwoAResult, AssessmentLayerThree = (RoundedDouble) assessmentLayerThreeResult }; @@ -62,6 +64,7 @@ var result = sectionResult.Create(new PersistenceRegistry()); // Assert + Assert.AreEqual(Convert.ToByte(assessmentLayerOneResult), result.LayerOne); Assert.AreEqual(Convert.ToByte(assessmentLayerTwoAResult), result.LayerTwoA); Assert.AreEqual(assessmentLayerThreeResult, result.LayerThree); } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/DuneErosionSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -r97018b4e8e9cd81438e8fd0d111d889e20946617 -rfdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/DuneErosionSectionResultEntityReadExtensionsTest.cs (.../DuneErosionSectionResultEntityReadExtensionsTest.cs) (revision 97018b4e8e9cd81438e8fd0d111d889e20946617) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/DuneErosionSectionResultEntityReadExtensionsTest.cs (.../DuneErosionSectionResultEntityReadExtensionsTest.cs) (revision fdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74) @@ -61,8 +61,9 @@ collector.Read(failureMechanismSectionEntity, new TestFailureMechanismSection()); var entity = new DuneErosionSectionResultEntity { - LayerThree = layerThree, + LayerOne = Convert.ToByte(layerOne), LayerTwoA = Convert.ToByte(layerTwoA), + LayerThree = layerThree, FailureMechanismSectionEntity = failureMechanismSectionEntity }; var sectionResult = new DuneErosionFailureMechanismSectionResult(new TestFailureMechanismSection()); @@ -71,24 +72,23 @@ entity.Read(sectionResult); // Assert - Assert.IsNotNull(sectionResult); + Assert.AreEqual(layerOne, sectionResult.AssessmentLayerOne); Assert.AreEqual(layerTwoA, sectionResult.AssessmentLayerTwoA); Assert.AreEqual(layerThree, sectionResult.AssessmentLayerThree, 1e-6); + Assert.IsNotNull(sectionResult); } [Test] - [TestCase(true, AssessmentLayerTwoAResult.Failed)] - [TestCase(false, AssessmentLayerTwoAResult.Successful)] - [TestCase(false, AssessmentLayerTwoAResult.Failed)] - public void Read_WithNullLayerThree_ReturnDuneErosionSectionResultWithNullParameters(bool layerOne, AssessmentLayerTwoAResult layerTwoA) + public void Read_WithNullLayerThree_ReturnDuneErosionSectionResultWithNullParameters() { // Setup var collector = new ReadConversionCollector(); var failureMechanismSectionEntity = new FailureMechanismSectionEntity(); collector.Read(failureMechanismSectionEntity, new TestFailureMechanismSection()); var entity = new DuneErosionSectionResultEntity { - LayerTwoA = Convert.ToByte(layerTwoA), + LayerOne = Convert.ToByte(false), + LayerTwoA = Convert.ToByte(AssessmentLayerTwoAResult.Failed), LayerThree = null, FailureMechanismSectionEntity = failureMechanismSectionEntity }; Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/HeightStructures/HeightStructuresSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -rcc91baaea7dfcc12765017b57ffc768c7d02f7a1 -rfdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/HeightStructures/HeightStructuresSectionResultEntityReadExtensionsTest.cs (.../HeightStructuresSectionResultEntityReadExtensionsTest.cs) (revision cc91baaea7dfcc12765017b57ffc768c7d02f7a1) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/HeightStructures/HeightStructuresSectionResultEntityReadExtensionsTest.cs (.../HeightStructuresSectionResultEntityReadExtensionsTest.cs) (revision fdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74) @@ -60,8 +60,8 @@ collector.Read(failureMechanismSectionEntity, new TestFailureMechanismSection()); var entity = new HeightStructuresSectionResultEntity { - LayerThree = layerThree, LayerOne = Convert.ToByte(layerOne), + LayerThree = layerThree, FailureMechanismSectionEntity = failureMechanismSectionEntity }; var sectionResult = new HeightStructuresFailureMechanismSectionResult(new TestFailureMechanismSection()); @@ -70,23 +70,21 @@ entity.Read(sectionResult); // Assert - Assert.IsNotNull(sectionResult); Assert.AreEqual(layerOne, sectionResult.AssessmentLayerOne); Assert.AreEqual(layerThree, sectionResult.AssessmentLayerThree, 1e-6); + Assert.IsNotNull(sectionResult); } [Test] - [TestCase(true)] - [TestCase(false)] - public void Read_WithNullParameterValues_ReturnHeightStructuresSectionResultWithNullParameters(bool layerOne) + public void Read_WithNullParameterValues_ReturnHeightStructuresSectionResultWithNullParameters() { // Setup var collector = new ReadConversionCollector(); var failureMechanismSectionEntity = new FailureMechanismSectionEntity(); collector.Read(failureMechanismSectionEntity, new TestFailureMechanismSection()); var entity = new HeightStructuresSectionResultEntity { - LayerOne = Convert.ToByte(layerOne), + LayerOne = Convert.ToByte(true), LayerThree = null, FailureMechanismSectionEntity = failureMechanismSectionEntity }; Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityPointStructures/StabilityPointStructuresSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -rae14c5d4e4624fa87390e6d63bb419c648e12dda -rfdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityPointStructures/StabilityPointStructuresSectionResultEntityReadExtensionsTest.cs (.../StabilityPointStructuresSectionResultEntityReadExtensionsTest.cs) (revision ae14c5d4e4624fa87390e6d63bb419c648e12dda) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityPointStructures/StabilityPointStructuresSectionResultEntityReadExtensionsTest.cs (.../StabilityPointStructuresSectionResultEntityReadExtensionsTest.cs) (revision fdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74) @@ -47,7 +47,9 @@ } [Test] - public void Read_WithDecimalParameterValues_ReturnStabilityPointStructuresSectionResultWithDoubleParameterValues() + [TestCase(true)] + [TestCase(false)] + public void Read_WithDecimalParameterValues_ReturnStabilityPointStructuresSectionResultWithDoubleParameterValues(bool layerOne) { // Setup var random = new Random(21); @@ -59,8 +61,9 @@ collector.Read(failureMechanismSectionEntity, new TestFailureMechanismSection()); var entity = new StabilityPointStructuresSectionResultEntity { - LayerThree = layerThree, + LayerOne = Convert.ToByte(layerOne), LayerTwoA = layerTwoA, + LayerThree = layerThree, FailureMechanismSectionEntity = failureMechanismSectionEntity }; var sectionResult = new StabilityPointStructuresFailureMechanismSectionResult(new TestFailureMechanismSection()); @@ -69,9 +72,10 @@ entity.Read(sectionResult); // Assert - Assert.IsNotNull(sectionResult); + Assert.AreEqual(layerOne, sectionResult.AssessmentLayerOne); Assert.AreEqual(layerTwoA, sectionResult.AssessmentLayerTwoA, 1e-6); Assert.AreEqual(layerThree, sectionResult.AssessmentLayerThree, 1e-6); + Assert.IsNotNull(sectionResult); } [Test] @@ -83,6 +87,7 @@ collector.Read(failureMechanismSectionEntity, new TestFailureMechanismSection()); var entity = new StabilityPointStructuresSectionResultEntity { + LayerOne = Convert.ToByte(false), LayerTwoA = null, LayerThree = new Random(21).NextDouble(), FailureMechanismSectionEntity = failureMechanismSectionEntity @@ -105,6 +110,7 @@ collector.Read(failureMechanismSectionEntity, new TestFailureMechanismSection()); var entity = new StabilityPointStructuresSectionResultEntity { + LayerOne = Convert.ToByte(true), LayerTwoA = new Random(21).NextDouble(), LayerThree = null, FailureMechanismSectionEntity = failureMechanismSectionEntity Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityStoneCover/StabilityStoneCoverSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -r7082f74ed1f0f3a0601a2d8833c864b8c08bea59 -rfdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityStoneCover/StabilityStoneCoverSectionResultEntityReadExtensionsTest.cs (.../StabilityStoneCoverSectionResultEntityReadExtensionsTest.cs) (revision 7082f74ed1f0f3a0601a2d8833c864b8c08bea59) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityStoneCover/StabilityStoneCoverSectionResultEntityReadExtensionsTest.cs (.../StabilityStoneCoverSectionResultEntityReadExtensionsTest.cs) (revision fdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74) @@ -61,8 +61,9 @@ collector.Read(failureMechanismSectionEntity, new TestFailureMechanismSection()); var entity = new StabilityStoneCoverSectionResultEntity { - LayerThree = layerThree, + LayerOne = Convert.ToByte(layerOne), LayerTwoA = Convert.ToByte(layerTwoA), + LayerThree = layerThree, FailureMechanismSectionEntity = failureMechanismSectionEntity }; var sectionResult = new StabilityStoneCoverFailureMechanismSectionResult(new TestFailureMechanismSection()); @@ -71,24 +72,23 @@ entity.Read(sectionResult); // Assert - Assert.IsNotNull(sectionResult); + Assert.AreEqual(layerOne, sectionResult.AssessmentLayerOne); Assert.AreEqual(layerTwoA, sectionResult.AssessmentLayerTwoA); Assert.AreEqual(layerThree, sectionResult.AssessmentLayerThree, 1e-6); + Assert.IsNotNull(sectionResult); } [Test] - [TestCase(true, AssessmentLayerTwoAResult.Failed)] - [TestCase(false, AssessmentLayerTwoAResult.Successful)] - [TestCase(false, AssessmentLayerTwoAResult.Failed)] - public void Read_WithNullLayerThree_ReturnStabilityStoneCoverSectionResultWithNullParameters(bool layerOne, AssessmentLayerTwoAResult layerTwoA) + public void Read_WithNullLayerThree_ReturnStabilityStoneCoverSectionResultWithNullParameters() { // Setup var collector = new ReadConversionCollector(); var failureMechanismSectionEntity = new FailureMechanismSectionEntity(); collector.Read(failureMechanismSectionEntity, new TestFailureMechanismSection()); var entity = new StabilityStoneCoverSectionResultEntity { - LayerTwoA = Convert.ToByte(layerTwoA), + LayerOne = Convert.ToByte(false), + LayerTwoA = Convert.ToByte(AssessmentLayerTwoAResult.Successful), LayerThree = null, FailureMechanismSectionEntity = failureMechanismSectionEntity }; Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs =================================================================== diff -u -re570ba372fafe1802a4caae2ef9410b64457198b -rfdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74 --- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision e570ba372fafe1802a4caae2ef9410b64457198b) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision fdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74) @@ -278,6 +278,7 @@ { var randomLayer2AResult = (AssessmentLayerTwoAResult) random.Next(0, Enum.GetValues(typeof(AssessmentLayerTwoAResult)).Length); + sectionResult.AssessmentLayerOne = Convert.ToBoolean(random.Next(0, 2)); sectionResult.AssessmentLayerTwoA = randomLayer2AResult; sectionResult.AssessmentLayerThree = (RoundedDouble) random.NextDouble(); } @@ -288,7 +289,8 @@ var random = new Random(21); foreach (var sectionResult in sectionResults) { - sectionResult.AssessmentLayerTwoA = (RoundedDouble) random.NextDouble(); + sectionResult.AssessmentLayerOne = Convert.ToBoolean(random.Next(0, 2)); + sectionResult.AssessmentLayerTwoA = (RoundedDouble)random.NextDouble(); sectionResult.AssessmentLayerThree = (RoundedDouble) random.NextDouble(); } } @@ -865,6 +867,7 @@ { var randomLayer2AResult = (AssessmentLayerTwoAResult) random.Next(0, Enum.GetValues(typeof(AssessmentLayerTwoAResult)).Length); + sectionResult.AssessmentLayerOne = Convert.ToBoolean(random.Next(0, 2)); sectionResult.AssessmentLayerTwoA = randomLayer2AResult; sectionResult.AssessmentLayerThree = (RoundedDouble) random.NextDouble(); }