Index: Core/Components/test/Core.Components.Charting.Test/Data/ChartDataTest.cs =================================================================== diff -u -red96d38a758365e4c0f117def83a2926c589c18a -rca77db5948e6c622ea1fb3092917341ba1234711 --- Core/Components/test/Core.Components.Charting.Test/Data/ChartDataTest.cs (.../ChartDataTest.cs) (revision ed96d38a758365e4c0f117def83a2926c589c18a) +++ Core/Components/test/Core.Components.Charting.Test/Data/ChartDataTest.cs (.../ChartDataTest.cs) (revision ca77db5948e6c622ea1fb3092917341ba1234711) @@ -62,7 +62,7 @@ [Test] public void Name_SetName_ReturnsNewName() { - // setup + // Setup var name = "Some name"; var newName = "Something"; var data = new TestChartData(name); Index: Core/Components/test/Core.Components.Gis.Test/Data/MapDataTest.cs =================================================================== diff -u -r09a80719dc9424b9c7e092b3ad9b0686b16676ae -rca77db5948e6c622ea1fb3092917341ba1234711 --- Core/Components/test/Core.Components.Gis.Test/Data/MapDataTest.cs (.../MapDataTest.cs) (revision 09a80719dc9424b9c7e092b3ad9b0686b16676ae) +++ Core/Components/test/Core.Components.Gis.Test/Data/MapDataTest.cs (.../MapDataTest.cs) (revision ca77db5948e6c622ea1fb3092917341ba1234711) @@ -62,7 +62,7 @@ [Test] public void Name_SetName_ReturnsNewName() { - // setup + // Setup var name = "Some name"; var newName = "Something"; var data = new MapDataChild(name); Index: Core/Plugins/src/Core.Plugins.Map/Core.Plugins.Map.csproj =================================================================== diff -u -rcbb68632c994ef71c5fd4a2b3a8749a207553679 -rca77db5948e6c622ea1fb3092917341ba1234711 --- Core/Plugins/src/Core.Plugins.Map/Core.Plugins.Map.csproj (.../Core.Plugins.Map.csproj) (revision cbb68632c994ef71c5fd4a2b3a8749a207553679) +++ Core/Plugins/src/Core.Plugins.Map/Core.Plugins.Map.csproj (.../Core.Plugins.Map.csproj) (revision ca77db5948e6c622ea1fb3092917341ba1234711) @@ -80,7 +80,9 @@ True Resources.resx + + Index: Core/Plugins/src/Core.Plugins.Map/MapPlugin.cs =================================================================== diff -u -rcbb68632c994ef71c5fd4a2b3a8749a207553679 -rca77db5948e6c622ea1fb3092917341ba1234711 --- Core/Plugins/src/Core.Plugins.Map/MapPlugin.cs (.../MapPlugin.cs) (revision cbb68632c994ef71c5fd4a2b3a8749a207553679) +++ Core/Plugins/src/Core.Plugins.Map/MapPlugin.cs (.../MapPlugin.cs) (revision ca77db5948e6c622ea1fb3092917341ba1234711) @@ -62,6 +62,8 @@ public override IEnumerable GetPropertyInfos() { yield return new PropertyInfo(); + yield return new PropertyInfo(); + yield return new PropertyInfo(); } public override void Dispose() Index: Core/Plugins/src/Core.Plugins.Map/Properties/Resources.Designer.cs =================================================================== diff -u -rd16986d8086bbf899b59cd2db438f9522d5dd290 -rca77db5948e6c622ea1fb3092917341ba1234711 --- Core/Plugins/src/Core.Plugins.Map/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision d16986d8086bbf899b59cd2db438f9522d5dd290) +++ Core/Plugins/src/Core.Plugins.Map/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision ca77db5948e6c622ea1fb3092917341ba1234711) @@ -22,7 +22,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.17929 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -165,6 +165,51 @@ } /// + /// Looks up a localized string similar to Type van de data dat wordt getoond op de kaartlaag.. + /// + public static string MapData_Type_Description { + get { + return ResourceManager.GetString("MapData_Type_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Type. + /// + public static string MapData_Type_DisplayName { + get { + return ResourceManager.GetString("MapData_Type_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Lijnen. + /// + public static string MapData_Type_Lines { + get { + return ResourceManager.GetString("MapData_Type_Lines", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Punten. + /// + public static string MapData_Type_Points { + get { + return ResourceManager.GetString("MapData_Type_Points", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Polygonen. + /// + public static string MapData_Type_Polygons { + get { + return ResourceManager.GetString("MapData_Type_Polygons", resourceCulture); + } + } + + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// public static System.Drawing.Bitmap MapIcon { Index: Core/Plugins/src/Core.Plugins.Map/Properties/Resources.resx =================================================================== diff -u -rd16986d8086bbf899b59cd2db438f9522d5dd290 -rca77db5948e6c622ea1fb3092917341ba1234711 --- Core/Plugins/src/Core.Plugins.Map/Properties/Resources.resx (.../Resources.resx) (revision d16986d8086bbf899b59cd2db438f9522d5dd290) +++ Core/Plugins/src/Core.Plugins.Map/Properties/Resources.resx (.../Resources.resx) (revision ca77db5948e6c622ea1fb3092917341ba1234711) @@ -229,4 +229,19 @@ Weergeven + + Type van de data dat wordt getoond op de kaartlaag. + + + Type + + + Lijnen + + + Punten + + + Polygonen + \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.Map/PropertyClasses/MapLineDataProperties.cs =================================================================== diff -u --- Core/Plugins/src/Core.Plugins.Map/PropertyClasses/MapLineDataProperties.cs (revision 0) +++ Core/Plugins/src/Core.Plugins.Map/PropertyClasses/MapLineDataProperties.cs (revision ca77db5948e6c622ea1fb3092917341ba1234711) @@ -0,0 +1,62 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using Core.Common.Gui.Attributes; +using Core.Common.Gui.PropertyBag; +using Core.Common.Utils.Attributes; +using Core.Components.Gis.Data; +using Core.Plugins.Map.Properties; + +namespace Core.Plugins.Map.PropertyClasses +{ + /// + /// ViewModel of for properties panel. + /// + public class MapLineDataProperties : ObjectProperties + { + private const int namePropertyIndex = 1; + private const int typePropertyIndex = 2; + + [PropertyOrder(namePropertyIndex)] + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "MapData_Name_DisplayName")] + [ResourcesDescription(typeof(Resources), "MapData_Name_Description")] + public string Name + { + get + { + return data.Name; + } + } + + [PropertyOrder(typePropertyIndex)] + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "MapData_Type_DisplayName")] + [ResourcesDescription(typeof(Resources), "MapData_Type_Description")] + public string Type + { + get + { + return Resources.MapData_Type_Lines; + } + } + } +} \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.Map/PropertyClasses/MapPolygonDataProperties.cs =================================================================== diff -u --- Core/Plugins/src/Core.Plugins.Map/PropertyClasses/MapPolygonDataProperties.cs (revision 0) +++ Core/Plugins/src/Core.Plugins.Map/PropertyClasses/MapPolygonDataProperties.cs (revision ca77db5948e6c622ea1fb3092917341ba1234711) @@ -0,0 +1,62 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using Core.Common.Gui.Attributes; +using Core.Common.Gui.PropertyBag; +using Core.Common.Utils.Attributes; +using Core.Components.Gis.Data; +using Core.Plugins.Map.Properties; + +namespace Core.Plugins.Map.PropertyClasses +{ + /// + /// ViewModel of for properties panel. + /// + public class MapPolygonDataProperties : ObjectProperties + { + private const int namePropertyIndex = 1; + private const int typePropertyIndex = 2; + + [PropertyOrder(namePropertyIndex)] + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "MapData_Name_DisplayName")] + [ResourcesDescription(typeof(Resources), "MapData_Name_Description")] + public string Name + { + get + { + return data.Name; + } + } + + [PropertyOrder(typePropertyIndex)] + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "MapData_Type_DisplayName")] + [ResourcesDescription(typeof(Resources), "MapData_Type_Description")] + public string Type + { + get + { + return Resources.MapData_Type_Polygons; + } + } + } +} \ No newline at end of file Index: Core/Plugins/test/Core.Plugins.Map.Test/MapPluginTest.cs =================================================================== diff -u -r84e9dd40942da514fb2f2cb270001e81857b1be4 -rca77db5948e6c622ea1fb3092917341ba1234711 --- Core/Plugins/test/Core.Plugins.Map.Test/MapPluginTest.cs (.../MapPluginTest.cs) (revision 84e9dd40942da514fb2f2cb270001e81857b1be4) +++ Core/Plugins/test/Core.Plugins.Map.Test/MapPluginTest.cs (.../MapPluginTest.cs) (revision ca77db5948e6c622ea1fb3092917341ba1234711) @@ -20,6 +20,7 @@ // All rights reserved. using System; +using System.Linq; using System.Windows; using System.Windows.Threading; using Core.Common.Base.Data; @@ -30,8 +31,11 @@ using Core.Common.Gui.Forms.ViewHost; using Core.Common.Gui.Plugin; using Core.Common.Gui.Settings; +using Core.Common.Gui.TestUtil; using Core.Components.DotSpatial.Forms; +using Core.Components.Gis.Data; using Core.Plugins.Map.Legend; +using Core.Plugins.Map.PropertyClasses; using NUnit.Framework; using Rhino.Mocks; @@ -106,6 +110,44 @@ } [Test] + public void GetPropertyInfos_ReturnsSupportedPropertyClassesWithExpectedValues() + { + // Setup + using (var plugin = new MapPlugin()) + { + // Call + PropertyInfo[] propertyInfos = plugin.GetPropertyInfos().ToArray(); + + // Assert + Assert.AreEqual(3, propertyInfos.Length); + + PropertyInfo mapPointDataPropertyInfo = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(MapPointData), + typeof(MapPointDataProperties)); + Assert.IsNull(mapPointDataPropertyInfo.AdditionalDataCheck); + Assert.IsNull(mapPointDataPropertyInfo.GetObjectPropertiesData); + Assert.IsNull(mapPointDataPropertyInfo.AfterCreate); + + PropertyInfo mapLineDataPropertyInfo = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(MapLineData), + typeof(MapLineDataProperties)); + Assert.IsNull(mapLineDataPropertyInfo.AdditionalDataCheck); + Assert.IsNull(mapLineDataPropertyInfo.GetObjectPropertiesData); + Assert.IsNull(mapLineDataPropertyInfo.AfterCreate); + + PropertyInfo mapPolygonDataPropertyInfo = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(MapPolygonData), + typeof(MapPolygonDataProperties)); + Assert.IsNull(mapPolygonDataPropertyInfo.AdditionalDataCheck); + Assert.IsNull(mapPolygonDataPropertyInfo.GetObjectPropertiesData); + Assert.IsNull(mapPolygonDataPropertyInfo.AfterCreate); + } + } + + [Test] [RequiresSTA] [TestCase(true)] [TestCase(false)] Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/ClosingStructuresPluginTest.cs =================================================================== diff -u -rae5c573fb82f4b30350f63cb6f202ae99275f4ff -rca77db5948e6c622ea1fb3092917341ba1234711 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/ClosingStructuresPluginTest.cs (.../ClosingStructuresPluginTest.cs) (revision ae5c573fb82f4b30350f63cb6f202ae99275f4ff) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/ClosingStructuresPluginTest.cs (.../ClosingStructuresPluginTest.cs) (revision ca77db5948e6c622ea1fb3092917341ba1234711) @@ -54,17 +54,17 @@ [Test] public void GetPropertyInfos_ReturnsSupportedPropertyClassesWithExpectedValues() { - // setup + // Setup var mocks = new MockRepository(); var assessmentSection = mocks.Stub(); mocks.ReplayAll(); using (var plugin = new ClosingStructuresPlugin()) { - // call + // Call PropertyInfo[] propertyInfos = plugin.GetPropertyInfos().ToArray(); - // assert + // Assert Assert.AreEqual(3, propertyInfos.Length); var failureMechanism = new ClosingStructuresFailureMechanism(); Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/GrassCoverErosionOutwardsPluginTest.cs =================================================================== diff -u -rf718135c08ce7b90cc0eaf40bfb83c9af48a1776 -rca77db5948e6c622ea1fb3092917341ba1234711 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/GrassCoverErosionOutwardsPluginTest.cs (.../GrassCoverErosionOutwardsPluginTest.cs) (revision f718135c08ce7b90cc0eaf40bfb83c9af48a1776) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/GrassCoverErosionOutwardsPluginTest.cs (.../GrassCoverErosionOutwardsPluginTest.cs) (revision ca77db5948e6c622ea1fb3092917341ba1234711) @@ -42,10 +42,10 @@ [Test] public void DefaultConstructor_ExpectedValues() { - // call + // Call using (var plugin = new GrassCoverErosionOutwardsPlugin()) { - // assert + // Assert Assert.IsInstanceOf(plugin); } } Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/HeightStructuresPluginTest.cs =================================================================== diff -u -rf724e2a23cc180381b736c4da1318d87398e5758 -rca77db5948e6c622ea1fb3092917341ba1234711 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/HeightStructuresPluginTest.cs (.../HeightStructuresPluginTest.cs) (revision f724e2a23cc180381b736c4da1318d87398e5758) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/HeightStructuresPluginTest.cs (.../HeightStructuresPluginTest.cs) (revision ca77db5948e6c622ea1fb3092917341ba1234711) @@ -55,17 +55,17 @@ [Test] public void GetPropertyInfos_ReturnsSupportedPropertyClassesWithExpectedValues() { - // setup + // Setup var mocks = new MockRepository(); var assessmentSection = mocks.Stub(); mocks.ReplayAll(); using (var plugin = new HeightStructuresPlugin()) { - // call + // Call PropertyInfo[] propertyInfos = plugin.GetPropertyInfos().ToArray(); - // assert + // Assert Assert.AreEqual(3, propertyInfos.Length); var failureMechanism = new HeightStructuresFailureMechanism(); Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/PipingPluginTest.cs =================================================================== diff -u -r5efc7525e9ab2125a64b2e9b207b064c643f6514 -rca77db5948e6c622ea1fb3092917341ba1234711 --- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/PipingPluginTest.cs (.../PipingPluginTest.cs) (revision 5efc7525e9ab2125a64b2e9b207b064c643f6514) +++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/PipingPluginTest.cs (.../PipingPluginTest.cs) (revision ca77db5948e6c622ea1fb3092917341ba1234711) @@ -46,10 +46,10 @@ [STAThread] // For creation of XAML UI component (PipingRibbon) public void DefaultConstructor_ExpectedValues() { - // call + // Call using (var plugin = new PipingPlugin()) { - // assert + // Assert Assert.IsInstanceOf(plugin); Assert.IsInstanceOf(plugin.RibbonCommandHandler); } @@ -58,16 +58,16 @@ [Test] public void GetPropertyInfos_ReturnsSupportedPropertyClassesWithExpectedValues() { - // setup + // Setup using (var plugin = new PipingPlugin()) { - // call + // Call var mocks = new MockRepository(); mocks.ReplayAll(); PropertyInfo[] propertyInfos = plugin.GetPropertyInfos().ToArray(); - // assert + // Assert Assert.AreEqual(6, propertyInfos.Length); PropertyInfo pipingFailureMechanismContextProperties = PluginTestHelper.AssertPropertyInfoDefined( @@ -125,7 +125,7 @@ [Test] public void GetTreeNodeInfos_ReturnsSupportedTreeNodeInfos() { - // setup + // Setup var mocks = new MockRepository(); var guiStub = mocks.Stub(); guiStub.Stub(g => g.ApplicationCommands).Return(mocks.Stub()); @@ -136,10 +136,10 @@ Gui = guiStub }) { - // call + // Call TreeNodeInfo[] treeNodeInfos = plugin.GetTreeNodeInfos().ToArray(); - // assert + // Assert Assert.AreEqual(13, treeNodeInfos.Length); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(RingtoetsPipingSurfaceLinesContext))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(RingtoetsPipingSurfaceLine))); Index: Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test/WaveImpactAsphaltCoverPluginTest.cs =================================================================== diff -u -rf718135c08ce7b90cc0eaf40bfb83c9af48a1776 -rca77db5948e6c622ea1fb3092917341ba1234711 --- Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test/WaveImpactAsphaltCoverPluginTest.cs (.../WaveImpactAsphaltCoverPluginTest.cs) (revision f718135c08ce7b90cc0eaf40bfb83c9af48a1776) +++ Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test/WaveImpactAsphaltCoverPluginTest.cs (.../WaveImpactAsphaltCoverPluginTest.cs) (revision ca77db5948e6c622ea1fb3092917341ba1234711) @@ -24,7 +24,6 @@ using Core.Common.Controls.TreeView; using Core.Common.Gui.Plugin; using Core.Common.Gui.TestUtil; -using Core.Common.TestUtil; using NUnit.Framework; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.WaveImpactAsphaltCover.Data; @@ -41,10 +40,10 @@ [Test] public void DefaultConstructor_ExpectedValues() { - // call + // Call using (var plugin = new WaveImpactAsphaltCoverPlugin()) { - // assert + // Assert Assert.IsInstanceOf(plugin); } }