public void Constructor_Always_PropertiesHaveExpectedAttributesValues()
        {
            // Setup
            var items = new[]
            {
                new TestWaveConditionsOutput()
            };

            var waveImpactAsphaltCoverWaveConditionsOutput = new WaveImpactAsphaltCoverWaveConditionsOutput(items);

            // Call
            var properties = new WaveImpactAsphaltCoverWaveConditionsOutputProperties
            {
                Data = waveImpactAsphaltCoverWaveConditionsOutput
            };

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

            Assert.AreEqual(1, dynamicProperties.Count);

            PropertyDescriptor itemsProperty = dynamicProperties[0];

            Assert.IsNotNull(itemsProperty);
            Assert.IsTrue(itemsProperty.IsReadOnly);
            Assert.IsInstanceOf <ExpandableArrayConverter>(itemsProperty.Converter);
            Assert.AreEqual("Resultaat", itemsProperty.Category);
            Assert.AreEqual("Hydraulische belastingen voor asfalt", itemsProperty.DisplayName);
            Assert.AreEqual("Berekende hydraulische belastingen voor asfalt.", itemsProperty.Description);
        }
        public void DefaultConstructor_ExpectedValues()
        {
            // Call
            var properties = new WaveImpactAsphaltCoverWaveConditionsOutputProperties();

            // Assert
            Assert.IsInstanceOf <ObjectProperties <WaveImpactAsphaltCoverWaveConditionsOutput> >(properties);
            Assert.IsNull(properties.Data);
        }
        public void Data_WithCalculationOutput_ReturnsExpectedValues()
        {
            // Setup
            var items = new[]
            {
                new TestWaveConditionsOutput()
            };

            var waveImpactAsphaltCoverWaveConditionsOutput = new WaveImpactAsphaltCoverWaveConditionsOutput(items);

            // Call
            var properties = new WaveImpactAsphaltCoverWaveConditionsOutputProperties
            {
                Data = waveImpactAsphaltCoverWaveConditionsOutput
            };

            // Assert
            CollectionAssert.AllItemsAreInstancesOfType(properties.Items, typeof(WaveConditionsOutputProperties));
            Assert.AreEqual(items.Length, properties.Items.Length);

            WaveConditionsOutput           expectedOutputProperty = items[0];
            WaveConditionsOutputProperties firstOutputProperties  = properties.Items[0];

            Assert.AreEqual(expectedOutputProperty.WaterLevel, firstOutputProperties.WaterLevel);
            Assert.AreEqual(expectedOutputProperty.WaveHeight, firstOutputProperties.WaveHeight);
            Assert.AreEqual(expectedOutputProperty.WavePeakPeriod, firstOutputProperties.WavePeakPeriod);
            Assert.AreEqual(expectedOutputProperty.WaveAngle, firstOutputProperties.WaveAngle);
            Assert.AreEqual(expectedOutputProperty.WaveDirection, firstOutputProperties.WaveDirection);
            Assert.AreEqual(expectedOutputProperty.TargetProbability, firstOutputProperties.TargetProbability);
            Assert.AreEqual(expectedOutputProperty.TargetReliability, firstOutputProperties.TargetReliability,
                            firstOutputProperties.TargetReliability.GetAccuracy());
            Assert.AreEqual(expectedOutputProperty.TargetProbability, firstOutputProperties.TargetProbability);
            Assert.AreEqual(expectedOutputProperty.TargetReliability, firstOutputProperties.TargetReliability,
                            firstOutputProperties.TargetReliability.GetAccuracy());

            string convergenceValue = EnumDisplayNameHelper.GetDisplayName(expectedOutputProperty.CalculationConvergence);

            Assert.AreEqual(convergenceValue, firstOutputProperties.Convergence);
        }