public void CreateHydraulicBoundaryLocationCalculationActivities_AssessmentSectionNull_ThrowsArgumentNullException()
        {
            // Call
            void Call() => AssessmentSectionHydraulicBoundaryLocationCalculationActivityFactory.CreateHydraulicBoundaryLocationCalculationActivities(null);

            // Assert
            var exception = Assert.Throws <ArgumentNullException>(Call);

            Assert.AreEqual("assessmentSection", exception.ParamName);
        }
        public void CreateHydraulicBoundaryLocationCalculationActivities_WithValidDataAndUsePreprocessorStates_ExpectedInputSetToActivities(bool usePreprocessor)
        {
            // Setup
            AssessmentSectionStub assessmentSection = CreateAssessmentSection(usePreprocessor);

            var hydraulicBoundaryLocation1 = new TestHydraulicBoundaryLocation("locationName 1");
            var hydraulicBoundaryLocation2 = new TestHydraulicBoundaryLocation("locationName 2");

            assessmentSection.SetHydraulicBoundaryLocationCalculations(new[]
            {
                hydraulicBoundaryLocation1,
                hydraulicBoundaryLocation2
            });

            // Call
            IEnumerable <CalculatableActivity> activities =
                AssessmentSectionHydraulicBoundaryLocationCalculationActivityFactory.CreateHydraulicBoundaryLocationCalculationActivities(assessmentSection);

            // Assert
            Assert.AreEqual(12, activities.Count());

            HydraulicBoundaryDatabase hydraulicBoundaryDatabase = assessmentSection.HydraulicBoundaryDatabase;

            double       maximumAllowableFloodingProbability     = assessmentSection.FailureMechanismContribution.MaximumAllowableFloodingProbability;
            const string maximumAllowableFloodingProbabilityText = "1/30.000";
            double       signalFloodingProbability     = assessmentSection.FailureMechanismContribution.SignalFloodingProbability;
            const string signalFloodingProbabilityText = "1/30.000 (1)";

            AssertDesignWaterLevelCalculationActivity(activities.ElementAt(0),
                                                      hydraulicBoundaryLocation1,
                                                      maximumAllowableFloodingProbability,
                                                      maximumAllowableFloodingProbabilityText,
                                                      hydraulicBoundaryDatabase);
            AssertDesignWaterLevelCalculationActivity(activities.ElementAt(1),
                                                      hydraulicBoundaryLocation2,
                                                      maximumAllowableFloodingProbability,
                                                      maximumAllowableFloodingProbabilityText,
                                                      hydraulicBoundaryDatabase);

            AssertDesignWaterLevelCalculationActivity(activities.ElementAt(2),
                                                      hydraulicBoundaryLocation1,
                                                      signalFloodingProbability,
                                                      signalFloodingProbabilityText,
                                                      hydraulicBoundaryDatabase);
            AssertDesignWaterLevelCalculationActivity(activities.ElementAt(3),
                                                      hydraulicBoundaryLocation2,
                                                      signalFloodingProbability,
                                                      signalFloodingProbabilityText,
                                                      hydraulicBoundaryDatabase);

            double       firstWaterLevelTargetProbability              = assessmentSection.WaterLevelCalculationsForUserDefinedTargetProbabilities[0].TargetProbability;
            const string expectedFirstWaterLevelTargetProbabilityText  = "1/10.000";
            double       secondWaterLevelTargetProbability             = assessmentSection.WaterLevelCalculationsForUserDefinedTargetProbabilities[1].TargetProbability;
            const string expectedSecondWaterLevelTargetProbabilityText = "1/100.000";

            AssertDesignWaterLevelCalculationActivity(activities.ElementAt(4),
                                                      hydraulicBoundaryLocation1,
                                                      firstWaterLevelTargetProbability,
                                                      expectedFirstWaterLevelTargetProbabilityText,
                                                      hydraulicBoundaryDatabase);
            AssertDesignWaterLevelCalculationActivity(activities.ElementAt(5),
                                                      hydraulicBoundaryLocation2,
                                                      firstWaterLevelTargetProbability,
                                                      expectedFirstWaterLevelTargetProbabilityText,
                                                      hydraulicBoundaryDatabase);

            AssertDesignWaterLevelCalculationActivity(activities.ElementAt(6),
                                                      hydraulicBoundaryLocation1,
                                                      secondWaterLevelTargetProbability,
                                                      expectedSecondWaterLevelTargetProbabilityText,
                                                      hydraulicBoundaryDatabase);
            AssertDesignWaterLevelCalculationActivity(activities.ElementAt(7),
                                                      hydraulicBoundaryLocation2,
                                                      secondWaterLevelTargetProbability,
                                                      expectedSecondWaterLevelTargetProbabilityText,
                                                      hydraulicBoundaryDatabase);

            double       firstWaveHeightTargetProbability              = assessmentSection.WaveHeightCalculationsForUserDefinedTargetProbabilities[0].TargetProbability;
            const string expectedFirstWaveHeightTargetProbabilityText  = "1/4.000";
            double       secondWaveHeightTargetProbability             = assessmentSection.WaveHeightCalculationsForUserDefinedTargetProbabilities[1].TargetProbability;
            const string expectedSecondWaveHeightTargetProbabilityText = "1/40.000";

            AssertWaveHeightCalculationActivity(activities.ElementAt(8),
                                                hydraulicBoundaryLocation1,
                                                firstWaveHeightTargetProbability,
                                                expectedFirstWaveHeightTargetProbabilityText,
                                                hydraulicBoundaryDatabase);
            AssertWaveHeightCalculationActivity(activities.ElementAt(9),
                                                hydraulicBoundaryLocation2,
                                                firstWaveHeightTargetProbability,
                                                expectedFirstWaveHeightTargetProbabilityText,
                                                hydraulicBoundaryDatabase);

            AssertWaveHeightCalculationActivity(activities.ElementAt(10),
                                                hydraulicBoundaryLocation1,
                                                secondWaveHeightTargetProbability,
                                                expectedSecondWaveHeightTargetProbabilityText,
                                                hydraulicBoundaryDatabase);
            AssertWaveHeightCalculationActivity(activities.ElementAt(11),
                                                hydraulicBoundaryLocation2,
                                                secondWaveHeightTargetProbability,
                                                expectedSecondWaveHeightTargetProbabilityText,
                                                hydraulicBoundaryDatabase);
        }