Index: Core/Common/test/Core.Common.Gui.TestUtil.Test/GuiTestHelperTest.cs =================================================================== diff -u -r9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd -r51d8e744ffb2168ca56ca4b6260ad9c2590c0170 --- Core/Common/test/Core.Common.Gui.TestUtil.Test/GuiTestHelperTest.cs (.../GuiTestHelperTest.cs) (revision 9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd) +++ Core/Common/test/Core.Common.Gui.TestUtil.Test/GuiTestHelperTest.cs (.../GuiTestHelperTest.cs) (revision 51d8e744ffb2168ca56ca4b6260ad9c2590c0170) @@ -32,7 +32,7 @@ public void AssertPropertyInfoDefined_NullInfos_ThrowsAssertionException() { // Call - TestDelegate test = () => PluginTestHelper.AssertPropertyInfoDefined(null); + TestDelegate test = () => PluginTestHelper.AssertPropertyInfoDefined(null, typeof(object), typeof(object)); // Assert Assert.Throws(test); @@ -42,7 +42,7 @@ public void AssertPropertyInfoDefined_NoInfos_ThrowsAssertionException() { // Call - TestDelegate test = () => PluginTestHelper.AssertPropertyInfoDefined(new PropertyInfo[0]); + TestDelegate test = () => PluginTestHelper.AssertPropertyInfoDefined(new PropertyInfo[0], typeof(object), typeof(object)); // Assert Assert.Throws(test); @@ -52,10 +52,10 @@ public void AssertPropertyInfoDefined_NoMatchingInfos_ThrowsAssertionException() { // Call - TestDelegate test = () => PluginTestHelper.AssertPropertyInfoDefined(new PropertyInfo[] + TestDelegate test = () => PluginTestHelper.AssertPropertyInfoDefined(new PropertyInfo[] { new PropertyInfo() - }); + }, typeof(object), typeof(object)); // Assert Assert.Throws(test); @@ -65,11 +65,11 @@ public void AssertPropertyInfoDefined_MultipleInfosSingleMatching_ReturnsMatchingInfoFromList() { // Call - var foundInfo = PluginTestHelper.AssertPropertyInfoDefined(new [] + var foundInfo = PluginTestHelper.AssertPropertyInfoDefined(new [] { new PropertyInfo(), new PropertyInfo() - }); + }, typeof(int), typeof(IObjectProperties)); // Assert Assert.AreEqual(typeof(int), foundInfo.DataType); Index: Core/Common/test/Core.Common.Gui.TestUtil/Core.Common.Gui.TestUtil.csproj =================================================================== diff -u -r9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd -r51d8e744ffb2168ca56ca4b6260ad9c2590c0170 --- Core/Common/test/Core.Common.Gui.TestUtil/Core.Common.Gui.TestUtil.csproj (.../Core.Common.Gui.TestUtil.csproj) (revision 9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd) +++ Core/Common/test/Core.Common.Gui.TestUtil/Core.Common.Gui.TestUtil.csproj (.../Core.Common.Gui.TestUtil.csproj) (revision 51d8e744ffb2168ca56ca4b6260ad9c2590c0170) @@ -92,6 +92,10 @@ {30E4C2AE-719E-4D70-9FA9-668A9767FBFA} Core.Common.Gui + + {D749EE4C-CE50-4C17-BF01-9A953028C126} + Core.Common.TestUtil + Index: Core/Common/test/Core.Common.Gui.TestUtil/PluginTestHelper.cs =================================================================== diff -u -r9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd -r51d8e744ffb2168ca56ca4b6260ad9c2590c0170 --- Core/Common/test/Core.Common.Gui.TestUtil/PluginTestHelper.cs (.../PluginTestHelper.cs) (revision 9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd) +++ Core/Common/test/Core.Common.Gui.TestUtil/PluginTestHelper.cs (.../PluginTestHelper.cs) (revision 51d8e744ffb2168ca56ca4b6260ad9c2590c0170) @@ -19,9 +19,11 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System; using System.Collections.Generic; using System.Linq; using Core.Common.Gui.Plugin; +using Core.Common.TestUtil; using NUnit.Framework; namespace Core.Common.Gui.TestUtil @@ -33,24 +35,57 @@ { /// /// Asserts that the given contains a definition for the combination of - /// and . + /// and . /// - /// The type of the data object for which property info is defined. - /// The type of the object which shows the data object properties. /// Collection of definitions. + /// The type of the data object for which property info is defined. + /// The type of the object which shows the data object properties. /// The found property info. /// Thrown when the is null - /// or does not contain a defintion for the combination of and - /// . - public static PropertyInfo AssertPropertyInfoDefined(IEnumerable propertyInfos) + /// or does not contain a defintion for the combination of and + /// . + public static PropertyInfo AssertPropertyInfoDefined(IEnumerable propertyInfos, Type dataObjectType, Type propertyObjectType) { Assert.NotNull(propertyInfos); var propertyInfo = propertyInfos.FirstOrDefault( tni => - tni.DataType == typeof(TDataObject) && - tni.PropertyObjectType == typeof(TPropertyObject)); + tni.DataType == dataObjectType && + tni.PropertyObjectType == propertyObjectType); Assert.NotNull(propertyInfo); return propertyInfo; } + + /// + /// Asserts that a view info is defined in the collection of view infos given. + /// + /// The collection of to search in. + /// The type of the data which is passed to the . + /// The type of the data which is set on the view. + /// The type of the view. + /// The that was found within the collection of . + /// No can be found for type or the found + /// does not define the expected or . + public static ViewInfo AssertContainsViewInfo(IEnumerable viewInfos, Type dataType, Type viewDataType, Type viewType) + { + var viewInfo = viewInfos.SingleOrDefault(vi => vi.DataType == dataType); + Assert.NotNull(viewInfo, "Could not find viewInfo for the dataType {0}", dataType); + Assert.AreEqual(viewDataType, viewInfo.ViewDataType); + Assert.AreEqual(viewType, viewInfo.ViewType); + return viewInfo; + } + + /// + /// Asserts that a view info is defined in the collection of view infos given. + /// + /// The collection of to search in. + /// The type of the data which is passed to the and is set on the view. + /// The type of the view. + /// The that was found within the collection of . + /// No can be found for type or the found + /// does not define the expected . + public static ViewInfo AssertContainsViewInfo(IEnumerable viewInfos, Type dataType, Type viewType) + { + return AssertContainsViewInfo(viewInfos, dataType, dataType, viewType); + } } } \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj =================================================================== diff -u -r1e9a35d13ae40069200f8b1e6c1aa91bb54ce086 -r51d8e744ffb2168ca56ca4b6260ad9c2590c0170 --- Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj (.../Ringtoets.Common.Forms.csproj) (revision 1e9a35d13ae40069200f8b1e6c1aa91bb54ce086) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj (.../Ringtoets.Common.Forms.csproj) (revision 51d8e744ffb2168ca56ca4b6260ad9c2590c0170) @@ -91,6 +91,7 @@ HydraulicBoundaryLocationSelectionDialog.cs + UserControl Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/DesignWaterLevelLocationRow.cs =================================================================== diff -u --- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/DesignWaterLevelLocationRow.cs (revision 0) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/DesignWaterLevelLocationRow.cs (revision 51d8e744ffb2168ca56ca4b6260ad9c2590c0170) @@ -0,0 +1,55 @@ +// 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 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 General Public License for more details. +// +// You should have received a copy of the GNU 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 System; +using System.ComponentModel; +using Core.Common.Base.Data; +using Ringtoets.Common.Forms.TypeConverters; +using Ringtoets.HydraRing.Data; + +namespace Ringtoets.Common.Forms.Views +{ + /// + /// This class represents a row of of which the design water + /// level is presented. + /// + public class DesignWaterLevelLocationRow : HydraulicBoundaryLocationRow + { + /// + /// Creates a new instance of . + /// + /// The for this row. + /// Thrown when is null. + public DesignWaterLevelLocationRow(HydraulicBoundaryLocation hydraulicBoundaryLocation) : base(hydraulicBoundaryLocation) { } + + /// + /// Gets the . + /// + [TypeConverter(typeof(NoValueRoundedDoubleConverter))] + public RoundedDouble DesignWaterLevel + { + get + { + return HydraulicBoundaryLocation.DesignWaterLevel; + } + } + } +} \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/HydraulicBoundaryLocationsView.cs =================================================================== diff -u -r1e9a35d13ae40069200f8b1e6c1aa91bb54ce086 -r51d8e744ffb2168ca56ca4b6260ad9c2590c0170 --- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/HydraulicBoundaryLocationsView.cs (.../HydraulicBoundaryLocationsView.cs) (revision 1e9a35d13ae40069200f8b1e6c1aa91bb54ce086) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/HydraulicBoundaryLocationsView.cs (.../HydraulicBoundaryLocationsView.cs) (revision 51d8e744ffb2168ca56ca4b6260ad9c2590c0170) @@ -71,7 +71,7 @@ /// public IHydraulicBoundaryLocationCalculationGuiService CalculationGuiService { get; set; } - public object Data + public virtual object Data { get { Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/GrassCoverErosionInwardsPluginTest.cs =================================================================== diff -u -rd2b9feaf8aceaa9a96d0e6e19fd6fbbee8987ca6 -r51d8e744ffb2168ca56ca4b6260ad9c2590c0170 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/GrassCoverErosionInwardsPluginTest.cs (.../GrassCoverErosionInwardsPluginTest.cs) (revision d2b9feaf8aceaa9a96d0e6e19fd6fbbee8987ca6) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/GrassCoverErosionInwardsPluginTest.cs (.../GrassCoverErosionInwardsPluginTest.cs) (revision 51d8e744ffb2168ca56ca4b6260ad9c2590c0170) @@ -60,26 +60,34 @@ // assert Assert.AreEqual(4, propertyInfos.Length); - PropertyInfo failureMechanismContextProperties = PluginTestHelper.AssertPropertyInfoDefined - (propertyInfos); + PropertyInfo failureMechanismContextProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(GrassCoverErosionInwardsFailureMechanismContext), + typeof(GrassCoverErosionInwardsFailureMechanismContextProperties)); Assert.IsNull(failureMechanismContextProperties.AdditionalDataCheck); Assert.IsNull(failureMechanismContextProperties.GetObjectPropertiesData); Assert.IsNull(failureMechanismContextProperties.AfterCreate); - PropertyInfo dikeProfileProperties = PluginTestHelper.AssertPropertyInfoDefined - (propertyInfos); + PropertyInfo dikeProfileProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(DikeProfile), + typeof(DikeProfileProperties)); Assert.IsNull(dikeProfileProperties.AdditionalDataCheck); Assert.IsNull(dikeProfileProperties.GetObjectPropertiesData); Assert.IsNull(dikeProfileProperties.AfterCreate); - PropertyInfo inputContextProperties = PluginTestHelper.AssertPropertyInfoDefined - (propertyInfos); + PropertyInfo inputContextProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(GrassCoverErosionInwardsInputContext), + typeof(GrassCoverErosionInwardsInputContextProperties)); Assert.IsNull(inputContextProperties.AdditionalDataCheck); Assert.IsNull(inputContextProperties.GetObjectPropertiesData); Assert.IsNull(inputContextProperties.AfterCreate); - PropertyInfo outputProperties = PluginTestHelper.AssertPropertyInfoDefined - (propertyInfos); + PropertyInfo outputProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(GrassCoverErosionInwardsOutput), + typeof(GrassCoverErosionInwardsOutputProperties)); Assert.IsNull(outputProperties.AdditionalDataCheck); Assert.IsNull(outputProperties.GetObjectPropertiesData); Assert.IsNull(outputProperties.AfterCreate); Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -rdc0514a27cbec73b00a8465a1b15ab207dca4a84 -r51d8e744ffb2168ca56ca4b6260ad9c2590c0170 --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision dc0514a27cbec73b00a8465a1b15ab207dca4a84) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 51d8e744ffb2168ca56ca4b6260ad9c2590c0170) @@ -1,28 +1,7 @@ -// 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 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 General Public License for more details. -// -// You should have received a copy of the GNU 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. - -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // 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. @@ -195,9 +174,9 @@ /// /// Looks up a localized string similar to Waterstanden bij doorsnede-eis. /// - public static string GrassCoverErosionOutwardsWaterLevelLocationsContext_DisplayName { + public static string GrassCoverErosionOutwardsWaterLevelLocations_DisplayName { get { - return ResourceManager.GetString("GrassCoverErosionOutwardsWaterLevelLocationsContext_DisplayName", resourceCulture); + return ResourceManager.GetString("GrassCoverErosionOutwardsWaterLevelLocations_DisplayName", resourceCulture); } } Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Properties/Resources.resx =================================================================== diff -u -rdc0514a27cbec73b00a8465a1b15ab207dca4a84 -r51d8e744ffb2168ca56ca4b6260ad9c2590c0170 --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Properties/Resources.resx (.../Resources.resx) (revision dc0514a27cbec73b00a8465a1b15ab207dca4a84) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Properties/Resources.resx (.../Resources.resx) (revision 51d8e744ffb2168ca56ca4b6260ad9c2590c0170) @@ -126,7 +126,7 @@ Alle waterstanden bij doorsnede-eis berekenen. - + Waterstanden bij doorsnede-eis Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Ringtoets.GrassCoverErosionOutwards.Forms.csproj =================================================================== diff -u -r172f313c5afd8dafa9756d9d1600c78ea2e9fcf9 -r51d8e744ffb2168ca56ca4b6260ad9c2590c0170 --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Ringtoets.GrassCoverErosionOutwards.Forms.csproj (.../Ringtoets.GrassCoverErosionOutwards.Forms.csproj) (revision 172f313c5afd8dafa9756d9d1600c78ea2e9fcf9) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Ringtoets.GrassCoverErosionOutwards.Forms.csproj (.../Ringtoets.GrassCoverErosionOutwards.Forms.csproj) (revision 51d8e744ffb2168ca56ca4b6260ad9c2590c0170) @@ -72,6 +72,9 @@ + + UserControl + UserControl @@ -114,6 +117,10 @@ Ringtoets.Common.Forms False + + {d951d6da-fe83-4920-9fdb-63bf96480b54} + Ringtoets.Common.Service + {70F8CC9C-5BC8-4FB2-B201-EAE7FA8088C2} Ringtoets.HydraRing.Data Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsView.cs =================================================================== diff -u --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsView.cs (revision 0) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsView.cs (revision 51d8e744ffb2168ca56ca4b6260ad9c2590c0170) @@ -0,0 +1,95 @@ +// 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 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 General Public License for more details. +// +// You should have received a copy of the GNU 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 System.Collections.Generic; +using Core.Common.Base; +using Core.Common.Utils.Reflection; +using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Forms.Views; +using Ringtoets.GrassCoverErosionOutwards.Forms.PresentationObjects; +using Ringtoets.GrassCoverErosionOutwards.Forms.Properties; +using Ringtoets.GrassCoverErosionOutwards.Service.MessageProviders; +using Ringtoets.HydraRing.Data; + +namespace Ringtoets.GrassCoverErosionOutwards.Forms.Views +{ + public class GrassCoverErosionOutwardsDesignWaterLevelLocationsView : HydraulicBoundaryLocationsView + { + private readonly Observer hydraulicBoundaryLocationsObserver; + + public GrassCoverErosionOutwardsDesignWaterLevelLocationsView() + { + hydraulicBoundaryLocationsObserver = new Observer(() => dataGridViewControl.RefreshDataGridView()); + } + + public override object Data + { + get + { + return base.Data; + } + set + { + base.Data = value; + hydraulicBoundaryLocationsObserver.Observable = value as IObservable; + } + } + + protected override DesignWaterLevelLocationRow CreateNewRow(HydraulicBoundaryLocation location) + { + return new DesignWaterLevelLocationRow(location); + } + + public IAssessmentSection AssessmentSection { get; set; } + + protected override void InitializeDataGridView() + { + base.InitializeDataGridView(); + dataGridViewControl.AddTextBoxColumn(TypeUtils.GetMemberName(row => row.DesignWaterLevel), + Resources.GrassCoverErosionOutwardsHydraulicBoundaryLocation_DesignWaterLevel_DisplayName); + } + + protected override object CreateSelectedItemFromCurrentRow() + { + var currentRow = dataGridViewControl.CurrentRow; + + return currentRow != null ? + new GrassCoverErosionOutwardsDesignWaterLevelLocationContext((ObservableList) Data, ((HydraulicBoundaryLocationRow) currentRow.DataBoundItem).HydraulicBoundaryLocation) : + null; + } + + protected override void HandleCalculateSelectedLocations(IEnumerable locations) + { + if (AssessmentSection == null || AssessmentSection.HydraulicBoundaryDatabase == null) + { + return; + } + bool successfulCalculation = CalculationGuiService.CalculateDesignWaterLevels(AssessmentSection.HydraulicBoundaryDatabase.FilePath, + locations, + AssessmentSection.Id, + AssessmentSection.FailureMechanismContribution.Norm, new GrassCoverErosionOutwardsDesignWaterLevelCalculationMessageProvider()); + if (successfulCalculation) + { + ((IObservable)Data).NotifyObservers(); + } + } + } +} \ No newline at end of file Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs =================================================================== diff -u -rcf8ab943aff23228ca0af0eb686f86f941cb8fd0 -r51d8e744ffb2168ca56ca4b6260ad9c2590c0170 --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision cf8ab943aff23228ca0af0eb686f86f941cb8fd0) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision 51d8e744ffb2168ca56ca4b6260ad9c2590c0170) @@ -89,6 +89,8 @@ yield return new PropertyInfo(); yield return new PropertyInfo(); + + yield return new PropertyInfo(); } public override IEnumerable GetViewInfos() @@ -104,6 +106,19 @@ GetViewData = context => context.WrappedData, AfterCreate = (view, context) => view.FailureMechanism = context.FailureMechanism }; + + yield return new ViewInfo, GrassCoverErosionOutwardsDesignWaterLevelLocationsView> + { + GetViewName = (v, o) => RingtoetsGrassCoverErosionOutwardsFormsResources.GrassCoverErosionOutwardsWaterLevelLocations_DisplayName, + GetViewData = context => context.WrappedData, + Image = RingtoetsCommonFormsResources.GenericInputOutputIcon, + AfterCreate = (view, context) => + { + view.AssessmentSection = context.AssessmentSection; + view.ApplicationSelection = Gui; + view.CalculationGuiService = hydraulicBoundaryLocationCalculationGuiService; + } + }; } public override IEnumerable GetTreeNodeInfos() @@ -148,7 +163,7 @@ yield return new TreeNodeInfo { - Text = context => RingtoetsGrassCoverErosionOutwardsFormsResources.GrassCoverErosionOutwardsWaterLevelLocationsContext_DisplayName, + Text = context => RingtoetsGrassCoverErosionOutwardsFormsResources.GrassCoverErosionOutwardsWaterLevelLocations_DisplayName, Image = context => RingtoetsCommonFormsResources.GenericInputOutputIcon, ForeColor = context => context.AssessmentSection.HydraulicBoundaryDatabase == null ? Color.FromKnownColor(KnownColor.GrayText) : Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/GrassCoverErosionOutwardsPluginTest.cs =================================================================== diff -u -r172f313c5afd8dafa9756d9d1600c78ea2e9fcf9 -r51d8e744ffb2168ca56ca4b6260ad9c2590c0170 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/GrassCoverErosionOutwardsPluginTest.cs (.../GrassCoverErosionOutwardsPluginTest.cs) (revision 172f313c5afd8dafa9756d9d1600c78ea2e9fcf9) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/GrassCoverErosionOutwardsPluginTest.cs (.../GrassCoverErosionOutwardsPluginTest.cs) (revision 51d8e744ffb2168ca56ca4b6260ad9c2590c0170) @@ -32,6 +32,7 @@ using Ringtoets.GrassCoverErosionOutwards.Forms.PresentationObjects; using Ringtoets.GrassCoverErosionOutwards.Forms.PropertyClasses; using Ringtoets.GrassCoverErosionOutwards.Forms.Views; +using Ringtoets.HydraRing.Data; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; namespace Ringtoets.GrassCoverErosionOutwards.Plugin.Test @@ -60,12 +61,19 @@ ViewInfo[] viewInfos = plugin.GetViewInfos().ToArray(); // Assert - Assert.AreEqual(1, viewInfos.Length); + Assert.AreEqual(2, viewInfos.Length); - var grassCoverErosionOutwardsFailureMechanismSectionResultViewInfo = viewInfos.Single(vi => vi.DataType == typeof(FailureMechanismSectionResultContext)); - Assert.AreEqual(typeof(IEnumerable), grassCoverErosionOutwardsFailureMechanismSectionResultViewInfo.ViewDataType); - Assert.AreEqual(typeof(GrassCoverErosionOutwardsFailureMechanismResultView), grassCoverErosionOutwardsFailureMechanismSectionResultViewInfo.ViewType); - TestHelper.AssertImagesAreEqual(RingtoetsCommonFormsResources.FailureMechanismSectionResultIcon, grassCoverErosionOutwardsFailureMechanismSectionResultViewInfo.Image); + PluginTestHelper.AssertContainsViewInfo( + viewInfos, + typeof(FailureMechanismSectionResultContext), + typeof(IEnumerable), + typeof(GrassCoverErosionOutwardsFailureMechanismResultView)); + + PluginTestHelper.AssertContainsViewInfo( + viewInfos, + typeof(GrassCoverErosionOutwardsDesignWaterLevelLocationsContext), + typeof(IEnumerable), + typeof(GrassCoverErosionOutwardsDesignWaterLevelLocationsView)); } } @@ -103,37 +111,49 @@ PropertyInfo[] propertyInfos = plugin.GetPropertyInfos().ToArray(); // Assert - Assert.AreEqual(5, propertyInfos.Length); + Assert.AreEqual(6, propertyInfos.Length); - PropertyInfo grassCoverErosionOutwardsFailureMechanismProperties = PluginTestHelper.AssertPropertyInfoDefined< - GrassCoverErosionOutwardsFailureMechanismContext, - GrassCoverErosionOutwardsFailureMechanismProperties>(propertyInfos); + PropertyInfo grassCoverErosionOutwardsFailureMechanismProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(GrassCoverErosionOutwardsFailureMechanismContext), + typeof(GrassCoverErosionOutwardsFailureMechanismProperties)); Assert.IsNull(grassCoverErosionOutwardsFailureMechanismProperties.AdditionalDataCheck); Assert.IsNull(grassCoverErosionOutwardsFailureMechanismProperties.AfterCreate); - var waterLevelHydraulicBoundaryLocationsContextProperties = PluginTestHelper.AssertPropertyInfoDefined< - GrassCoverErosionOutwardsDesignWaterLevelLocationsContext, - GrassCoverErosionOutwardsDesignWaterLevelLocationsContextProperties>(propertyInfos); + var waterLevelHydraulicBoundaryLocationsContextProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(GrassCoverErosionOutwardsDesignWaterLevelLocationsContext), + typeof(GrassCoverErosionOutwardsDesignWaterLevelLocationsContextProperties)); Assert.IsNull(waterLevelHydraulicBoundaryLocationsContextProperties.AdditionalDataCheck); Assert.IsNull(waterLevelHydraulicBoundaryLocationsContextProperties.AfterCreate); - var waveHeightLocationContextProperties = PluginTestHelper.AssertPropertyInfoDefined< - GrassCoverErosionOutwardsWaveHeightLocationsContext, - GrassCoverErosionOutwardsWaveHeightLocationsContextProperties>(propertyInfos); + var waveHeightLocationContextProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(GrassCoverErosionOutwardsWaveHeightLocationsContext), + typeof(GrassCoverErosionOutwardsWaveHeightLocationsContextProperties)); Assert.IsNull(waveHeightLocationContextProperties.AdditionalDataCheck); Assert.IsNull(waveHeightLocationContextProperties.AfterCreate); - var grassCoverErosionWaveConditionsOutputProperties = PluginTestHelper.AssertPropertyInfoDefined< - GrassCoverErosionOutwardsWaveConditionsOutput, - GrassCoverErosionOutwardsWaveConditionsOutputProperties>(propertyInfos); + var grassCoverErosionWaveConditionsOutputProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(GrassCoverErosionOutwardsWaveConditionsOutput), + typeof(GrassCoverErosionOutwardsWaveConditionsOutputProperties)); Assert.IsNull(grassCoverErosionWaveConditionsOutputProperties.AdditionalDataCheck); Assert.IsNull(grassCoverErosionWaveConditionsOutputProperties.AfterCreate); - var grassCoverErosionWaveConditionsInputContextroperties = PluginTestHelper.AssertPropertyInfoDefined< - GrassCoverErosionOutwardsWaveConditionsInputContext, - GrassCoverErosionOutwardsWaveConditionsInputContextProperties>(propertyInfos); + var grassCoverErosionWaveConditionsInputContextroperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(GrassCoverErosionOutwardsWaveConditionsInputContext), + typeof(GrassCoverErosionOutwardsWaveConditionsInputContextProperties)); Assert.IsNull(grassCoverErosionWaveConditionsInputContextroperties.AdditionalDataCheck); Assert.IsNull(grassCoverErosionWaveConditionsInputContextroperties.AfterCreate); + + var grassCoverErosionDesignWaterLevelLocationContextProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(GrassCoverErosionOutwardsDesignWaterLevelLocationContext), + typeof(GrassCoverErosionOutwardsDesignWaterLevelLocationContextProperties)); + Assert.IsNull(grassCoverErosionDesignWaterLevelLocationContextProperties.AdditionalDataCheck); + Assert.IsNull(grassCoverErosionDesignWaterLevelLocationContextProperties.AfterCreate); } } Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test.csproj =================================================================== diff -u -r9f5fa34afb489eb0d46dab724e9d8121a31a04bb -r51d8e744ffb2168ca56ca4b6260ad9c2590c0170 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test.csproj (.../Ringtoets.GrassCoverErosionOutwards.Plugin.Test.csproj) (revision 9f5fa34afb489eb0d46dab724e9d8121a31a04bb) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test.csproj (.../Ringtoets.GrassCoverErosionOutwards.Plugin.Test.csproj) (revision 51d8e744ffb2168ca56ca4b6260ad9c2590c0170) @@ -57,6 +57,7 @@ + Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/ViewInfos/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewInfoTest.cs =================================================================== diff -u --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/ViewInfos/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewInfoTest.cs (revision 0) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/ViewInfos/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewInfoTest.cs (revision 51d8e744ffb2168ca56ca4b6260ad9c2590c0170) @@ -0,0 +1,92 @@ +// 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 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 General Public License for more details. +// +// You should have received a copy of the GNU 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 System; +using System.Collections.Generic; +using System.Linq; +using Core.Common.Gui.Plugin; +using NUnit.Framework; +using Ringtoets.GrassCoverErosionOutwards.Forms.PresentationObjects; +using Ringtoets.GrassCoverErosionOutwards.Forms.Views; +using Ringtoets.HydraRing.Data; + +namespace Ringtoets.GrassCoverErosionOutwards.Plugin.Test.ViewInfos +{ + [TestFixture] + public class GrassCoverErosionOutwardsDesignWaterLevelLocationsViewInfoTest : ViewInfoTest + { + protected override Type DataType + { + get + { + return typeof(GrassCoverErosionOutwardsDesignWaterLevelLocationsContext); + } + } + + protected override Type ViewDataType + { + get + { + return typeof(IEnumerable); + + } + } + + protected override PluginBase CreatePlugin() + { + return new GrassCoverErosionOutwardsPlugin(); + } + } + + public abstract class ViewInfoTest + { + private PluginBase plugin; + private ViewInfo Info { get; set; } + + protected abstract Type DataType { get; } + protected abstract Type ViewDataType { get; } + + [SetUp] + public void SetUp() + { + plugin = CreatePlugin(); + Info = plugin.GetViewInfos().FirstOrDefault(vi => vi.ViewType == typeof(TView)); + } + + [TearDown] + public void TearDown() + { + plugin.Dispose(); + } + + [TestCase] + public void Initialized_Always_DataTypeAndViewTypeAsExpected() + { + Assert.NotNull(Info, "Expected a viewInfo definition for views with type {0}.", typeof(TView)); + Assert.AreEqual(DataType, Info.DataType); + } + + protected virtual PluginBase CreatePlugin() + { + return null; + } + } +} \ No newline at end of file Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/HeightStructuresPluginTest.cs =================================================================== diff -u -r9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd -r51d8e744ffb2168ca56ca4b6260ad9c2590c0170 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/HeightStructuresPluginTest.cs (.../HeightStructuresPluginTest.cs) (revision 9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/HeightStructuresPluginTest.cs (.../HeightStructuresPluginTest.cs) (revision 51d8e744ffb2168ca56ca4b6260ad9c2590c0170) @@ -61,14 +61,18 @@ // assert Assert.AreEqual(2, propertyInfos.Length); - PropertyInfo failureMechanismContextProperties = PluginTestHelper.AssertPropertyInfoDefined - (propertyInfos); + PropertyInfo failureMechanismContextProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(HeightStructuresFailureMechanismContext), + typeof(HeightStructuresFailureMechanismContextProperties)); Assert.IsNull(failureMechanismContextProperties.AdditionalDataCheck); Assert.IsNull(failureMechanismContextProperties.GetObjectPropertiesData); Assert.IsNull(failureMechanismContextProperties.AfterCreate); - PropertyInfo heightStructuresInputContextProperties = PluginTestHelper.AssertPropertyInfoDefined - (propertyInfos); + PropertyInfo heightStructuresInputContextProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(HeightStructuresInputContext), + typeof(HeightStructuresInputContextProperties)); Assert.IsNull(heightStructuresInputContextProperties.AdditionalDataCheck); Assert.IsNull(heightStructuresInputContextProperties.GetObjectPropertiesData); Assert.IsNull(heightStructuresInputContextProperties.AfterCreate); Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Ringtoets.Integration.Forms.csproj =================================================================== diff -u -r1e9a35d13ae40069200f8b1e6c1aa91bb54ce086 -r51d8e744ffb2168ca56ca4b6260ad9c2590c0170 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Ringtoets.Integration.Forms.csproj (.../Ringtoets.Integration.Forms.csproj) (revision 1e9a35d13ae40069200f8b1e6c1aa91bb54ce086) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Ringtoets.Integration.Forms.csproj (.../Ringtoets.Integration.Forms.csproj) (revision 51d8e744ffb2168ca56ca4b6260ad9c2590c0170) @@ -91,7 +91,6 @@ FailureMechanismContributionView.cs - UserControl Fisheye: Tag 51d8e744ffb2168ca56ca4b6260ad9c2590c0170 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/DesignWaterLevelLocationRow.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsPluginTest.cs =================================================================== diff -u -r172f313c5afd8dafa9756d9d1600c78ea2e9fcf9 -r51d8e744ffb2168ca56ca4b6260ad9c2590c0170 --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsPluginTest.cs (.../RingtoetsPluginTest.cs) (revision 172f313c5afd8dafa9756d9d1600c78ea2e9fcf9) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsPluginTest.cs (.../RingtoetsPluginTest.cs) (revision 51d8e744ffb2168ca56ca4b6260ad9c2590c0170) @@ -203,74 +203,98 @@ // Assert Assert.AreEqual(12, propertyInfos.Length); - PropertyInfo ringtoetsProjectProperties = PluginTestHelper.AssertPropertyInfoDefined - (propertyInfos); + PropertyInfo ringtoetsProjectProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(IProject), + typeof(RingtoetsProjectProperties)); Assert.IsNull(ringtoetsProjectProperties.AdditionalDataCheck); Assert.IsNull(ringtoetsProjectProperties.GetObjectPropertiesData); Assert.IsNull(ringtoetsProjectProperties.AfterCreate); - PropertyInfo assessmentSectionProperties = PluginTestHelper.AssertPropertyInfoDefined - (propertyInfos); + PropertyInfo assessmentSectionProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(IAssessmentSection), + typeof(AssessmentSectionProperties)); Assert.IsNull(assessmentSectionProperties.AdditionalDataCheck); Assert.IsNull(assessmentSectionProperties.GetObjectPropertiesData); Assert.IsNull(assessmentSectionProperties.AfterCreate); - PropertyInfo hydraulicBoundaryDatabaseProperties = PluginTestHelper.AssertPropertyInfoDefined - (propertyInfos); + PropertyInfo hydraulicBoundaryDatabaseProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(HydraulicBoundaryDatabaseContext), + typeof(HydraulicBoundaryDatabaseProperties)); Assert.IsNull(hydraulicBoundaryDatabaseProperties.AdditionalDataCheck); Assert.IsNull(hydraulicBoundaryDatabaseProperties.GetObjectPropertiesData); Assert.IsNull(hydraulicBoundaryDatabaseProperties.AfterCreate); - PropertyInfo standAloneFailureMechanismProperties = PluginTestHelper.AssertPropertyInfoDefined - , StandAloneFailureMechanismContextProperties>(propertyInfos); + PropertyInfo standAloneFailureMechanismProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(FailureMechanismContext), + typeof(StandAloneFailureMechanismContextProperties)); Assert.IsNull(standAloneFailureMechanismProperties.AdditionalDataCheck); Assert.IsNull(standAloneFailureMechanismProperties.GetObjectPropertiesData); Assert.IsNull(standAloneFailureMechanismProperties.AfterCreate); - PropertyInfo calculationGroupProperties = PluginTestHelper.AssertPropertyInfoDefined - , CalculationGroupContextProperties>(propertyInfos); + PropertyInfo calculationGroupProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(ICalculationContext), + typeof(CalculationGroupContextProperties)); Assert.IsNull(calculationGroupProperties.AdditionalDataCheck); Assert.IsNull(calculationGroupProperties.GetObjectPropertiesData); Assert.IsNull(calculationGroupProperties.AfterCreate); - PropertyInfo calculationContextProperties = PluginTestHelper.AssertPropertyInfoDefined - , CalculationContextProperties>(propertyInfos); + PropertyInfo calculationContextProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(ICalculationContext), + typeof(CalculationContextProperties)); Assert.IsNull(calculationContextProperties.AdditionalDataCheck); Assert.IsNull(calculationContextProperties.GetObjectPropertiesData); Assert.IsNull(calculationContextProperties.AfterCreate); - PropertyInfo outputContextProperties = PluginTestHelper.AssertPropertyInfoDefined - (propertyInfos); + PropertyInfo outputContextProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(ProbabilityAssessmentOutput), + typeof(ProbabilityAssessmentOutputProperties)); Assert.IsNull(outputContextProperties.AdditionalDataCheck); Assert.IsNull(outputContextProperties.GetObjectPropertiesData); Assert.IsNull(outputContextProperties.AfterCreate); - PropertyInfo designWaterLevelLocationsContextProperties = PluginTestHelper.AssertPropertyInfoDefined - (propertyInfos); + PropertyInfo designWaterLevelLocationsContextProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(DesignWaterLevelLocationsContext), + typeof(DesignWaterLevelLocationsContextProperties)); Assert.IsNull(designWaterLevelLocationsContextProperties.AdditionalDataCheck); Assert.IsNotNull(designWaterLevelLocationsContextProperties.GetObjectPropertiesData); Assert.IsNull(designWaterLevelLocationsContextProperties.AfterCreate); - PropertyInfo designWaterLevelLocationContextProperties = PluginTestHelper.AssertPropertyInfoDefined - (propertyInfos); + PropertyInfo designWaterLevelLocationContextProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(DesignWaterLevelLocationContext), + typeof(DesignWaterLevelLocationContextProperties)); Assert.IsNull(designWaterLevelLocationContextProperties.AdditionalDataCheck); Assert.IsNull(designWaterLevelLocationContextProperties.GetObjectPropertiesData); Assert.IsNull(designWaterLevelLocationContextProperties.AfterCreate); - PropertyInfo waveHeightLocationsContextProperties = PluginTestHelper.AssertPropertyInfoDefined - (propertyInfos); + PropertyInfo waveHeightLocationsContextProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(WaveHeightLocationsContext), + typeof(WaveHeightLocationsContextProperties)); Assert.IsNull(waveHeightLocationsContextProperties.AdditionalDataCheck); Assert.IsNotNull(waveHeightLocationsContextProperties.GetObjectPropertiesData); Assert.IsNull(waveHeightLocationsContextProperties.AfterCreate); - PropertyInfo waveHeightLocationContextProperties = PluginTestHelper.AssertPropertyInfoDefined - (propertyInfos); + PropertyInfo waveHeightLocationContextProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(WaveHeightLocationContext), + typeof(WaveHeightLocationContextProperties)); Assert.IsNull(waveHeightLocationContextProperties.AdditionalDataCheck); Assert.IsNull(waveHeightLocationContextProperties.GetObjectPropertiesData); Assert.IsNull(waveHeightLocationContextProperties.AfterCreate); - PropertyInfo foreshoreProfileProperties = PluginTestHelper.AssertPropertyInfoDefined - (propertyInfos); + PropertyInfo foreshoreProfileProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(ForeshoreProfile), + typeof(ForeshoreProfileProperties)); Assert.IsNull(foreshoreProfileProperties.AdditionalDataCheck); Assert.IsNull(foreshoreProfileProperties.GetObjectPropertiesData); Assert.IsNull(foreshoreProfileProperties.AfterCreate); Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/PipingPluginTest.cs =================================================================== diff -u -rf05844909ef96f5e6ea721563a33d32e042ef5ce -r51d8e744ffb2168ca56ca4b6260ad9c2590c0170 --- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/PipingPluginTest.cs (.../PipingPluginTest.cs) (revision f05844909ef96f5e6ea721563a33d32e042ef5ce) +++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/PipingPluginTest.cs (.../PipingPluginTest.cs) (revision 51d8e744ffb2168ca56ca4b6260ad9c2590c0170) @@ -70,38 +70,50 @@ // assert Assert.AreEqual(6, propertyInfos.Length); - PropertyInfo pipingFailureMechanismContextProperties = PluginTestHelper.AssertPropertyInfoDefined - (propertyInfos); + PropertyInfo pipingFailureMechanismContextProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(PipingFailureMechanismContext), + typeof(PipingFailureMechanismContextProperties)); Assert.IsNull(pipingFailureMechanismContextProperties.AdditionalDataCheck); Assert.IsNull(pipingFailureMechanismContextProperties.GetObjectPropertiesData); Assert.IsNull(pipingFailureMechanismContextProperties.AfterCreate); - PropertyInfo pipingInputContextProperties = PluginTestHelper.AssertPropertyInfoDefined - (propertyInfos); + PropertyInfo pipingInputContextProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(PipingInputContext), + typeof(PipingInputContextProperties)); Assert.IsNull(pipingInputContextProperties.AdditionalDataCheck); Assert.IsNull(pipingInputContextProperties.GetObjectPropertiesData); Assert.IsNull(pipingInputContextProperties.AfterCreate); - PropertyInfo pipingOutputProperties = PluginTestHelper.AssertPropertyInfoDefined - (propertyInfos); + PropertyInfo pipingOutputProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(PipingSemiProbabilisticOutput), + typeof(PipingSemiProbabilisticOutputProperties)); Assert.IsNull(pipingOutputProperties.AdditionalDataCheck); Assert.IsNull(pipingOutputProperties.GetObjectPropertiesData); Assert.IsNull(pipingOutputProperties.AfterCreate); - PropertyInfo pipingSurfaceLineProperties = PluginTestHelper.AssertPropertyInfoDefined - (propertyInfos); + PropertyInfo pipingSurfaceLineProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(RingtoetsPipingSurfaceLine), + typeof(RingtoetsPipingSurfaceLineProperties)); Assert.IsNull(pipingSurfaceLineProperties.AdditionalDataCheck); Assert.IsNull(pipingSurfaceLineProperties.GetObjectPropertiesData); Assert.IsNull(pipingSurfaceLineProperties.AfterCreate); - PropertyInfo stochasticSoilModelProperties = PluginTestHelper.AssertPropertyInfoDefined - (propertyInfos); + PropertyInfo stochasticSoilModelProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(StochasticSoilModel), + typeof(StochasticSoilModelProperties)); Assert.IsNull(stochasticSoilModelProperties.AdditionalDataCheck); Assert.IsNull(stochasticSoilModelProperties.GetObjectPropertiesData); Assert.IsNull(stochasticSoilModelProperties.AfterCreate); - PropertyInfo stochasticSoilProfileProperties = PluginTestHelper.AssertPropertyInfoDefined - (propertyInfos); + PropertyInfo stochasticSoilProfileProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(StochasticSoilProfile), + typeof(StochasticSoilProfileProperties)); Assert.IsNull(stochasticSoilProfileProperties.AdditionalDataCheck); Assert.IsNull(stochasticSoilProfileProperties.GetObjectPropertiesData); Assert.IsNull(stochasticSoilProfileProperties.AfterCreate); Index: Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Plugin.Test/StabilityStoneCoverPluginTest.cs =================================================================== diff -u -r172f313c5afd8dafa9756d9d1600c78ea2e9fcf9 -r51d8e744ffb2168ca56ca4b6260ad9c2590c0170 --- Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Plugin.Test/StabilityStoneCoverPluginTest.cs (.../StabilityStoneCoverPluginTest.cs) (revision 172f313c5afd8dafa9756d9d1600c78ea2e9fcf9) +++ Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Plugin.Test/StabilityStoneCoverPluginTest.cs (.../StabilityStoneCoverPluginTest.cs) (revision 51d8e744ffb2168ca56ca4b6260ad9c2590c0170) @@ -50,19 +50,22 @@ // Assert Assert.AreEqual(3, propertyInfos.Length); - PropertyInfo failureMechanismProperties = PluginTestHelper.AssertPropertyInfoDefined< - StabilityStoneCoverFailureMechanismContext, - StabilityStoneCoverFailureMechanismProperties>(propertyInfos); + PropertyInfo failureMechanismProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(StabilityStoneCoverFailureMechanismContext), + typeof(StabilityStoneCoverFailureMechanismProperties)); Assert.IsNull(failureMechanismProperties.AdditionalDataCheck); Assert.IsNull(failureMechanismProperties.AfterCreate); - PropertyInfo waveConditionsOutputProperties = PluginTestHelper.AssertPropertyInfoDefined< - StabilityStoneCoverWaveConditionsOutput, - StabilityStoneCoverWaveConditionsOutputProperties>(propertyInfos); + PropertyInfo waveConditionsOutputProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(StabilityStoneCoverWaveConditionsOutput), + typeof(StabilityStoneCoverWaveConditionsOutputProperties)); Assert.IsNull(waveConditionsOutputProperties.AdditionalDataCheck); Assert.IsNull(waveConditionsOutputProperties.AfterCreate); - PropertyInfo waveConditionsInputContextProperties = PluginTestHelper.AssertPropertyInfoDefined< - StabilityStoneCoverWaveConditionsInputContext, - StabilityStoneCoverWaveConditionsInputContextProperties>(propertyInfos); + PropertyInfo waveConditionsInputContextProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(StabilityStoneCoverWaveConditionsInputContext), + typeof(StabilityStoneCoverWaveConditionsInputContextProperties)); Assert.IsNull(waveConditionsInputContextProperties.AdditionalDataCheck); Assert.IsNull(waveConditionsInputContextProperties.AfterCreate); } Index: Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test/WaveImpactAsphaltCoverPluginTest.cs =================================================================== diff -u -r172f313c5afd8dafa9756d9d1600c78ea2e9fcf9 -r51d8e744ffb2168ca56ca4b6260ad9c2590c0170 --- Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test/WaveImpactAsphaltCoverPluginTest.cs (.../WaveImpactAsphaltCoverPluginTest.cs) (revision 172f313c5afd8dafa9756d9d1600c78ea2e9fcf9) +++ Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test/WaveImpactAsphaltCoverPluginTest.cs (.../WaveImpactAsphaltCoverPluginTest.cs) (revision 51d8e744ffb2168ca56ca4b6260ad9c2590c0170) @@ -61,21 +61,25 @@ // Assert Assert.AreEqual(3, propertyInfos.Length); - PropertyInfo failureMechanismContextProperties = PluginTestHelper.AssertPropertyInfoDefined - (propertyInfos); + PropertyInfo failureMechanismContextProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(WaveImpactAsphaltCoverFailureMechanismContext), + typeof(WaveImpactAsphaltCoverFailureMechanismProperties)); Assert.IsNull(failureMechanismContextProperties.AdditionalDataCheck); Assert.IsNull(failureMechanismContextProperties.AfterCreate); - PropertyInfo waveImpactAsphaltCoverWaveConditionsOutputProperties = PluginTestHelper.AssertPropertyInfoDefined< - WaveImpactAsphaltCoverWaveConditionsOutput, - WaveImpactAsphaltCoverWaveConditionsOutputProperties>(propertyInfos); + PropertyInfo waveImpactAsphaltCoverWaveConditionsOutputProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(WaveImpactAsphaltCoverWaveConditionsOutput), + typeof(WaveImpactAsphaltCoverWaveConditionsOutputProperties)); Assert.IsNull(waveImpactAsphaltCoverWaveConditionsOutputProperties.AdditionalDataCheck); Assert.IsNull(waveImpactAsphaltCoverWaveConditionsOutputProperties.GetObjectPropertiesData); Assert.IsNull(waveImpactAsphaltCoverWaveConditionsOutputProperties.AfterCreate); - PropertyInfo waveConditionsInputContextProperties = PluginTestHelper.AssertPropertyInfoDefined< - WaveImpactAsphaltCoverWaveConditionsInputContext, - WaveImpactAsphaltCoverWaveConditionsInputContextProperties>(propertyInfos); + PropertyInfo waveConditionsInputContextProperties = PluginTestHelper.AssertPropertyInfoDefined( + propertyInfos, + typeof(WaveImpactAsphaltCoverWaveConditionsInputContext), + typeof(WaveImpactAsphaltCoverWaveConditionsInputContextProperties)); Assert.IsNull(waveConditionsInputContextProperties.AdditionalDataCheck); Assert.IsNull(waveConditionsInputContextProperties.GetObjectPropertiesData); Assert.IsNull(waveConditionsInputContextProperties.AfterCreate);