Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/AssessmentSectionViewTest.cs =================================================================== diff -u -r3722e29f53ce7db0f11fb184cdc2a76d33078cf2 -r737cd3675ab5bc1b6400e4a0b86ebd543eaee650 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/AssessmentSectionViewTest.cs (.../AssessmentSectionViewTest.cs) (revision 3722e29f53ce7db0f11fb184cdc2a76d33078cf2) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/AssessmentSectionViewTest.cs (.../AssessmentSectionViewTest.cs) (revision 737cd3675ab5bc1b6400e4a0b86ebd543eaee650) @@ -23,6 +23,7 @@ using System.Linq; using System.Windows.Forms; using Core.Common.Base.Geometry; +using Core.Components.DotSpatial.TestUtil; using Core.Components.Gis.Data; using Core.Components.Gis.Forms; using NUnit.Framework; @@ -100,6 +101,28 @@ } [Test] + public void Data_AssessmentSectionWithBackgroundMapData_BackgroundMapDataSet() + { + // Setup + WmtsMapData backgroundMapData = WmtsMapData.CreateDefaultPdokMapData(); + + IAssessmentSection assessmentSection = new ObservableTestAssessmentSectionStub + { + BackgroundMapData = backgroundMapData + }; + + using (new UseCustomTileSourceFactoryConfig(backgroundMapData)) + using (var view = new AssessmentSectionView()) + { + // Call + view.Data = assessmentSection; + + // Assert + Assert.AreSame(backgroundMapData, view.Map.BackgroundMapData); + } + } + + [Test] public void Data_SetToNull_MapDataCleared() { // Setup @@ -117,6 +140,7 @@ // Assert Assert.IsNull(view.Data); Assert.IsNull(view.Map.Data); + Assert.IsNull(view.Map.BackgroundMapData); } }