Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ClosingStructureSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -r838250fef0c200dbbffa9a562ca5935fdc500d19 -r7d790a82bda0347f47961162de614bacfa8e288c --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ClosingStructureSectionResultEntityReadExtensionsTest.cs (.../ClosingStructureSectionResultEntityReadExtensionsTest.cs) (revision 838250fef0c200dbbffa9a562ca5935fdc500d19) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ClosingStructureSectionResultEntityReadExtensionsTest.cs (.../ClosingStructureSectionResultEntityReadExtensionsTest.cs) (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -62,7 +62,7 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithDecimalParameterValues_ReturnClosingStructureSoilLayerWithDoubleParameterValues(bool layerOne) + public void Read_WithDecimalParameterValues_ReturnClosingStructureSectionResultWithDoubleParameterValues(bool layerOne) { // Setup var random = new Random(21); @@ -97,7 +97,7 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithNullLayerTwoA_ReturnClosingStructureSoilLayerWithNullParameters(bool layerOne) + public void Read_WithNullLayerTwoA_ReturnClosingStructureSectionResultWithNullParameters(bool layerOne) { // Setup var collector = new ReadConversionCollector(); @@ -122,7 +122,7 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithNullLayerThree_ReturnClosingStructureSoilLayerWithNullParameters(bool layerOne) + public void Read_WithNullLayerThree_ReturnClosingStructureSectionResultWithNullParameters(bool layerOne) { // Setup var collector = new ReadConversionCollector(); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/DuneErosionSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -rc482712c0ff06d5654836fc8d9af535641d63ffb -r7d790a82bda0347f47961162de614bacfa8e288c --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/DuneErosionSectionResultEntityReadExtensionsTest.cs (.../DuneErosionSectionResultEntityReadExtensionsTest.cs) (revision c482712c0ff06d5654836fc8d9af535641d63ffb) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/DuneErosionSectionResultEntityReadExtensionsTest.cs (.../DuneErosionSectionResultEntityReadExtensionsTest.cs) (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -64,7 +64,7 @@ [TestCase(true, AssessmentLayerTwoAResult.Failed)] [TestCase(false, AssessmentLayerTwoAResult.Successful)] [TestCase(false, AssessmentLayerTwoAResult.Failed)] - public void Read_WithDecimalParameterValues_ReturnDuneErosionSoilLayerWithDoubleParameterValues(bool layerOne, AssessmentLayerTwoAResult layerTwoA) + public void Read_WithDecimalParameterValues_ReturnDuneErosionSectionResultWithDoubleParameterValues(bool layerOne, AssessmentLayerTwoAResult layerTwoA) { // Setup var random = new Random(21); @@ -97,7 +97,7 @@ [TestCase(true, AssessmentLayerTwoAResult.Failed)] [TestCase(false, AssessmentLayerTwoAResult.Successful)] [TestCase(false, AssessmentLayerTwoAResult.Failed)] - public void Read_WithNullLayerThree_ReturnDuneErosionSoilLayerWithNullParameters(bool layerOne, AssessmentLayerTwoAResult layerTwoA) + public void Read_WithNullLayerThree_ReturnDuneErosionSectionResultWithNullParameters(bool layerOne, AssessmentLayerTwoAResult layerTwoA) { // Setup var collector = new ReadConversionCollector(); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverErosionInwardsSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -r838250fef0c200dbbffa9a562ca5935fdc500d19 -r7d790a82bda0347f47961162de614bacfa8e288c --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverErosionInwardsSectionResultEntityReadExtensionsTest.cs (.../GrassCoverErosionInwardsSectionResultEntityReadExtensionsTest.cs) (revision 838250fef0c200dbbffa9a562ca5935fdc500d19) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverErosionInwardsSectionResultEntityReadExtensionsTest.cs (.../GrassCoverErosionInwardsSectionResultEntityReadExtensionsTest.cs) (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -62,7 +62,7 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithDecimalParameterValues_ReturnGrassCoverErosionInwardsSoilLayerWithDoubleParameterValues(bool layerOne) + public void Read_WithDecimalParameterValues_ReturnGrassCoverErosionInwardsSectionResultWithDoubleParameterValues(bool layerOne) { // Setup var random = new Random(21); @@ -94,7 +94,7 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithNullParameterValues_ReturnGrassCoverErosionInwardsSoilLayerWithNullParameters(bool layerOne) + public void Read_WithNullParameterValues_ReturnGrassCoverErosionInwardsSectionResultWithNullParameters(bool layerOne) { // Setup var collector = new ReadConversionCollector(); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverErosionOutwardsSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -rc482712c0ff06d5654836fc8d9af535641d63ffb -r7d790a82bda0347f47961162de614bacfa8e288c --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverErosionOutwardsSectionResultEntityReadExtensionsTest.cs (.../GrassCoverErosionOutwardsSectionResultEntityReadExtensionsTest.cs) (revision c482712c0ff06d5654836fc8d9af535641d63ffb) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverErosionOutwardsSectionResultEntityReadExtensionsTest.cs (.../GrassCoverErosionOutwardsSectionResultEntityReadExtensionsTest.cs) (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -64,7 +64,7 @@ [TestCase(true, AssessmentLayerTwoAResult.Failed)] [TestCase(false, AssessmentLayerTwoAResult.Successful)] [TestCase(false, AssessmentLayerTwoAResult.Failed)] - public void Read_WithDecimalParameterValues_ReturnGrassCoverErosionOutwardsSoilLayerWithDoubleParameterValues(bool layerOne, AssessmentLayerTwoAResult layerTwoA) + public void Read_WithDecimalParameterValues_ReturnGrassCoverErosionOutwardsSectionResultWithDoubleParameterValues(bool layerOne, AssessmentLayerTwoAResult layerTwoA) { // Setup var random = new Random(21); @@ -99,7 +99,7 @@ [TestCase(true, AssessmentLayerTwoAResult.Failed)] [TestCase(false, AssessmentLayerTwoAResult.Successful)] [TestCase(false, AssessmentLayerTwoAResult.Failed)] - public void Read_WithNullLayerThree_ReturnGrassCoverErosionOutwardsSoilLayerWithNullParameters(bool layerOne, AssessmentLayerTwoAResult layerTwoA) + public void Read_WithNullLayerThree_ReturnGrassCoverErosionOutwardsSectionResultWithNullParameters(bool layerOne, AssessmentLayerTwoAResult layerTwoA) { // Setup var collector = new ReadConversionCollector(); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverSlipOffInwardsSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -rc482712c0ff06d5654836fc8d9af535641d63ffb -r7d790a82bda0347f47961162de614bacfa8e288c --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverSlipOffInwardsSectionResultEntityReadExtensionsTest.cs (.../GrassCoverSlipOffInwardsSectionResultEntityReadExtensionsTest.cs) (revision c482712c0ff06d5654836fc8d9af535641d63ffb) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverSlipOffInwardsSectionResultEntityReadExtensionsTest.cs (.../GrassCoverSlipOffInwardsSectionResultEntityReadExtensionsTest.cs) (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -64,7 +64,7 @@ [TestCase(true, AssessmentLayerTwoAResult.Failed)] [TestCase(false, AssessmentLayerTwoAResult.Successful)] [TestCase(false, AssessmentLayerTwoAResult.Failed)] - public void Read_WithDecimalParameterValues_ReturnGrassCoverSlipOffInwardsSoilLayerWithDoubleParameterValues(bool layerOne, AssessmentLayerTwoAResult layerTwoA) + public void Read_WithDecimalParameterValues_ReturnGrassCoverSlipOffInwardsSectionResultWithDoubleParameterValues(bool layerOne, AssessmentLayerTwoAResult layerTwoA) { // Setup var random = new Random(21); @@ -99,7 +99,7 @@ [TestCase(true, AssessmentLayerTwoAResult.Failed)] [TestCase(false, AssessmentLayerTwoAResult.Successful)] [TestCase(false, AssessmentLayerTwoAResult.Failed)] - public void Read_WithNullLayerThree_ReturnGrassCoverSlipOffInwardsSoilLayerWithNullParameters(bool layerOne, AssessmentLayerTwoAResult layerTwoA) + public void Read_WithNullLayerThree_ReturnGrassCoverSlipOffInwardsSectionResultWithNullParameters(bool layerOne, AssessmentLayerTwoAResult layerTwoA) { // Setup var collector = new ReadConversionCollector(); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverSlipOffOutwardsSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -rc482712c0ff06d5654836fc8d9af535641d63ffb -r7d790a82bda0347f47961162de614bacfa8e288c --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverSlipOffOutwardsSectionResultEntityReadExtensionsTest.cs (.../GrassCoverSlipOffOutwardsSectionResultEntityReadExtensionsTest.cs) (revision c482712c0ff06d5654836fc8d9af535641d63ffb) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverSlipOffOutwardsSectionResultEntityReadExtensionsTest.cs (.../GrassCoverSlipOffOutwardsSectionResultEntityReadExtensionsTest.cs) (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -64,7 +64,7 @@ [TestCase(true, AssessmentLayerTwoAResult.Failed)] [TestCase(false, AssessmentLayerTwoAResult.Successful)] [TestCase(false, AssessmentLayerTwoAResult.Failed)] - public void Read_WithDecimalParameterValues_ReturnGrassCoverSlipOffOutwardsSoilLayerWithDoubleParameterValues(bool layerOne, AssessmentLayerTwoAResult layerTwoA) + public void Read_WithDecimalParameterValues_ReturnGrassCoverSlipOffOutwardsSectionResultWithDoubleParameterValues(bool layerOne, AssessmentLayerTwoAResult layerTwoA) { // Setup var random = new Random(21); @@ -99,7 +99,7 @@ [TestCase(true, AssessmentLayerTwoAResult.Failed)] [TestCase(false, AssessmentLayerTwoAResult.Successful)] [TestCase(false, AssessmentLayerTwoAResult.Failed)] - public void Read_WithNullLayerThree_ReturnGrassCoverSlipOffOutwardsSoilLayerWithNullParameters(bool layerOne, AssessmentLayerTwoAResult layerTwoA) + public void Read_WithNullLayerThree_ReturnGrassCoverSlipOffOutwardsSectionResultWithNullParameters(bool layerOne, AssessmentLayerTwoAResult layerTwoA) { // Setup var collector = new ReadConversionCollector(); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/HeightStructuresSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -r838250fef0c200dbbffa9a562ca5935fdc500d19 -r7d790a82bda0347f47961162de614bacfa8e288c --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/HeightStructuresSectionResultEntityReadExtensionsTest.cs (.../HeightStructuresSectionResultEntityReadExtensionsTest.cs) (revision 838250fef0c200dbbffa9a562ca5935fdc500d19) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/HeightStructuresSectionResultEntityReadExtensionsTest.cs (.../HeightStructuresSectionResultEntityReadExtensionsTest.cs) (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -62,7 +62,7 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithDecimalParameterValues_ReturnHeightStructuresSoilLayerWithDoubleParameterValues(bool layerOne) + public void Read_WithDecimalParameterValues_ReturnHeightStructuresSectionResultWithDoubleParameterValues(bool layerOne) { // Setup var random = new Random(21); @@ -94,7 +94,7 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithNullParameterValues_ReturnHeightStructuresSoilLayerWithNullParameters(bool layerOne) + public void Read_WithNullParameterValues_ReturnHeightStructuresSectionResultWithNullParameters(bool layerOne) { // Setup var collector = new ReadConversionCollector(); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacrostabilityInwardsSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -rb4816e19c7167c26fad825b88dd72b59dcedc13a -r7d790a82bda0347f47961162de614bacfa8e288c --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacrostabilityInwardsSectionResultEntityReadExtensionsTest.cs (.../MacrostabilityInwardsSectionResultEntityReadExtensionsTest.cs) (revision b4816e19c7167c26fad825b88dd72b59dcedc13a) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacrostabilityInwardsSectionResultEntityReadExtensionsTest.cs (.../MacrostabilityInwardsSectionResultEntityReadExtensionsTest.cs) (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -62,7 +62,7 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithDecimalParameterValues_ReturnMacrostabilityInwardsSoilLayerWithDoubleParameterValues(bool layerOne) + public void Read_WithDecimalParameterValues_ReturnMacrostabilityInwardsSectionResultWithDoubleParameterValues(bool layerOne) { // Setup var random = new Random(21); @@ -97,7 +97,7 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithNullLayerTwoA_ReturnMacrostabilityInwardsSoilLayerWithNullParameters(bool layerOne) + public void Read_WithNullLayerTwoA_ReturnMacrostabilityInwardsSectionResultWithNullParameters(bool layerOne) { // Setup var collector = new ReadConversionCollector(); @@ -122,7 +122,7 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithNullLayerThree_ReturnMacrostabilityInwardsSoilLayerWithNullParameters(bool layerOne) + public void Read_WithNullLayerThree_ReturnMacrostabilityInwardsSectionResultWithNullParameters(bool layerOne) { // Setup var collector = new ReadConversionCollector(); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacrostabilityOutwardsSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -rb4816e19c7167c26fad825b88dd72b59dcedc13a -r7d790a82bda0347f47961162de614bacfa8e288c --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacrostabilityOutwardsSectionResultEntityReadExtensionsTest.cs (.../MacrostabilityOutwardsSectionResultEntityReadExtensionsTest.cs) (revision b4816e19c7167c26fad825b88dd72b59dcedc13a) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacrostabilityOutwardsSectionResultEntityReadExtensionsTest.cs (.../MacrostabilityOutwardsSectionResultEntityReadExtensionsTest.cs) (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -62,7 +62,7 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithDecimalParameterValues_ReturnMacrostabilityOutwardsSoilLayerWithDoubleParameterValues(bool layerOne) + public void Read_WithDecimalParameterValues_ReturnMacrostabilityOutwardsSectionResultWithDoubleParameterValues(bool layerOne) { // Setup var random = new Random(21); @@ -97,7 +97,7 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithNullLayerTwoA_ReturnMacrostabilityOutwardsSoilLayerWithNullParameters(bool layerOne) + public void Read_WithNullLayerTwoA_ReturnMacrostabilityOutwardsSectionResultWithNullParameters(bool layerOne) { // Setup var collector = new ReadConversionCollector(); @@ -122,7 +122,7 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithNullLayerThree_ReturnMacrostabilityOutwardsSoilLayerWithNullParameters(bool layerOne) + public void Read_WithNullLayerThree_ReturnMacrostabilityOutwardsSectionResultWithNullParameters(bool layerOne) { // Setup var collector = new ReadConversionCollector(); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MicrostabilitySectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -rc482712c0ff06d5654836fc8d9af535641d63ffb -r7d790a82bda0347f47961162de614bacfa8e288c --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MicrostabilitySectionResultEntityReadExtensionsTest.cs (.../MicrostabilitySectionResultEntityReadExtensionsTest.cs) (revision c482712c0ff06d5654836fc8d9af535641d63ffb) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MicrostabilitySectionResultEntityReadExtensionsTest.cs (.../MicrostabilitySectionResultEntityReadExtensionsTest.cs) (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -64,7 +64,7 @@ [TestCase(true, AssessmentLayerTwoAResult.Failed)] [TestCase(false, AssessmentLayerTwoAResult.Successful)] [TestCase(false, AssessmentLayerTwoAResult.Failed)] - public void Read_WithDecimalParameterValues_ReturnMicrostabilitySoilLayerWithDoubleParameterValues(bool layerOne, AssessmentLayerTwoAResult layerTwoA) + public void Read_WithDecimalParameterValues_ReturnMicrostabilitySectionResultWithDoubleParameterValues(bool layerOne, AssessmentLayerTwoAResult layerTwoA) { // Setup var random = new Random(21); @@ -99,7 +99,7 @@ [TestCase(true, AssessmentLayerTwoAResult.Failed)] [TestCase(false, AssessmentLayerTwoAResult.Successful)] [TestCase(false, AssessmentLayerTwoAResult.Failed)] - public void Read_WithNullLayerThree_ReturnMicrostabilitySoilLayerWithNullParameters(bool layerOne, AssessmentLayerTwoAResult layerTwoA) + public void Read_WithNullLayerThree_ReturnMicrostabilitySectionResultWithNullParameters(bool layerOne, AssessmentLayerTwoAResult layerTwoA) { // Setup var collector = new ReadConversionCollector(); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/PipingSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -r838250fef0c200dbbffa9a562ca5935fdc500d19 -r7d790a82bda0347f47961162de614bacfa8e288c --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/PipingSectionResultEntityReadExtensionsTest.cs (.../PipingSectionResultEntityReadExtensionsTest.cs) (revision 838250fef0c200dbbffa9a562ca5935fdc500d19) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/PipingSectionResultEntityReadExtensionsTest.cs (.../PipingSectionResultEntityReadExtensionsTest.cs) (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -62,7 +62,7 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithDecimalParameterValues_ReturnPipingSoilLayerWithDoubleParameterValues(bool layerOne) + public void Read_WithDecimalParameterValues_ReturnPipingSectionResultWithDoubleParameterValues(bool layerOne) { // Setup var random = new Random(21); @@ -95,7 +95,7 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithNullParameterValues_ReturnPipingSoilLayerWithNullParameters(bool layerOne) + public void Read_WithNullParameterValues_ReturnPipingSectionResultWithNullParameters(bool layerOne) { // Setup var collector = new ReadConversionCollector(); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/PipingStructureSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -rc482712c0ff06d5654836fc8d9af535641d63ffb -r7d790a82bda0347f47961162de614bacfa8e288c --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/PipingStructureSectionResultEntityReadExtensionsTest.cs (.../PipingStructureSectionResultEntityReadExtensionsTest.cs) (revision c482712c0ff06d5654836fc8d9af535641d63ffb) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/PipingStructureSectionResultEntityReadExtensionsTest.cs (.../PipingStructureSectionResultEntityReadExtensionsTest.cs) (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -64,7 +64,7 @@ [TestCase(true, AssessmentLayerTwoAResult.Failed)] [TestCase(false, AssessmentLayerTwoAResult.Successful)] [TestCase(false, AssessmentLayerTwoAResult.Failed)] - public void Read_WithDecimalParameterValues_ReturnPipingStructureSoilLayerWithDoubleParameterValues(bool layerOne, AssessmentLayerTwoAResult layerTwoA) + public void Read_WithDecimalParameterValues_ReturnPipingStructureSectionResultWithDoubleParameterValues(bool layerOne, AssessmentLayerTwoAResult layerTwoA) { // Setup var random = new Random(21); @@ -99,7 +99,7 @@ [TestCase(true, AssessmentLayerTwoAResult.Failed)] [TestCase(false, AssessmentLayerTwoAResult.Successful)] [TestCase(false, AssessmentLayerTwoAResult.Failed)] - public void Read_WithNullLayerThree_ReturnPipingStructureSoilLayerWithNullParameters(bool layerOne, AssessmentLayerTwoAResult layerTwoA) + public void Read_WithNullLayerThree_ReturnPipingStructureSectionResultWithNullParameters(bool layerOne, AssessmentLayerTwoAResult layerTwoA) { // Setup var collector = new ReadConversionCollector(); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityStoneCoverSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -rc482712c0ff06d5654836fc8d9af535641d63ffb -r7d790a82bda0347f47961162de614bacfa8e288c --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityStoneCoverSectionResultEntityReadExtensionsTest.cs (.../StabilityStoneCoverSectionResultEntityReadExtensionsTest.cs) (revision c482712c0ff06d5654836fc8d9af535641d63ffb) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityStoneCoverSectionResultEntityReadExtensionsTest.cs (.../StabilityStoneCoverSectionResultEntityReadExtensionsTest.cs) (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -64,7 +64,7 @@ [TestCase(true, AssessmentLayerTwoAResult.Failed)] [TestCase(false, AssessmentLayerTwoAResult.Successful)] [TestCase(false, AssessmentLayerTwoAResult.Failed)] - public void Read_WithDecimalParameterValues_ReturnStabilityStoneCoverSoilLayerWithDoubleParameterValues(bool layerOne, AssessmentLayerTwoAResult layerTwoA) + public void Read_WithDecimalParameterValues_ReturnStabilityStoneCoverSectionResultWithDoubleParameterValues(bool layerOne, AssessmentLayerTwoAResult layerTwoA) { // Setup var random = new Random(21); @@ -97,7 +97,7 @@ [TestCase(true, AssessmentLayerTwoAResult.Failed)] [TestCase(false, AssessmentLayerTwoAResult.Successful)] [TestCase(false, AssessmentLayerTwoAResult.Failed)] - public void Read_WithNullLayerThree_ReturnStabilityStoneCoverSoilLayerWithNullParameters(bool layerOne, AssessmentLayerTwoAResult layerTwoA) + public void Read_WithNullLayerThree_ReturnStabilityStoneCoverSectionResultWithNullParameters(bool layerOne, AssessmentLayerTwoAResult layerTwoA) { // Setup var collector = new ReadConversionCollector(); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StrengthStabilityLengthwiseConstructionSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -r838250fef0c200dbbffa9a562ca5935fdc500d19 -r7d790a82bda0347f47961162de614bacfa8e288c --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StrengthStabilityLengthwiseConstructionSectionResultEntityReadExtensionsTest.cs (.../StrengthStabilityLengthwiseConstructionSectionResultEntityReadExtensionsTest.cs) (revision 838250fef0c200dbbffa9a562ca5935fdc500d19) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StrengthStabilityLengthwiseConstructionSectionResultEntityReadExtensionsTest.cs (.../StrengthStabilityLengthwiseConstructionSectionResultEntityReadExtensionsTest.cs) (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -64,7 +64,7 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithDecimalParameterValues_ReturnStrengthStabilityLengthwiseConstructionSoilLayerWithDoubleParameterValues(bool layerOne) + public void Read_WithDecimalParameterValues_ReturnStrengthStabilityLengthwiseConstructionSectionResultWithDoubleParameterValues(bool layerOne) { // Setup var random = new Random(21); @@ -96,7 +96,7 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithNullParameterValues_ReturnStrengthStabilityLengthwiseConstructionSoilLayerWithNullParameters(bool layerOne) + public void Read_WithNullParameterValues_ReturnStrengthStabilityLengthwiseConstructionSectionResultWithNullParameters(bool layerOne) { // Setup var collector = new ReadConversionCollector(); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StrengthStabilityPointConstructionSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -r8a15fe6e429a0f177f25defaf1851c9963374dbe -r7d790a82bda0347f47961162de614bacfa8e288c --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StrengthStabilityPointConstructionSectionResultEntityReadExtensionsTest.cs (.../StrengthStabilityPointConstructionSectionResultEntityReadExtensionsTest.cs) (revision 8a15fe6e429a0f177f25defaf1851c9963374dbe) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StrengthStabilityPointConstructionSectionResultEntityReadExtensionsTest.cs (.../StrengthStabilityPointConstructionSectionResultEntityReadExtensionsTest.cs) (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -60,7 +60,7 @@ } [Test] - public void Read_WithDecimalParameterValues_ReturnStrengthStabilityPointConstructionSoilLayerWithDoubleParameterValues() + public void Read_WithDecimalParameterValues_ReturnStrengthStabilityPointConstructionSectionResultWithDoubleParameterValues() { // Setup var random = new Random(21); @@ -91,7 +91,7 @@ } [Test] - public void Read_WithNullLayerTwoA_ReturnStrengthStabilityPointConstructionSoilLayerWithNullParameters() + public void Read_WithNullLayerTwoA_ReturnStrengthStabilityPointConstructionSectionResultWithNullParameters() { // Setup var collector = new ReadConversionCollector(); @@ -113,7 +113,7 @@ } [Test] - public void Read_WithNullLayerThree_ReturnStrengthStabilityPointConstructionSoilLayerWithNullParameters() + public void Read_WithNullLayerThree_ReturnStrengthStabilityPointConstructionSectionResultWithNullParameters() { // Setup var collector = new ReadConversionCollector(); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/TechnicalInnovationSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -r838250fef0c200dbbffa9a562ca5935fdc500d19 -r7d790a82bda0347f47961162de614bacfa8e288c --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/TechnicalInnovationSectionResultEntityReadExtensionsTest.cs (.../TechnicalInnovationSectionResultEntityReadExtensionsTest.cs) (revision 838250fef0c200dbbffa9a562ca5935fdc500d19) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/TechnicalInnovationSectionResultEntityReadExtensionsTest.cs (.../TechnicalInnovationSectionResultEntityReadExtensionsTest.cs) (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -62,7 +62,7 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithDecimalParameterValues_ReturnTechnicalInnovationSoilLayerWithDoubleParameterValues(bool layerOne) + public void Read_WithDecimalParameterValues_ReturnTechnicalInnovationSectionResultWithDoubleParameterValues(bool layerOne) { // Setup var random = new Random(21); @@ -94,7 +94,7 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithNullParameterValues_ReturnTechnicalInnovationSoilLayerWithNullParameters(bool layerOne) + public void Read_WithNullParameterValues_ReturnTechnicalInnovationSectionResultWithNullParameters(bool layerOne) { // Setup var collector = new ReadConversionCollector(); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/WaterPressureAsphaltCoverSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -r838250fef0c200dbbffa9a562ca5935fdc500d19 -r7d790a82bda0347f47961162de614bacfa8e288c --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/WaterPressureAsphaltCoverSectionResultEntityReadExtensionsTest.cs (.../WaterPressureAsphaltCoverSectionResultEntityReadExtensionsTest.cs) (revision 838250fef0c200dbbffa9a562ca5935fdc500d19) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/WaterPressureAsphaltCoverSectionResultEntityReadExtensionsTest.cs (.../WaterPressureAsphaltCoverSectionResultEntityReadExtensionsTest.cs) (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -62,7 +62,7 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithDecimalParameterValues_ReturnWaterPressureAsphaltCoverSoilLayerWithDoubleParameterValues(bool layerOne) + public void Read_WithDecimalParameterValues_ReturnWaterPressureAsphaltCoverSectionResultWithDoubleParameterValues(bool layerOne) { // Setup var random = new Random(21); @@ -94,7 +94,7 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithNullParameterValues_ReturnWaterPressureAsphaltCoverSoilLayerWithNullParameters(bool layerOne) + public void Read_WithNullParameterValues_ReturnWaterPressureAsphaltCoverSectionResultWithNullParameters(bool layerOne) { // Setup var collector = new ReadConversionCollector(); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/WaveImpactAsphaltCoverSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -rb4816e19c7167c26fad825b88dd72b59dcedc13a -r7d790a82bda0347f47961162de614bacfa8e288c --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/WaveImpactAsphaltCoverSectionResultEntityReadExtensionsTest.cs (.../WaveImpactAsphaltCoverSectionResultEntityReadExtensionsTest.cs) (revision b4816e19c7167c26fad825b88dd72b59dcedc13a) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/WaveImpactAsphaltCoverSectionResultEntityReadExtensionsTest.cs (.../WaveImpactAsphaltCoverSectionResultEntityReadExtensionsTest.cs) (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -62,7 +62,7 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithDecimalParameterValues_ReturnWaveImpactAsphaltCoverSoilLayerWithDoubleParameterValues(bool layerOne) + public void Read_WithDecimalParameterValues_ReturnWaveImpactAsphaltCoverSectionResultWithDoubleParameterValues(bool layerOne) { // Setup var random = new Random(21); @@ -97,7 +97,7 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithNullLayerTwoA_ReturnWaveImpactAsphaltCoverSoilLayerWithNullParameters(bool layerOne) + public void Read_WithNullLayerTwoA_ReturnWaveImpactAsphaltCoverSectionResultWithNullParameters(bool layerOne) { // Setup var collector = new ReadConversionCollector(); @@ -122,7 +122,7 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithNullLayerThree_ReturnWaveImpactAsphaltCoverSoilLayerWithNullParameters(bool layerOne) + public void Read_WithNullLayerThree_ReturnWaveImpactAsphaltCoverSectionResultWithNullParameters(bool layerOne) { // Setup var collector = new ReadConversionCollector(); Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/GrassCoverErosionInwardsDikeProfileSelectionDialog.Designer.cs =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/GrassCoverErosionInwardsDikeProfileSelectionDialog.Designer.cs (revision 0) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/GrassCoverErosionInwardsDikeProfileSelectionDialog.Designer.cs (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -0,0 +1,76 @@ +namespace Ringtoets.GrassCoverErosionInwards.Forms +{ + partial class GrassCoverErosionInwardsDikeProfileSelectionDialog + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GrassCoverErosionInwardsDikeProfileSelectionDialog)); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.OkButton = new System.Windows.Forms.Button(); + this.CustomCancelButton = new System.Windows.Forms.Button(); + this.flowLayoutPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.Controls.Add(this.CustomCancelButton); + this.flowLayoutPanel1.Controls.Add(this.OkButton); + resources.ApplyResources(this.flowLayoutPanel1, "flowLayoutPanel1"); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + // + // OkButton + // + resources.ApplyResources(this.OkButton, "OkButton"); + this.OkButton.Name = "OkButton"; + this.OkButton.UseVisualStyleBackColor = true; + this.OkButton.Click += new System.EventHandler(this.OkButtonOnClick); + // + // CancelButton + // + resources.ApplyResources(this.CustomCancelButton, "CustomCancelButton"); + this.CustomCancelButton.Name = "CustomCancelButton"; + this.CustomCancelButton.UseVisualStyleBackColor = true; + this.CustomCancelButton.Click += new System.EventHandler(this.CancelButtonOnClick); + // + // DikeProfileSelectionDialog + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.flowLayoutPanel1); + this.Name = "DikeProfileSelectionDialog"; + this.flowLayoutPanel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.Button CustomCancelButton; + private System.Windows.Forms.Button OkButton; + } +} \ No newline at end of file Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/GrassCoverErosionInwardsDikeProfileSelectionDialog.cs =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/GrassCoverErosionInwardsDikeProfileSelectionDialog.cs (revision 0) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/GrassCoverErosionInwardsDikeProfileSelectionDialog.cs (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Windows.Forms; +using Core.Common.Controls.Dialogs; +using Ringtoets.GrassCoverErosionInwards.Data; +using Ringtoets.GrassCoverErosionInwards.Forms.Views; +using CommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; + +namespace Ringtoets.GrassCoverErosionInwards.Forms +{ + /// + /// A dialog which allows the user to make a selection form a given set of . Upon + /// closing of the dialog, the selected can be obtained. + /// + public partial class GrassCoverErosionInwardsDikeProfileSelectionDialog : DialogBase + { + /// + /// Creates a new instance of . + /// + /// The parent of the dialog. + /// The collection of to show in the dialog. + public GrassCoverErosionInwardsDikeProfileSelectionDialog(IWin32Window dialogParent, IEnumerable dikeProfiles) + : base(dialogParent, CommonFormsResources.GenerateScenariosIcon, 300, 400) + { + InitializeComponent(); + + DikeProfileSelectionView = new GrassCoverErosionInwardsDikeProfileSelectionView(dikeProfiles) + { + Dock = DockStyle.Fill + }; + Controls.Add(DikeProfileSelectionView); + SelectedDikeProfiles = new List(); + } + + /// + /// Gets a collection of selected if they were selected + /// in the dialog and a confirmation was given. If no confirmation was given or no + /// was selected, then an empty collection is returned. + /// + public IEnumerable SelectedDikeProfiles { get; private set; } + + protected override Button GetCancelButton() + { + return CustomCancelButton; + } + + private GrassCoverErosionInwardsDikeProfileSelectionView DikeProfileSelectionView { get; set; } + + private void OkButtonOnClick(object sender, EventArgs e) + { + SelectedDikeProfiles = DikeProfileSelectionView.GetSelectedDikeProfiles(); + Close(); + } + + private void CancelButtonOnClick(object sender, EventArgs eventArgs) + { + Close(); + } + } +} \ No newline at end of file Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/GrassCoverErosionInwardsDikeProfileSelectionDialog.resx =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/GrassCoverErosionInwardsDikeProfileSelectionDialog.resx (revision 0) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/GrassCoverErosionInwardsDikeProfileSelectionDialog.resx (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -0,0 +1,216 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + 293, 3 + + + 75, 23 + + + + 1 + + + Annuleren + + + CustomCancelButton + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + flowLayoutPanel1 + + + 0 + + + 212, 3 + + + 75, 23 + + + 0 + + + Genereren + + + OkButton + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + flowLayoutPanel1 + + + 1 + + + + Bottom + + + 0, 297 + + + Yes + + + 371, 30 + + + 0 + + + flowLayoutPanel1 + + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + True + + + 6, 13 + + + 371, 327 + + + Selecteer dijkprofielen + + + DikeProfileSelectionDialog + + + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Ringtoets.GrassCoverErosionInwards.Forms.csproj =================================================================== diff -u -r400897d6f2b3e914e5cfc5d0c5a5356e4615eb42 -r7d790a82bda0347f47961162de614bacfa8e288c --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Ringtoets.GrassCoverErosionInwards.Forms.csproj (.../Ringtoets.GrassCoverErosionInwards.Forms.csproj) (revision 400897d6f2b3e914e5cfc5d0c5a5356e4615eb42) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Ringtoets.GrassCoverErosionInwards.Forms.csproj (.../Ringtoets.GrassCoverErosionInwards.Forms.csproj) (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -41,6 +41,12 @@ Properties\GlobalAssembly.cs + + Form + + + GrassCoverErosionInwardsDikeProfileSelectionDialog.cs + @@ -69,6 +75,12 @@ UserControl + + UserControl + + + GrassCoverErosionInwardsDikeProfileSelectionView.cs + @@ -123,11 +135,17 @@ + + GrassCoverErosionInwardsDikeProfileSelectionDialog.cs + PublicResXFileCodeGenerator Resources.Designer.cs Designer + + GrassCoverErosionInwardsDikeProfileSelectionView.cs + Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsDikeProfileSelectionView.Designer.cs =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsDikeProfileSelectionView.Designer.cs (revision 0) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsDikeProfileSelectionView.Designer.cs (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -0,0 +1,125 @@ +namespace Ringtoets.GrassCoverErosionInwards.Forms.Views +{ + partial class GrassCoverErosionInwardsDikeProfileSelectionView + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GrassCoverErosionInwardsDikeProfileSelectionView)); + this.panel1 = new System.Windows.Forms.Panel(); + this.SelectNoneButton = new System.Windows.Forms.Button(); + this.SelectAllButton = new System.Windows.Forms.Button(); + this.panel2 = new System.Windows.Forms.Panel(); + this.DikeProfileDataGrid = new System.Windows.Forms.DataGridView(); + this.UseColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.SurfaceLineNameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.panel1.SuspendLayout(); + this.panel2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.DikeProfileDataGrid)).BeginInit(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Controls.Add(this.SelectNoneButton); + this.panel1.Controls.Add(this.SelectAllButton); + resources.ApplyResources(this.panel1, "panel1"); + this.panel1.Name = "panel1"; + // + // SelectNoneButton + // + resources.ApplyResources(this.SelectNoneButton, "SelectNoneButton"); + this.SelectNoneButton.Name = "SelectNoneButton"; + this.SelectNoneButton.UseVisualStyleBackColor = true; + this.SelectNoneButton.Click += new System.EventHandler(this.OnSelectNoneClick); + // + // SelectAllButton + // + resources.ApplyResources(this.SelectAllButton, "SelectAllButton"); + this.SelectAllButton.Name = "SelectAllButton"; + this.SelectAllButton.UseVisualStyleBackColor = true; + this.SelectAllButton.Click += new System.EventHandler(this.OnSelectAllClick); + // + // panel2 + // + this.panel2.Controls.Add(this.DikeProfileDataGrid); + resources.ApplyResources(this.panel2, "panel2"); + this.panel2.Name = "panel2"; + // + // DikeProfileDataGrid + // + this.DikeProfileDataGrid.AllowUserToAddRows = false; + this.DikeProfileDataGrid.AllowUserToDeleteRows = false; + this.DikeProfileDataGrid.AllowUserToResizeColumns = false; + this.DikeProfileDataGrid.AllowUserToResizeRows = false; + this.DikeProfileDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.DikeProfileDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.UseColumn, + this.SurfaceLineNameColumn}); + resources.ApplyResources(this.DikeProfileDataGrid, "DikeProfileDataGrid"); + this.DikeProfileDataGrid.Name = "DikeProfileDataGrid"; + this.DikeProfileDataGrid.RowHeadersVisible = false; + this.DikeProfileDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + // + // UseColumn + // + this.UseColumn.DataPropertyName = "Selected"; + resources.ApplyResources(this.UseColumn, "UseColumn"); + this.UseColumn.Name = "UseColumn"; + this.UseColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.UseColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // SurfaceLineNameColumn + // + this.SurfaceLineNameColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.SurfaceLineNameColumn.DataPropertyName = "Name"; + resources.ApplyResources(this.SurfaceLineNameColumn, "SurfaceLineNameColumn"); + this.SurfaceLineNameColumn.Name = "SurfaceLineNameColumn"; + // + // GrassCoverErosionInwardsDikeProfileSelectionView + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.panel2); + this.Controls.Add(this.panel1); + this.Name = "GrassCoverErosionInwardsDikeProfileSelectionView"; + this.panel1.ResumeLayout(false); + this.panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.DikeProfileDataGrid)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.DataGridView DikeProfileDataGrid; + private System.Windows.Forms.Button SelectNoneButton; + private System.Windows.Forms.Button SelectAllButton; + private System.Windows.Forms.DataGridViewCheckBoxColumn UseColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn SurfaceLineNameColumn; + } +} Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsDikeProfileSelectionView.cs =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsDikeProfileSelectionView.cs (revision 0) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsDikeProfileSelectionView.cs (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -0,0 +1,81 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; +using Ringtoets.GrassCoverErosionInwards.Data; + +namespace Ringtoets.GrassCoverErosionInwards.Forms.Views +{ + /// + /// A which can be used to display a list of + /// from which a selection can be made. + /// + public partial class GrassCoverErosionInwardsDikeProfileSelectionView : UserControl + { + /// + /// Creates a new instance of . The given + /// is used to fill the datagrid. + /// + /// The dike profiles to present in the view. + public GrassCoverErosionInwardsDikeProfileSelectionView(IEnumerable dikeProfiles) + { + if (dikeProfiles == null) + { + throw new ArgumentNullException("dikeProfiles"); + } + InitializeComponent(); + DikeProfileDataGrid.AutoGenerateColumns = false; + DikeProfileDataGrid.DataSource = dikeProfiles.Select(sl => new DikeProfileSelectionRow(sl)).ToArray(); + } + + /// + /// Gets the currently selected dike profiles from the data grid view. + /// + /// A of + /// which were selected in the view. + public IEnumerable GetSelectedDikeProfiles() + { + return DikeProfiles.Where(sl => sl.Selected).Select(sl => sl.DikeProfile).ToArray(); + } + + private IEnumerable DikeProfiles + { + get + { + return (IEnumerable) DikeProfileDataGrid.DataSource; + } + } + + private void OnSelectAllClick(object sender, EventArgs e) + { + foreach (var item in DikeProfiles) + { + item.Selected = true; + } + DikeProfileDataGrid.Invalidate(); + } + + private void OnSelectNoneClick(object sender, EventArgs e) + { + foreach (var item in DikeProfiles) + { + item.Selected = false; + } + DikeProfileDataGrid.Invalidate(); + } + + private class DikeProfileSelectionRow + { + public DikeProfileSelectionRow(DikeProfile dikeProfile) + { + Selected = false; + Name = dikeProfile.Name; + DikeProfile = dikeProfile; + } + + public bool Selected { get; set; } + public string Name { get; private set; } + public DikeProfile DikeProfile { get; private set; } + } + } +} \ No newline at end of file Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsDikeProfileSelectionView.resx =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsDikeProfileSelectionView.resx (revision 0) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsDikeProfileSelectionView.resx (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -0,0 +1,285 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + 98, 3 + + + 100, 23 + + + + 1 + + + Deselecteer alles + + + SelectNoneButton + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 0 + + + 3, 3 + + + 89, 23 + + + 0 + + + Selecteer alles + + + SelectAllButton + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 1 + + + + Top + + + 0, 0 + + + 303, 29 + + + 0 + + + panel1 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + True + + + Gebruiken + + + 60 + + + True + + + Dijkprofiel + + + Fill + + + 0, 0 + + + 303, 121 + + + 0 + + + DikeProfileDataGrid + + + System.Windows.Forms.DataGridView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 0 + + + Fill + + + 0, 29 + + + 303, 121 + + + 1 + + + panel2 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + True + + + 6, 13 + + + 303, 150 + + + UseColumn + + + System.Windows.Forms.DataGridViewCheckBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + SurfaceLineNameColumn + + + System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrassCoverErosionInwardsDikeProfileSelectionView + + + System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/GrassCoverErosionInwardsDikeProfileSelectionDialogTest.cs =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/GrassCoverErosionInwardsDikeProfileSelectionDialogTest.cs (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/GrassCoverErosionInwardsDikeProfileSelectionDialogTest.cs (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -0,0 +1,155 @@ +using System; +using System.Linq; +using System.Windows.Forms; +using Core.Common.Base.Geometry; +using NUnit.Extensions.Forms; +using NUnit.Framework; +using Ringtoets.GrassCoverErosionInwards.Data; +using Ringtoets.GrassCoverErosionInwards.Forms.Views; + +namespace Ringtoets.GrassCoverErosionInwards.Forms.Test +{ + [TestFixture] + public class GrassCoverErosionInwardsDikeProfileSelectionDialogTest + { + [Test] + public void Constructor_WithoutParent_ThrowsArgumentNullException() + { + // Call + TestDelegate test = () => new GrassCoverErosionInwardsDikeProfileSelectionDialog(null, Enumerable.Empty()); + + // Assert + var parameter = Assert.Throws(test).ParamName; + Assert.AreEqual("dialogParent", parameter); + } + + [Test] + public void Constructor_WithoutDikeProfiles_ThrowsArgumentNullException() + { + // Call + TestDelegate test = () => new GrassCoverErosionInwardsDikeProfileSelectionDialog(new Form(), null); + + // Assert + var parameter = Assert.Throws(test).ParamName; + Assert.AreEqual("dikeProfiles", parameter); + } + + [Test] + public void Constructor_WithParentAndDikeProfiles_DefaultProperties() + { + // Call + using (var dialog = new GrassCoverErosionInwardsDikeProfileSelectionDialog(new Form(), Enumerable.Empty())) + { + + // Assert + Assert.IsEmpty(dialog.SelectedDikeProfiles); + Assert.IsInstanceOf(new ControlTester("GrassCoverErosionInwardsDikeProfileSelectionView", dialog).TheObject); + Assert.AreEqual("Selecteer dijkprofielen", dialog.Text); + } + } + + [Test] + public void OnLoad_Always_SetMinimumSize() + { + // Setup + using (var dialog = new GrassCoverErosionInwardsDikeProfileSelectionDialog(new Form(), Enumerable.Empty())) + { + // Call + dialog.Show(); + + // Assert + Assert.AreEqual(300, dialog.MinimumSize.Width); + Assert.AreEqual(400, dialog.MinimumSize.Height); + } + } + + [Test] + public void GivenDialogWithSelectedDikeProfiles_WhenCloseWithoutConfirmation_ThenReturnsEmptyCollection() + { + // Given + var dikeProfiles = new[] + { + new DikeProfile(CreateTestPoint()), + new DikeProfile(CreateTestPoint()) + }; + + using (var dialog = new GrassCoverErosionInwardsDikeProfileSelectionDialog(new Form(), dikeProfiles)) + { + + var selectionView = (DataGridView)new ControlTester("DikeProfileDataGrid", dialog).TheObject; + + dialog.Show(); + selectionView.Rows[0].Cells[0].Value = true; + + // When + dialog.Close(); + + // Then + Assert.IsEmpty(dialog.SelectedDikeProfiles); + } + } + + private Point2D CreateTestPoint() + { + return new Point2D(0,0); + } + + [Test] + public void GivenDialogWithSelectedDikeProfiles_WhenCancelButtonClicked_ThenReturnsSelectedCollection() + { + // Given + var selectedDikeProfile = new DikeProfile(CreateTestPoint()); + var dikeProfiles = new[] + { + selectedDikeProfile, + new DikeProfile(CreateTestPoint()) + }; + + using (var dialog = new GrassCoverErosionInwardsDikeProfileSelectionDialog(new Form(), dikeProfiles)) + { + var selectionView = (DataGridView)new ControlTester("DikeProfileDataGrid", dialog).TheObject; + + dialog.Show(); + selectionView.Rows[0].Cells[0].Value = true; + + // When + var cancelButton = new ButtonTester("CustomCancelButton", dialog); + cancelButton.Click(); + + // Then + Assert.IsEmpty(dialog.SelectedDikeProfiles); + } + } + + [Test] + public void GivenDialogWithSelectedDikeProfiles_WhenGenerateButtonClicked_ThenReturnsSelectedCollection() + { + // Given + var selectedDikeProfile = new DikeProfile(CreateTestPoint()); + var dikeProfiles = new[] + { + selectedDikeProfile, + new DikeProfile(CreateTestPoint()) + }; + + using (var dialog = new GrassCoverErosionInwardsDikeProfileSelectionDialog(new Form(), dikeProfiles)) + { + var selectionView = (DataGridView)new ControlTester("DikeProfileDataGrid", dialog).TheObject; + + dialog.Show(); + selectionView.Rows[0].Cells[0].Value = true; + + // When + var okButton = new ButtonTester("OkButton", dialog); + okButton.Click(); + + // Then + var result = dialog.SelectedDikeProfiles; + CollectionAssert.AreEqual(new[] + { + selectedDikeProfile + }, result); + } + } + } +} \ No newline at end of file Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PresentationObjects/GrassCoverErosionInwardsCalculationGroupContextTest.cs =================================================================== diff -u -re775448bfb8290e43d62340a53a08723bbc035c6 -r7d790a82bda0347f47961162de614bacfa8e288c --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PresentationObjects/GrassCoverErosionInwardsCalculationGroupContextTest.cs (.../GrassCoverErosionInwardsCalculationGroupContextTest.cs) (revision e775448bfb8290e43d62340a53a08723bbc035c6) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PresentationObjects/GrassCoverErosionInwardsCalculationGroupContextTest.cs (.../GrassCoverErosionInwardsCalculationGroupContextTest.cs) (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -52,6 +52,7 @@ Assert.AreSame(calculationGroup, groupContext.WrappedData); Assert.AreSame(failureMechanism, groupContext.FailureMechanism); Assert.AreSame(assessmentSectionMock, groupContext.AssessmentSection); + Assert.AreSame(failureMechanism.DikeProfiles, groupContext.AvailableDikeProfiles); mockRepository.VerifyAll(); } } Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj =================================================================== diff -u -r400897d6f2b3e914e5cfc5d0c5a5356e4615eb42 -r7d790a82bda0347f47961162de614bacfa8e288c --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj (.../Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj) (revision 400897d6f2b3e914e5cfc5d0c5a5356e4615eb42) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj (.../Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj) (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -58,6 +58,7 @@ + True @@ -91,6 +92,7 @@ + Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsDikeProfileSelectionViewTest.cs =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsDikeProfileSelectionViewTest.cs (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsDikeProfileSelectionViewTest.cs (revision 7d790a82bda0347f47961162de614bacfa8e288c) @@ -0,0 +1,275 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; +using Core.Common.Base.Geometry; +using NUnit.Extensions.Forms; +using NUnit.Framework; +using Ringtoets.GrassCoverErosionInwards.Data; +using Ringtoets.GrassCoverErosionInwards.Forms.Views; + +namespace Ringtoets.GrassCoverErosionInwards.Forms.Test.Views +{ + [TestFixture] + public class GrassCoverErosionInwardsDikeProfileSelectionViewTest + { + private Form testForm; + private const int dikeProfileNameColumnIndex = 1; + private const int selectedColumnIndex = 0; + + [SetUp] + public void Setup() + { + testForm = new Form(); + } + + [TearDown] + public void TearDown() + { + testForm.Dispose(); + } + + [Test] + public void Constructor_DikeProfilesNull_ThrowArgumentNullException() + { + // Call + TestDelegate test = () => new GrassCoverErosionInwardsDikeProfileSelectionView(null); + + // Assert + var parameter = Assert.Throws(test).ParamName; + Assert.AreEqual("dikeProfiles", parameter); + } + + [Test] + public void Constructor_DikeProfilesEmpty_DefaultProperties() + { + // Call + var view = new GrassCoverErosionInwardsDikeProfileSelectionView(new List()); + + // Assert + ShowPipingCalculationsView(view); + + var dikeProfileDataGrid = (DataGridView)new ControlTester("DikeProfileDataGrid").TheObject; + + Assert.AreEqual(2, dikeProfileDataGrid.ColumnCount); + Assert.IsFalse(dikeProfileDataGrid.RowHeadersVisible); + + var selectedColumn = dikeProfileDataGrid.Columns[0] as DataGridViewCheckBoxColumn; + var dikeProfileNameColumn = dikeProfileDataGrid.Columns[1] as DataGridViewTextBoxColumn; + + Assert.NotNull(selectedColumn); + Assert.AreEqual("Selected", selectedColumn.DataPropertyName); + Assert.AreEqual("Gebruiken", selectedColumn.HeaderText); + Assert.AreEqual(60, selectedColumn.Width); + Assert.IsFalse(selectedColumn.ReadOnly); + + Assert.NotNull(dikeProfileNameColumn); + Assert.AreEqual("Name", dikeProfileNameColumn.DataPropertyName); + Assert.AreEqual("Dijkprofiel", dikeProfileNameColumn.HeaderText); + Assert.AreEqual(DataGridViewAutoSizeColumnMode.Fill, dikeProfileNameColumn.AutoSizeMode); + Assert.IsTrue(dikeProfileNameColumn.ReadOnly); + + Assert.AreEqual(0, dikeProfileDataGrid.RowCount); + } + + [Test] + public void Constructor_DikeProfilesOneEntry_OneRowInGrid() + { + // Setup + var testname = "testName"; + var ringtoetsGrassCoverErosionInwardsDikeProfile = CreateTestDikeProfile(); + ringtoetsGrassCoverErosionInwardsDikeProfile.Name = testname; + + // Call + var view = new GrassCoverErosionInwardsDikeProfileSelectionView(new[] + { + ringtoetsGrassCoverErosionInwardsDikeProfile + }); + + // Assert + ShowPipingCalculationsView(view); + var dikeProfileDataGrid = (DataGridView)new ControlTester("DikeProfileDataGrid").TheObject; + + Assert.AreEqual(1, dikeProfileDataGrid.RowCount); + Assert.IsFalse((bool)dikeProfileDataGrid.Rows[0].Cells[selectedColumnIndex].Value); + Assert.AreEqual(testname, (string)dikeProfileDataGrid.Rows[0].Cells[dikeProfileNameColumnIndex].Value); + } + + [Test] + public void OnSelectAllClicked_WithDikeProfiles_AllDikeProfilesSelected() + { + // Setup + var ringtoetsGrassCoverErosionInwardsDikeProfile = CreateTestDikeProfile(); + var ringtoetsGrassCoverErosionInwardsDikeProfile2 = CreateTestDikeProfile(); + + var view = new GrassCoverErosionInwardsDikeProfileSelectionView(new[] + { + ringtoetsGrassCoverErosionInwardsDikeProfile, + ringtoetsGrassCoverErosionInwardsDikeProfile2 + }); + + ShowPipingCalculationsView(view); + var selectAllButtonTester = new ButtonTester("SelectAllButton"); + + // Call + selectAllButtonTester.Click(); + + // Assert + var dikeProfileDataGrid = (DataGridView)new ControlTester("DikeProfileDataGrid").TheObject; + for (int i = 0; i < dikeProfileDataGrid.RowCount; i++) + { + var row = dikeProfileDataGrid.Rows[i]; + Assert.IsTrue((bool)row.Cells[selectedColumnIndex].Value); + } + } + + [Test] + public void OnSelectNoneClicked_WithDikeProfiles_AllDikeProfilesDeselected() + { + // Setup + var ringtoetsGrassCoverErosionInwardsDikeProfile = CreateTestDikeProfile(); + var ringtoetsGrassCoverErosionInwardsDikeProfile2 = CreateTestDikeProfile(); + + var view = new GrassCoverErosionInwardsDikeProfileSelectionView(new[] + { + ringtoetsGrassCoverErosionInwardsDikeProfile, + ringtoetsGrassCoverErosionInwardsDikeProfile2 + }); + + ShowPipingCalculationsView(view); + var selectNoneButtonTester = new ButtonTester("SelectNoneButton"); + + var dikeProfileDataGrid = (DataGridView)new ControlTester("DikeProfileDataGrid").TheObject; + for (int i = 0; i < dikeProfileDataGrid.RowCount; i++) + { + var row = dikeProfileDataGrid.Rows[i]; + row.Cells[selectedColumnIndex].Value = true; + } + + // Call + selectNoneButtonTester.Click(); + + // Assert + for (int i = 0; i < dikeProfileDataGrid.RowCount; i++) + { + var row = dikeProfileDataGrid.Rows[i]; + Assert.IsFalse((bool)row.Cells[selectedColumnIndex].Value); + } + } + + [Test] + public void GetSelectedDikeProfiles_WithDikeProfilesMultipleSelected_ReturnSelectedDikeProfiles() + { + // Setup + var ringtoetsGrassCoverErosionInwardsDikeProfile = CreateTestDikeProfile(); + var ringtoetsGrassCoverErosionInwardsDikeProfile2 = CreateTestDikeProfile(); + var ringtoetsGrassCoverErosionInwardsDikeProfile3 = CreateTestDikeProfile(); + var ringtoetsGrassCoverErosionInwardsDikeProfile4 = CreateTestDikeProfile(); + + var view = new GrassCoverErosionInwardsDikeProfileSelectionView(new[] + { + ringtoetsGrassCoverErosionInwardsDikeProfile, + ringtoetsGrassCoverErosionInwardsDikeProfile2, + ringtoetsGrassCoverErosionInwardsDikeProfile3, + ringtoetsGrassCoverErosionInwardsDikeProfile4 + }); + + ShowPipingCalculationsView(view); + + var dikeProfileDataGrid = (DataGridView)new ControlTester("DikeProfileDataGrid").TheObject; + dikeProfileDataGrid.Rows[1].Cells[selectedColumnIndex].Value = true; + dikeProfileDataGrid.Rows[3].Cells[selectedColumnIndex].Value = true; + + // Call + IEnumerable dikeProfiles = view.GetSelectedDikeProfiles(); + + // Assert + CollectionAssert.AreEqual(new[] { ringtoetsGrassCoverErosionInwardsDikeProfile2, ringtoetsGrassCoverErosionInwardsDikeProfile4 }, dikeProfiles); + } + + [Test] + public void GetSelectedDikeProfiles_WithDikeProfilesNoneSelected_ReturnEmptyDikeProfilesCollection() + { + // Setup + var ringtoetsGrassCoverErosionInwardsDikeProfile = CreateTestDikeProfile(); + var ringtoetsGrassCoverErosionInwardsDikeProfile2 = CreateTestDikeProfile(); + var ringtoetsGrassCoverErosionInwardsDikeProfile3 = CreateTestDikeProfile(); + var ringtoetsGrassCoverErosionInwardsDikeProfile4 = CreateTestDikeProfile(); + + var view = new GrassCoverErosionInwardsDikeProfileSelectionView(new[] + { + ringtoetsGrassCoverErosionInwardsDikeProfile, + ringtoetsGrassCoverErosionInwardsDikeProfile2, + ringtoetsGrassCoverErosionInwardsDikeProfile3, + ringtoetsGrassCoverErosionInwardsDikeProfile4 + }); + + ShowPipingCalculationsView(view); + + // Call + IEnumerable dikeProfiles = view.GetSelectedDikeProfiles(); + + // Assert + Assert.IsEmpty(dikeProfiles); + } + + [Test] + public void GetSelectedDikeProfiles_WithDikeProfilesAllSelected_ReturnAllDikeProfiles() + { + // Setup + var ringtoetsGrassCoverErosionInwardsDikeProfile = CreateTestDikeProfile(); + var ringtoetsGrassCoverErosionInwardsDikeProfile2 = CreateTestDikeProfile(); + var ringtoetsGrassCoverErosionInwardsDikeProfile3 = CreateTestDikeProfile(); + var ringtoetsGrassCoverErosionInwardsDikeProfile4 = CreateTestDikeProfile(); + + var dikeProfileCollection = new[] + { + ringtoetsGrassCoverErosionInwardsDikeProfile, + ringtoetsGrassCoverErosionInwardsDikeProfile2, + ringtoetsGrassCoverErosionInwardsDikeProfile3, + ringtoetsGrassCoverErosionInwardsDikeProfile4 + }; + var view = new GrassCoverErosionInwardsDikeProfileSelectionView(dikeProfileCollection); + + ShowPipingCalculationsView(view); + + var dikeProfileDataGrid = (DataGridView)new ControlTester("DikeProfileDataGrid").TheObject; + dikeProfileDataGrid.Rows[0].Cells[selectedColumnIndex].Value = true; + dikeProfileDataGrid.Rows[1].Cells[selectedColumnIndex].Value = true; + dikeProfileDataGrid.Rows[2].Cells[selectedColumnIndex].Value = true; + dikeProfileDataGrid.Rows[3].Cells[selectedColumnIndex].Value = true; + + // Call + IEnumerable dikeProfiles = view.GetSelectedDikeProfiles(); + + // Assert + CollectionAssert.AreEqual(dikeProfileCollection, dikeProfiles); + } + + [Test] + public void GetSelectedDikeProfiles_WithEmptyDikeProfiles_ReturnEmptyDikeProfilesCollection() + { + // Setup + var view = new GrassCoverErosionInwardsDikeProfileSelectionView(Enumerable.Empty()); + + ShowPipingCalculationsView(view); + + // Call + IEnumerable dikeProfiles = view.GetSelectedDikeProfiles(); + + // Assert + Assert.IsEmpty(dikeProfiles); + } + + private DikeProfile CreateTestDikeProfile() + { + return new DikeProfile(new Point2D(0,0)); + } + + private void ShowPipingCalculationsView(GrassCoverErosionInwardsDikeProfileSelectionView pipingCalculationsView) + { + testForm.Controls.Add(pipingCalculationsView); + testForm.Show(); + } + } +} \ No newline at end of file