/// <summary> /// Creates a new instance of <see cref="AssemblyResultPerSectionMapView"/>. /// </summary> /// <param name="assessmentSection">The <see cref="AssessmentSection"/> to create the view for.</param> /// <exception cref="ArgumentNullException">Thrown when <paramref name="assessmentSection"/> /// is <c>null</c>.</exception> public AssemblyResultPerSectionMapView(AssessmentSection assessmentSection) { if (assessmentSection == null) { throw new ArgumentNullException(nameof(assessmentSection)); } InitializeComponent(); AssessmentSection = assessmentSection; CreateObservers(); var mapDataCollection = new MapDataCollection(Resources.AssemblyResultPerSectionMapView_DisplayName); assemblyResultsMapData = CombinedSectionAssemblyMapDataFactory.CreateCombinedSectionAssemblyResultMapData(); referenceLineMapData = RiskeerMapDataFactory.CreateReferenceLineMapData(); hydraulicBoundaryLocationsMapLayer = new HydraulicBoundaryLocationsMapLayer(assessmentSection); mapDataCollection.Add(referenceLineMapData); mapDataCollection.Add(hydraulicBoundaryLocationsMapLayer.MapData); mapDataCollection.Add(assemblyResultsMapData); SetAllMapDataFeatures(); riskeerMapControl.SetAllData(mapDataCollection, assessmentSection.BackgroundData); }
public void CreateCombinedSectionAssemblyResultMapData_ReturnsEmptyMapLineDataWithExpectedStyling() { // Call MapLineData data = CombinedSectionAssemblyMapDataFactory.CreateCombinedSectionAssemblyResultMapData(); // Assert Assert.AreEqual("Slechtste duidingsklasse per deelvak", data.Name); Assert.IsTrue(data.ShowLabels); CollectionAssert.IsEmpty(data.Features); LineStyle lineStyle = data.Style; Assert.AreEqual(Color.Empty, lineStyle.Color); Assert.AreEqual(6, lineStyle.Width); Assert.AreEqual(LineDashStyle.Solid, lineStyle.DashStyle); Assert.AreEqual("Duidingsklasse", data.SelectedMetaDataAttribute); MapThemeTestHelper.AssertFailureMechanismSectionAssemblyGroupMapTheme(data.Theme); }