public void Constructor_ExpectedValues()
        {
            // Setup
            MacroStabilityInwardsOutput output = MacroStabilityInwardsOutputTestFactory.CreateOutput();

            // Call
            var properties = new MacroStabilityInwardsOutputProperties(output, 1.1);

            // Assert
            Assert.IsInstanceOf <ObjectProperties <MacroStabilityInwardsOutput> >(properties);
            Assert.AreSame(output, properties.Data);
        }
        public void GetProperties_WithData_ReturnExpectedValues()
        {
            // Setup
            const double modelFactor = 1.1;

            MacroStabilityInwardsOutput output = MacroStabilityInwardsOutputTestFactory.CreateRandomOutput();

            // Call
            var properties = new MacroStabilityInwardsOutputProperties(output, modelFactor);

            // Assert
            DerivedMacroStabilityInwardsOutput expectedDerivedOutput = DerivedMacroStabilityInwardsOutputFactory.Create(output, modelFactor);

            Assert.AreEqual(expectedDerivedOutput.FactorOfStability, properties.MacroStabilityInwardsFactorOfStability,
                            properties.MacroStabilityInwardsFactorOfStability.GetAccuracy());

            Assert.AreEqual(ProbabilityFormattingHelper.Format(expectedDerivedOutput.MacroStabilityInwardsProbability), properties.MacroStabilityInwardsProbability);
            Assert.AreEqual(expectedDerivedOutput.MacroStabilityInwardsReliability, properties.MacroStabilityInwardsReliability, properties.MacroStabilityInwardsReliability.GetAccuracy());
        }
        public void Constructor_Always_PropertiesHaveExpectedAttributesValues()
        {
            MacroStabilityInwardsOutput output = MacroStabilityInwardsOutputTestFactory.CreateOutput();

            // Call
            var properties = new MacroStabilityInwardsOutputProperties(output, 1.1);

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

            Assert.AreEqual(3, dynamicProperties.Count);

            const string macroStabilityInwardsCategory = "Macrostabiliteit binnenwaarts";

            PropertyDescriptor stabilityFactorProperty = dynamicProperties[0];

            PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(stabilityFactorProperty,
                                                                            macroStabilityInwardsCategory,
                                                                            "Stabiliteitsfactor [-]",
                                                                            "Het quotiënt van de weerstandbiedende- en aandrijvende krachten langs een glijvlak.",
                                                                            true);

            PropertyDescriptor macroStabilityInwardsProbabilityProperty = dynamicProperties[1];

            PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(macroStabilityInwardsProbabilityProperty,
                                                                            macroStabilityInwardsCategory,
                                                                            "Benaderde faalkans [1/jaar]",
                                                                            "De benaderde kans dat het faalmechanisme macrostabiliteit binnenwaarts optreedt voor deze berekening.",
                                                                            true);

            PropertyDescriptor macroStabilityInwardsReliabilityProperty = dynamicProperties[2];

            PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(macroStabilityInwardsReliabilityProperty,
                                                                            macroStabilityInwardsCategory,
                                                                            "Betrouwbaarheidsindex faalkans [-]",
                                                                            "De betrouwbaarheidsindex van de faalkans voor deze berekening.",
                                                                            true);
        }