public void Data_SetNewDikeProfileInstance_ReturnCorrectPropertyValues()
        {
            // Setup
            const string id          = "DP";
            const string name        = "Dijkprofiel";
            var          dikeProfile = new DikeProfile(
                new Point2D(12.34, 56.78),
                Enumerable.Empty <RoughnessPoint>(),
                Enumerable.Empty <Point2D>(),
                new BreakWater(BreakWaterType.Caisson, 2),
                new DikeProfile.ConstructionProperties
            {
                Id   = id,
                Name = name
            });

            // Call
            var properties = new DikeProfileProperties
            {
                Data = dikeProfile
            };

            // Assert
            Assert.AreEqual(new Point2D(12, 57), properties.WorldReferencePoint);
            Assert.AreEqual(id, properties.Id);
            Assert.AreEqual(name, properties.Name);
            Assert.AreEqual(2, properties.Orientation.NumberOfDecimalPlaces);
            Assert.AreEqual(0.0, properties.Orientation.Value);
            Assert.AreSame(dikeProfile.ForeshoreProfile, properties.BreakWater.Data);
            Assert.AreSame(dikeProfile.ForeshoreProfile, properties.Foreshore.Data);
            Assert.AreSame(dikeProfile, properties.DikeGeometry.Data);
            Assert.AreEqual(2, properties.DikeHeight.NumberOfDecimalPlaces);
            Assert.AreEqual(0.0, properties.DikeHeight.Value);
        }
        public void Constructor_ExpectedValues()
        {
            // Call
            var properties = new DikeProfileProperties();

            // Assert
            Assert.IsInstanceOf <ObjectProperties <DikeProfile> >(properties);
            Assert.IsNull(properties.Data);
        }
        public void Constructor_Always_PropertiesHaveExpectedAttributesValues()
        {
            // Setup
            DikeProfile dikeProfile = DikeProfileTestFactory.CreateDikeProfile();

            // Call
            var properties = new DikeProfileProperties
            {
                Data = dikeProfile
            };

            // Assert
            PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties);

            Assert.AreEqual(8, dynamicProperties.Count);

            PropertyDescriptor idProperty = dynamicProperties[idPropertyIndex];

            PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(idProperty,
                                                                            "Algemeen",
                                                                            "ID",
                                                                            "ID van het dijkprofiel.",
                                                                            true);

            PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex];

            PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty,
                                                                            "Algemeen",
                                                                            "Naam",
                                                                            "Naam van het dijkprofiel.",
                                                                            true);

            PropertyDescriptor worldReferencePointProperty = dynamicProperties[worldReferencePointPropertyIndex];

            PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(worldReferencePointProperty,
                                                                            "Schematisatie",
                                                                            "Locatie (RD) [m]",
                                                                            "De coördinaten van de locatie van de dijk in het Rijksdriehoeksstelsel.",
                                                                            true);

            PropertyDescriptor orientationProperty = dynamicProperties[orientationPropertyIndex];

            PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(orientationProperty,
                                                                            "Schematisatie",
                                                                            "Oriëntatie [°]",
                                                                            "Oriëntatie van de dijknormaal ten opzichte van het noorden.",
                                                                            true);

            PropertyDescriptor breakWaterProperty = dynamicProperties[breakWaterPropertyIndex];

            Assert.IsInstanceOf <ExpandableObjectConverter>(breakWaterProperty.Converter);
            PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(breakWaterProperty,
                                                                            "Schematisatie",
                                                                            "Dam",
                                                                            "Eigenschappen van de dam.",
                                                                            true);

            PropertyDescriptor foreshoreProperty = dynamicProperties[foreshorePropertyIndex];

            Assert.IsInstanceOf <ExpandableObjectConverter>(foreshoreProperty.Converter);
            PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(foreshoreProperty,
                                                                            "Schematisatie",
                                                                            "Voorlandgeometrie",
                                                                            "Eigenschappen van de voorlandgeometrie.",
                                                                            true);

            PropertyDescriptor dikeGeometryProperty = dynamicProperties[dikeGeometryPropertyIndex];

            Assert.IsInstanceOf <ExpandableObjectConverter>(dikeGeometryProperty.Converter);
            PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(dikeGeometryProperty,
                                                                            "Schematisatie",
                                                                            "Dijkgeometrie",
                                                                            "Eigenschappen van de dijkgeometrie.",
                                                                            true);

            PropertyDescriptor dikeHeightProperty = dynamicProperties[dikeHeightPropertyIndex];

            PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(dikeHeightProperty,
                                                                            "Schematisatie",
                                                                            "Dijkhoogte [m+NAP]",
                                                                            "De hoogte van de dijk.",
                                                                            true);
        }