Пример #1
0
        public void GetDisplayName_ValidEnum_ReturnsExpectedDislayName(RiskeerWellKnownTileSource riskeerWellKnownTileSource,
                                                                       string expectedDisplayName)
        {
            // Call
            string displayName = riskeerWellKnownTileSource.GetDisplayName();

            // Assert
            Assert.AreEqual(expectedDisplayName, displayName);
        }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AssessmentSection"/> class.
        /// </summary>
        /// <param name="composition">The composition of the assessment section, e.g. what
        /// type of elements can be found within the assessment section.</param>
        /// <param name="maximumAllowableFloodingProbability">The maximum allowable flooding probability of the assessment section.</param>
        /// <param name="signalFloodingProbability">The signal flooding probability of the assessment section.</param>
        /// <exception cref="ArgumentOutOfRangeException">Thrown when:
        /// <list type="bullet">
        /// <item><paramref name="maximumAllowableFloodingProbability"/> is not in the interval [0.000001, 0.1] or is <see cref="double.NaN"/>;</item>
        /// <item><paramref name="signalFloodingProbability"/> is not in the interval [0.000001, 0.1] or is <see cref="double.NaN"/>;</item>
        /// <item>The <paramref name="signalFloodingProbability"/> is larger than <paramref name="maximumAllowableFloodingProbability"/>.</item>
        /// </list>
        /// </exception>
        /// <exception cref="InvalidEnumArgumentException">Thrown when <paramref name="composition"/>
        /// is not a valid enum value of <see cref="AssessmentSectionComposition"/>.</exception>
        /// <exception cref="NotSupportedException">Thrown when <paramref name="composition"/>
        /// is not supported.</exception>
        public AssessmentSection(AssessmentSectionComposition composition,
                                 double maximumAllowableFloodingProbability = defaultFloodingProbability,
                                 double signalFloodingProbability           = defaultFloodingProbability)
        {
            Name     = Resources.AssessmentSection_DisplayName;
            Comments = new Comment();

            BackgroundData = new BackgroundData(new WellKnownBackgroundDataConfiguration(defaultWellKnownTileSource))
            {
                Name = defaultWellKnownTileSource.GetDisplayName()
            };

            ReferenceLine = new ReferenceLine();

            HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase();

            SpecificFailureMechanisms = new ObservableList <SpecificFailureMechanism>();
            waterLevelCalculationsForSignalFloodingProbability           = new ObservableList <HydraulicBoundaryLocationCalculation>();
            waterLevelCalculationsForMaximumAllowableFloodingProbability = new ObservableList <HydraulicBoundaryLocationCalculation>();
            WaterLevelCalculationsForUserDefinedTargetProbabilities      = new ObservableList <HydraulicBoundaryLocationCalculationsForTargetProbability>();
            WaveHeightCalculationsForUserDefinedTargetProbabilities      = new ObservableList <HydraulicBoundaryLocationCalculationsForTargetProbability>();

            Piping = new PipingFailureMechanism();
            GrassCoverErosionInwards  = new GrassCoverErosionInwardsFailureMechanism();
            MacroStabilityInwards     = new MacroStabilityInwardsFailureMechanism();
            Microstability            = new MicrostabilityFailureMechanism();
            StabilityStoneCover       = new StabilityStoneCoverFailureMechanism();
            WaveImpactAsphaltCover    = new WaveImpactAsphaltCoverFailureMechanism();
            WaterPressureAsphaltCover = new WaterPressureAsphaltCoverFailureMechanism();
            GrassCoverErosionOutwards = new GrassCoverErosionOutwardsFailureMechanism();
            GrassCoverSlipOffOutwards = new GrassCoverSlipOffOutwardsFailureMechanism();
            GrassCoverSlipOffInwards  = new GrassCoverSlipOffInwardsFailureMechanism();
            HeightStructures          = new HeightStructuresFailureMechanism();
            ClosingStructures         = new ClosingStructuresFailureMechanism();
            StabilityPointStructures  = new StabilityPointStructuresFailureMechanism();
            PipingStructure           = new PipingStructureFailureMechanism();
            DuneErosion = new DuneErosionFailureMechanism();

            FailureMechanismContribution = new FailureMechanismContribution(maximumAllowableFloodingProbability, signalFloodingProbability);
            ChangeComposition(composition);
        }