Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs =================================================================== diff -u -r2d014f7589947c4c9e34140b42687e496ee04c5f -rfee74e8fb98844af091f9b061d9470540dfdd6f0 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs (.../WaveHeightLocationsViewTest.cs) (revision 2d014f7589947c4c9e34140b42687e496ee04c5f) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs (.../WaveHeightLocationsViewTest.cs) (revision fee74e8fb98844af091f9b061d9470540dfdd6f0) @@ -31,6 +31,7 @@ using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Hydraulics; +using Ringtoets.Common.Data.IllustrationPoints; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Data.TestUtil.IllustrationPoints; using Ringtoets.Common.Forms.GuiServices; @@ -385,7 +386,7 @@ } [Test] - public void WaveHeightlLocationsView_HydraulicBoundaryDatabaseNotifyObservers_UpdateIllustrationPointsControlData() + public void WaveHeightLocationsView_HydraulicBoundaryDatabaseNotifyObservers_UpdateIllustrationPointsControlData() { // Setup WaveHeightLocationsView view = ShowFullyConfiguredWaveHeightLocationsView(); @@ -400,17 +401,39 @@ Assert.IsNull(illustrationPointsControl.Data); var output = new TestHydraulicBoundaryLocationOutput(1); - var result = new TestGeneralResultSubMechanismIllustrationPoint(); - output.SetIllustrationPoints(result); + var topLevelIllustrationPoints = new[] + { + new TopLevelSubMechanismIllustrationPoint(WindDirectionTestFactory.CreateTestWindDirection(), + "Regular", + new TestSubMechanismIllustrationPoint()) + }; + var generalResult = new TestGeneralResultSubMechanismIllustrationPoint(topLevelIllustrationPoints); + output.SetIllustrationPoints(generalResult); // Call view.AssessmentSection.HydraulicBoundaryDatabase.Locations[3].WaveHeightCalculation.Output = output; view.AssessmentSection.HydraulicBoundaryDatabase.NotifyObservers(); // Assert - Assert.AreSame(result, illustrationPointsControl.Data); + IEnumerable expectedControlItems = CreateControlItems(generalResult); + CollectionAssert.AreEqual(expectedControlItems, illustrationPointsControl.Data, new IllustrationPointControlItemComparer()); } + private static IEnumerable CreateControlItems( + GeneralResultSubMechanismIllustrationPoint generalResult) + { + return generalResult.TopLevelSubMechanismIllustrationPoints + .Select(topLevelIllustrationPoint => + { + SubMechanismIllustrationPoint illustrationPoint = topLevelIllustrationPoint.SubMechanismIllustrationPoint; + return new IllustrationPointControlItem(topLevelIllustrationPoint, + topLevelIllustrationPoint.WindDirection.Name, + topLevelIllustrationPoint.ClosingSituation, + illustrationPoint.Stochasts, + illustrationPoint.Beta); + }); + } + private WaveHeightLocationsView ShowWaveHeightLocationsView(IAssessmentSection assessmentSection) { var view = new WaveHeightLocationsView(assessmentSection);