Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/DikeProfilePropertiesTest.cs =================================================================== diff -u -r679173a47bec16eebaf4be2ddedf42de87788456 -r7d6e4c28a40fb056c182d0691dda2b2e88aeebfd --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/DikeProfilePropertiesTest.cs (.../DikeProfilePropertiesTest.cs) (revision 679173a47bec16eebaf4be2ddedf42de87788456) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/DikeProfilePropertiesTest.cs (.../DikeProfilePropertiesTest.cs) (revision 7d6e4c28a40fb056c182d0691dda2b2e88aeebfd) @@ -22,6 +22,7 @@ using System.ComponentModel; using Core.Common.Base.Geometry; using Core.Common.Gui.PropertyBag; +using Core.Common.TestUtil; using NUnit.Framework; using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.GrassCoverErosionInwards.Forms.PropertyClasses; @@ -93,9 +94,8 @@ }; // Assert - var dynamicPropertyBag = new DynamicPropertyBag(properties); - PropertyDescriptorCollection dynamicProperties = dynamicPropertyBag.GetProperties(); - Assert.AreEqual(8, dynamicProperties.Count); + PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); + Assert.AreEqual(7, dynamicProperties.Count); PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; Assert.IsNotNull(nameProperty); @@ -105,49 +105,49 @@ Assert.AreEqual("Naam van het dijkprofiel.", nameProperty.Description); PropertyDescriptor worldReferencePointProperty = dynamicProperties[worldReferencePointPropertyIndex]; - Assert.IsNotNull(worldReferencePointProperty); - Assert.IsTrue(worldReferencePointProperty.IsReadOnly); - Assert.AreEqual("Schematisatie", worldReferencePointProperty.Category); - Assert.AreEqual("Locatie (RD) [m]", worldReferencePointProperty.DisplayName); - Assert.AreEqual("De coördinaten van de locatie van de dijk in het Rijksdriehoeksstelsel.", worldReferencePointProperty.Description); + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(worldReferencePointProperty, + "Schematisatie", + "Locatie (RD) [m]", + "De coördinaten van de locatie van de dijk in het Rijksdriehoeksstelsel.", + true); PropertyDescriptor orientationProperty = dynamicProperties[orientationPropertyIndex]; - Assert.IsNotNull(orientationProperty); - Assert.IsTrue(orientationProperty.IsReadOnly); - Assert.AreEqual("Schematisatie", orientationProperty.Category); - Assert.AreEqual("Oriëntatie [°]", orientationProperty.DisplayName); - Assert.AreEqual("Oriëntatie van de dijknormaal ten opzichte van het noorden.", orientationProperty.Description); + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(orientationProperty, + "Schematisatie", + "Oriëntatie [°]", + "Oriëntatie van de dijknormaal ten opzichte van het noorden.", + true); PropertyDescriptor breakWaterProperty = dynamicProperties[breakWaterPropertyIndex]; - Assert.IsNotNull(breakWaterProperty); Assert.IsInstanceOf(breakWaterProperty.Converter); - Assert.IsTrue(breakWaterProperty.IsReadOnly); - Assert.AreEqual("Schematisatie", breakWaterProperty.Category); - Assert.AreEqual("Dam", breakWaterProperty.DisplayName); - Assert.AreEqual("Eigenschappen van de dam.", breakWaterProperty.Description); + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(breakWaterProperty, + "Schematisatie", + "Dam", + "Eigenschappen van de dam.", + true); PropertyDescriptor foreshoreProperty = dynamicProperties[foreshorePropertyIndex]; - Assert.IsNotNull(foreshoreProperty); Assert.IsInstanceOf(foreshoreProperty.Converter); - Assert.IsTrue(foreshoreProperty.IsReadOnly); - Assert.AreEqual("Schematisatie", foreshoreProperty.Category); - Assert.AreEqual("Voorlandgeometrie", foreshoreProperty.DisplayName); - Assert.AreEqual("Eigenschappen van de voorlandgeometrie.", foreshoreProperty.Description); + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(foreshoreProperty, + "Schematisatie", + "Voorlandgeometrie", + "Eigenschappen van de voorlandgeometrie.", + true); PropertyDescriptor dikeGeometryProperty = dynamicProperties[dikeGeometryPropertyIndex]; - Assert.IsNotNull(dikeGeometryProperty); Assert.IsInstanceOf(dikeGeometryProperty.Converter); - Assert.IsTrue(dikeGeometryProperty.IsReadOnly); - Assert.AreEqual("Schematisatie", dikeGeometryProperty.Category); - Assert.AreEqual("Dijkgeometrie", dikeGeometryProperty.DisplayName); - Assert.AreEqual("Eigenschappen van de dijkgeometrie.", dikeGeometryProperty.Description); + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(dikeGeometryProperty, + "Schematisatie", + "Dijkgeometrie", + "Eigenschappen van de dijkgeometrie.", + true); PropertyDescriptor dikeHeightProperty = dynamicProperties[dikeHeightPropertyIndex]; - Assert.IsNotNull(dikeHeightProperty); - Assert.IsTrue(dikeHeightProperty.IsReadOnly); - Assert.AreEqual("Schematisatie", dikeHeightProperty.Category); - Assert.AreEqual("Dijkhoogte [m+NAP]", dikeHeightProperty.DisplayName); - Assert.AreEqual("De hoogte van de dijk.", dikeHeightProperty.Description); + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(dikeHeightProperty, + "Schematisatie", + "Dijkhoogte [m+NAP]", + "De hoogte van de dijk.", + true); } } } \ No newline at end of file