Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/StructuresInputBasePropertiesTest.cs =================================================================== diff -u -r603abf1f7f49b0ed6d179e7dd800a170048f477d -r89774b7d8b41c979aa51de68ccd318352c4199aa --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/StructuresInputBasePropertiesTest.cs (.../StructuresInputBasePropertiesTest.cs) (revision 603abf1f7f49b0ed6d179e7dd800a170048f477d) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/StructuresInputBasePropertiesTest.cs (.../StructuresInputBasePropertiesTest.cs) (revision 89774b7d8b41c979aa51de68ccd318352c4199aa) @@ -124,6 +124,35 @@ } [Test] + public void SelectedHydraulicBoundaryLocation_InputNoLocation_DoesNotThrowExceptionAndReturnsNull() + { + // Setup + var assessmentSectionStub = mockRepository.Stub(); + var failureMechanismStub = mockRepository.Stub(); + mockRepository.ReplayAll(); + + var calculation = new StructuresCalculation(); + var inputContext = new SimpleInputContext(calculation.InputParameters, + calculation, + failureMechanismStub, + assessmentSectionStub); + var properties = new SimpleStructuresInputProperties(new StructuresInputBaseProperties, IFailureMechanism>.ConstructionProperties()) + { + Data = inputContext + }; + + SelectableHydraulicBoundaryLocation selectedHydraulicBoundaryLocation = null; + + // Call + TestDelegate call = () => selectedHydraulicBoundaryLocation = properties.SelectedHydraulicBoundaryLocation; + + // Assert + Assert.DoesNotThrow(call); + Assert.IsNull(selectedHydraulicBoundaryLocation); + mockRepository.VerifyAll(); + } + + [Test] public void GetSelectableHydraulicBoundaryLocations_InputWithLocationsAndNoStructure_ReturnsLocationsSortedByName() { // Setup @@ -149,10 +178,7 @@ calculation, failureMechanismStub, assessmentSectionStub); - var properties = new SimpleStructuresInputProperties(new StructuresInputBaseProperties, - IFailureMechanism>.ConstructionProperties()) + var properties = new SimpleStructuresInputProperties(new StructuresInputBaseProperties, IFailureMechanism>.ConstructionProperties()) { Data = inputContext }; @@ -203,10 +229,7 @@ calculation, failureMechanismStub, assessmentSectionStub); - var properties = new SimpleStructuresInputProperties(new StructuresInputBaseProperties, - IFailureMechanism>.ConstructionProperties()) + var properties = new SimpleStructuresInputProperties(new StructuresInputBaseProperties, IFailureMechanism>.ConstructionProperties()) { Data = inputContext }; Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextPropertiesTest.cs =================================================================== diff -u -r603abf1f7f49b0ed6d179e7dd800a170048f477d -r89774b7d8b41c979aa51de68ccd318352c4199aa --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextPropertiesTest.cs (.../GrassCoverErosionInwardsInputContextPropertiesTest.cs) (revision 603abf1f7f49b0ed6d179e7dd800a170048f477d) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextPropertiesTest.cs (.../GrassCoverErosionInwardsInputContextPropertiesTest.cs) (revision 89774b7d8b41c979aa51de68ccd318352c4199aa) @@ -190,6 +190,36 @@ } [Test] + public void SelectedHydraulicBoundaryLocation_InputNoLocation_DoesNotThrowExceptionAndReturnsNull() + { + // Setup + var assessmentSectionStub = mockRepository.Stub(); + mockRepository.ReplayAll(); + + var calculationInput = new GrassCoverErosionInwardsInput(); + var calculation = new GrassCoverErosionInwardsCalculation(); + var failureMechanism = new GrassCoverErosionInwardsFailureMechanism(); + var inputContext = new GrassCoverErosionInwardsInputContext(calculationInput, + calculation, + failureMechanism, + assessmentSectionStub); + var properties = new GrassCoverErosionInwardsInputContextProperties + { + Data = inputContext + }; + + SelectableHydraulicBoundaryLocation selectedHydraulicBoundaryLocation = null; + + // Call + TestDelegate call = () => selectedHydraulicBoundaryLocation = properties.SelectedHydraulicBoundaryLocation; + + // Assert + Assert.DoesNotThrow(call); + Assert.IsNull(selectedHydraulicBoundaryLocation); + mockRepository.VerifyAll(); + } + + [Test] public void GetSelectableHydraulicBoundaryLocations_InputWithLocationsAndNoDikeProfile_ReturnsLocationsSortedByName() { // Setup Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs =================================================================== diff -u -r803fd4f1b6d8d94b9c60f6804d8a355fc77d0e7a -r89774b7d8b41c979aa51de68ccd318352c4199aa --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs (.../PipingInputContextPropertiesTest.cs) (revision 803fd4f1b6d8d94b9c60f6804d8a355fc77d0e7a) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs (.../PipingInputContextPropertiesTest.cs) (revision 89774b7d8b41c979aa51de68ccd318352c4199aa) @@ -1204,6 +1204,35 @@ } [Test] + public void SelectedHydraulicBoundaryLocation_InputNoLocation_DoesNotThrowExceptionAndReturnsNull() + { + // Setup + var mocks = new MockRepository(); + var assessmentSectionStub = mocks.Stub(); + mocks.ReplayAll(); + + var failureMechanism = new PipingFailureMechanism(); + var calculation = new PipingCalculationScenario(failureMechanism.GeneralInput); + var context = new PipingInputContext(calculation.InputParameters, calculation, + failureMechanism.SurfaceLines, failureMechanism.StochasticSoilModels, + failureMechanism, assessmentSectionStub); + var properties = new PipingInputContextProperties + { + Data = context + }; + + SelectableHydraulicBoundaryLocation selectedHydraulicBoundaryLocation = null; + + // Call + TestDelegate call = () => selectedHydraulicBoundaryLocation = properties.SelectedHydraulicBoundaryLocation; + + // Assert + Assert.DoesNotThrow(call); + Assert.IsNull(selectedHydraulicBoundaryLocation); + mocks.VerifyAll(); + } + + [Test] public void GetSelectableHydraulicBoundaryLocations_WithLocationsNoSurfaceLine_ReturnLocationsSortedByName() { // Setup Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputContextPropertiesTest.cs =================================================================== diff -u -r603abf1f7f49b0ed6d179e7dd800a170048f477d -r89774b7d8b41c979aa51de68ccd318352c4199aa --- Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputContextPropertiesTest.cs (.../WaveConditionsInputContextPropertiesTest.cs) (revision 603abf1f7f49b0ed6d179e7dd800a170048f477d) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputContextPropertiesTest.cs (.../WaveConditionsInputContextPropertiesTest.cs) (revision 89774b7d8b41c979aa51de68ccd318352c4199aa) @@ -252,6 +252,27 @@ } [Test] + public void SelectedHydraulicBoundaryLocation_InputNoLocation_DoesNotThrowExceptionAndReturnsNull() + { + var input = new WaveConditionsInput(); + var inputContext = new TestWaveConditionsInputContext(input, new ForeshoreProfile[0], new HydraulicBoundaryLocation[0]); + + var properties = new TestWaveConditionsInputContextProperties + { + Data = inputContext + }; + + SelectableHydraulicBoundaryLocation selectedHydraulicBoundaryLocation = null; + + // Call + TestDelegate call = () => selectedHydraulicBoundaryLocation = properties.SelectedHydraulicBoundaryLocation; + + // Assert + Assert.DoesNotThrow(call); + Assert.IsNull(selectedHydraulicBoundaryLocation); + } + + [Test] public void GetSelectableHydraulicBoundaryLocations_InputWithLocationsNoReferencePoint_ReturnsLocationsSortedByName() { // Setup