Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/PropertyInfos/GrassCoverErosionOutwardsDesignWaterLevelLocationsContextPropertyInfoTest.cs =================================================================== diff -u -r2d006ceaaef282af15090fe5505ffeca58a291e0 -rc48f16746209f799f93c6fc79a5202a9e3fd419f --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/PropertyInfos/GrassCoverErosionOutwardsDesignWaterLevelLocationsContextPropertyInfoTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsContextPropertyInfoTest.cs) (revision 2d006ceaaef282af15090fe5505ffeca58a291e0) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/PropertyInfos/GrassCoverErosionOutwardsDesignWaterLevelLocationsContextPropertyInfoTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsContextPropertyInfoTest.cs) (revision c48f16746209f799f93c6fc79a5202a9e3fd419f) @@ -28,13 +28,29 @@ using Ringtoets.Common.Data.Hydraulics; using Ringtoets.GrassCoverErosionOutwards.Data; using Ringtoets.GrassCoverErosionOutwards.Forms.PresentationObjects; +using Ringtoets.GrassCoverErosionOutwards.Forms.PropertyClasses; namespace Ringtoets.GrassCoverErosionOutwards.Plugin.Test.PropertyInfos { [TestFixture] public class GrassCoverErosionOutwardsDesignWaterLevelLocationsContextPropertyInfoTest { [Test] + public void Initialized_Always_ExpectedPropertiesSet() + { + // Setup + using (var plugin = new GrassCoverErosionOutwardsPlugin()) + { + // Call + PropertyInfo info = GetInfo(plugin); + + // Assert + Assert.AreEqual(typeof(GrassCoverErosionOutwardsDesignWaterLevelLocationsContext), info.DataType); + Assert.AreEqual(typeof(GrassCoverErosionOutwardsDesignWaterLevelLocationsContextProperties), info.PropertyObjectType); + } + } + + [Test] public void CreateInstance_Always_SetsHydraulicBoundaryDatabaseAsData() { // Setup @@ -49,15 +65,21 @@ using (GrassCoverErosionOutwardsPlugin plugin = new GrassCoverErosionOutwardsPlugin()) { - PropertyInfo info = plugin.GetPropertyInfos().Single(pi => pi.DataType == typeof(GrassCoverErosionOutwardsDesignWaterLevelLocationsContext)); + PropertyInfo info = GetInfo(plugin); // Call var objectProperties = info.CreateInstance(context); // Assert + Assert.IsInstanceOf(objectProperties); Assert.AreSame(hydraulicBoundaryLocations, objectProperties.Data); } mockRepository.VerifyAll(); } + + private static PropertyInfo GetInfo(GrassCoverErosionOutwardsPlugin plugin) + { + return plugin.GetPropertyInfos().First(pi => pi.DataType == typeof(GrassCoverErosionOutwardsDesignWaterLevelLocationsContext)); + } } } \ No newline at end of file