Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/Assembly/AssessmentSectionAssemblyFactory.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Ringtoets.Integration.Data/Assembly/AssessmentSectionAssemblyFactory.cs (revision 0)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Data/Assembly/AssessmentSectionAssemblyFactory.cs (revision e6dce9f10ba6b2e89fa58977a50fb7e4c9ceb647)
@@ -0,0 +1,169 @@
+// Copyright (C) Stichting Deltares 2017. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.Collections.Generic;
+using Ringtoets.AssemblyTool.Data;
+using Ringtoets.AssemblyTool.KernelWrapper.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.Calculators.Assembly;
+using Ringtoets.AssemblyTool.KernelWrapper.Kernels;
+using Ringtoets.ClosingStructures.Data;
+using Ringtoets.Common.Data.Contribution;
+using Ringtoets.Common.Data.Exceptions;
+using Ringtoets.DuneErosion.Data;
+using Ringtoets.GrassCoverErosionInwards.Data;
+using Ringtoets.GrassCoverErosionOutwards.Data;
+using Ringtoets.HeightStructures.Data;
+using Ringtoets.Integration.Data.StandAlone.AssemblyFactories;
+using Ringtoets.MacroStabilityInwards.Data;
+using Ringtoets.Piping.Data;
+using Ringtoets.StabilityPointStructures.Data;
+using Ringtoets.StabilityStoneCover.Data;
+using Ringtoets.WaveImpactAsphaltCover.Data;
+
+namespace Ringtoets.Integration.Data.Assembly
+{
+ ///
+ /// Factory for assembling the assembly results for an assessment section.
+ ///
+ public static class AssessmentSectionAssemblyFactory
+ {
+ ///
+ /// Assembles the results of the failure mechanisms with probability within the assessment sections.
+ ///
+ /// The assessment section which contains the failure mechanisms to assemble for.
+ /// A .
+ /// Thrown when is null.
+ /// Thrown when cannot be created.
+ public static AssessmentSectionAssembly AssembleFailureMechanismsWithProbability(AssessmentSection assessmentSection)
+ {
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ try
+ {
+ IAssemblyToolCalculatorFactory calculatorFactory = AssemblyToolCalculatorFactory.Instance;
+ IAssessmentSectionAssemblyCalculator calculator =
+ calculatorFactory.CreateAssessmentSectionAssemblyCalculator(AssemblyToolKernelFactory.Instance);
+
+ FailureMechanismContribution failureMechanismContribution = assessmentSection.FailureMechanismContribution;
+ return calculator.AssembleFailureMechanisms(GetFailureMechanismWithProbabilityAssemblyResults(assessmentSection),
+ failureMechanismContribution.SignalingNorm,
+ failureMechanismContribution.LowerLimitNorm);
+ }
+ catch (AssessmentSectionAssemblyCalculatorException e)
+ {
+ throw new AssemblyException(e.Message, e);
+ }
+ }
+
+ ///
+ /// Assembles the results of failure mechanisms without probability within the assessment section.
+ ///
+ /// The assessment section which contains the failure mechanisms to assemble for.
+ /// A .
+ /// Thrown when is null.
+ /// Thrown when cannot be created.
+ public static AssessmentSectionAssemblyCategoryGroup AssembleFailureMechanismsWithoutProbability(AssessmentSection assessmentSection)
+ {
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ try
+ {
+ IAssemblyToolCalculatorFactory calculatorFactory = AssemblyToolCalculatorFactory.Instance;
+ IAssessmentSectionAssemblyCalculator calculator =
+ calculatorFactory.CreateAssessmentSectionAssemblyCalculator(AssemblyToolKernelFactory.Instance);
+
+ return calculator.AssembleFailureMechanisms(GetFailureMechanismsWithoutProbabilityAssemblyResults(assessmentSection));
+ }
+ catch (AssessmentSectionAssemblyCalculatorException e)
+ {
+ throw new AssemblyException(e.Message, e);
+ }
+ }
+
+ ///
+ /// Assembles the assessment section.
+ ///
+ /// The assessment section which contains the failure mechanisms to assemble for.
+ /// A .
+ /// Thrown when is null.
+ /// Thrown when cannot be created.
+ public static AssessmentSectionAssemblyCategoryGroup AssembleAssessmentSection(AssessmentSection assessmentSection)
+ {
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ try
+ {
+ IAssemblyToolCalculatorFactory calculatorFactory = AssemblyToolCalculatorFactory.Instance;
+ IAssessmentSectionAssemblyCalculator calculator =
+ calculatorFactory.CreateAssessmentSectionAssemblyCalculator(AssemblyToolKernelFactory.Instance);
+
+ return calculator.AssembleAssessmentSection(AssembleFailureMechanismsWithoutProbability(assessmentSection),
+ AssembleFailureMechanismsWithProbability(assessmentSection));
+ }
+ catch (AssessmentSectionAssemblyCalculatorException e)
+ {
+ throw new AssemblyException(e.Message, e);
+ }
+ }
+
+ private static IEnumerable GetFailureMechanismWithProbabilityAssemblyResults(AssessmentSection assessmentSection)
+ {
+ return new[]
+ {
+ GrassCoverErosionInwardsFailureMechanismAssemblyFactory.AssembleFailureMechanism(assessmentSection.GrassCoverErosionInwards, assessmentSection),
+ HeightStructuresFailureMechanismAssemblyFactory.AssembleFailureMechanism(assessmentSection.HeightStructures, assessmentSection),
+ ClosingStructuresFailureMechanismAssemblyFactory.AssembleFailureMechanism(assessmentSection.ClosingStructures, assessmentSection),
+ StabilityPointStructuresFailureMechanismAssemblyFactory.AssembleFailureMechanism(assessmentSection.StabilityPointStructures, assessmentSection),
+ PipingFailureMechanismAssemblyFactory.AssembleFailureMechanism(assessmentSection.Piping, assessmentSection),
+ MacroStabilityInwardsFailureMechanismAssemblyFactory.AssembleFailureMechanism(assessmentSection.MacroStabilityInwards, assessmentSection)
+ };
+ }
+
+ private static IEnumerable GetFailureMechanismsWithoutProbabilityAssemblyResults(AssessmentSection assessmentSection)
+ {
+ return new[]
+ {
+ StabilityStoneCoverFailureMechanismAssemblyFactory.AssembleFailureMechanism(assessmentSection.StabilityStoneCover),
+ WaveImpactAsphaltCoverFailureMechanismAssemblyFactory.AssembleFailureMechanism(assessmentSection.WaveImpactAsphaltCover),
+ GrassCoverErosionOutwardsFailureMechanismAssemblyFactory.AssembleFailureMechanism(assessmentSection.GrassCoverErosionOutwards),
+ DuneErosionFailureMechanismAssemblyFactory.AssembleFailureMechanism(assessmentSection.DuneErosion),
+ MacroStabilityOutwardsFailureMechanismAssemblyFactory.AssembleFailureMechanism(assessmentSection.MacroStabilityOutwards, assessmentSection),
+ MicrostabilityFailureMechanismAssemblyFactory.AssembleFailureMechanism(assessmentSection.Microstability),
+ WaterPressureAsphaltCoverFailureMechanismAssemblyFactory.AssembleFailureMechanism(assessmentSection.WaterPressureAsphaltCover),
+ GrassCoverSlipOffOutwardsFailureMechanismAssemblyFactory.AssembleFailureMechanism(assessmentSection.GrassCoverSlipOffOutwards),
+ GrassCoverSlipOffInwardsFailureMechanismAssemblyFactory.AssembleFailureMechanism(assessmentSection.GrassCoverSlipOffInwards),
+ PipingStructureFailureMechanismAssemblyFactory.AssembleFailureMechanism(assessmentSection.PipingStructure),
+ StrengthStabilityLengthwiseConstructionFailureMechanismAssemblyFactory.AssembleFailureMechanism(assessmentSection.StrengthStabilityLengthwiseConstruction),
+ TechnicalInnovationFailureMechanismAssemblyFactory.AssembleFailureMechanism(assessmentSection.TechnicalInnovation)
+ };
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/Assembly/CombinedFailureMechanismSectionAssemblyResult.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Ringtoets.Integration.Data/Assembly/CombinedFailureMechanismSectionAssemblyResult.cs (revision 0)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Data/Assembly/CombinedFailureMechanismSectionAssemblyResult.cs (revision e6dce9f10ba6b2e89fa58977a50fb7e4c9ceb647)
@@ -0,0 +1,302 @@
+// Copyright (C) Stichting Deltares 2017. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using Ringtoets.AssemblyTool.Data;
+
+namespace Ringtoets.Integration.Data.Assembly
+{
+ ///
+ /// Assembly result for the combined failure mechanism section.
+ ///
+ public class CombinedFailureMechanismSectionAssemblyResult
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The start of the section from the beginning of the reference line.
+ /// The end of the section from the beginning of the reference line.
+ /// The total result of the section.
+ /// The container of the properties for the
+ /// .
+ /// Thrown when
+ /// is null.
+ public CombinedFailureMechanismSectionAssemblyResult(double sectionStart, double sectionEnd,
+ FailureMechanismSectionAssemblyCategoryGroup totalResult,
+ ConstructionProperties properties)
+ {
+ if (properties == null)
+ {
+ throw new ArgumentNullException(nameof(properties));
+ }
+
+ SectionStart = sectionStart;
+ SectionEnd = sectionEnd;
+ TotalResult = totalResult;
+ Piping = properties.Piping;
+ GrassCoverErosionInwards = properties.GrassCoverErosionInwards;
+ MacroStabilityInwards = properties.MacroStabilityInwards;
+ MacroStabilityOutwards = properties.MacroStabilityOutwards;
+ Microstability = properties.Microstability;
+ StabilityStoneCover = properties.StabilityStoneCover;
+ WaveImpactAsphaltCover = properties.WaveImpactAsphaltCover;
+ WaterPressureAsphaltCover = properties.WaterPressureAsphaltCover;
+ GrassCoverErosionOutwards = properties.GrassCoverErosionOutwards;
+ GrassCoverSlipOffOutwards = properties.GrassCoverSlipOffOutwards;
+ GrassCoverSlipOffInwards = properties.GrassCoverSlipOffInwards;
+ HeightStructures = properties.HeightStructures;
+ ClosingStructures = properties.ClosingStructures;
+ PipingStructures = properties.PipingStructures;
+ StabilityPointStructures = properties.StabilityPointStructures;
+ StrengthStabilityLengthwise = properties.StrengthStabilityLengthwise;
+ DuneErosion = properties.DuneErosion;
+ TechnicalInnovation = properties.TechnicalInnovation;
+ }
+
+ ///
+ /// Gets the start of the section from the beginning of the reference line.
+ /// [m]
+ ///
+ public double SectionStart { get; }
+
+ ///
+ /// Gets the end of the section from the beginning of the reference line.
+ /// [m]
+ ///
+ public double SectionEnd { get; }
+
+ ///
+ /// Gets the total assembly result.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup TotalResult { get; }
+
+ ///
+ /// Gets the assembly result for piping.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup Piping { get; }
+
+ ///
+ /// Gets the assembly result for grass cover erosion inwards.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup GrassCoverErosionInwards { get; }
+
+ ///
+ /// Gets the assembly result for macro stability inwards.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup MacroStabilityInwards { get; }
+
+ ///
+ /// Gets the assembly result for macro stability outwards.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup MacroStabilityOutwards { get; }
+
+ ///
+ /// Gets the assembly result for microstability.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup Microstability { get; }
+
+ ///
+ /// Gets the assembly result for stability stone cover.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup StabilityStoneCover { get; }
+
+ ///
+ /// Gets the assembly result for wave impact asphalt cover.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup WaveImpactAsphaltCover { get; }
+
+ ///
+ /// Gets the assembly result for water pressure asphalt cover.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup WaterPressureAsphaltCover { get; }
+
+ ///
+ /// Gets the assembly result for grass cover erosion outwards.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup GrassCoverErosionOutwards { get; }
+
+ ///
+ /// Gets the assembly result for grass cover slip off outwards.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup GrassCoverSlipOffOutwards { get; }
+
+ ///
+ /// Gets the assembly result for grass cover slip off inwards.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup GrassCoverSlipOffInwards { get; }
+
+ ///
+ /// Gets the assembly result for height structures.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup HeightStructures { get; }
+
+ ///
+ /// Gets the assembly result for closing structures.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup ClosingStructures { get; }
+
+ ///
+ /// Gets the assembly result for piping structures.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup PipingStructures { get; }
+
+ ///
+ /// Gets the assembly result for stability point structures.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup StabilityPointStructures { get; }
+
+ ///
+ /// Gets the assembly result for strength stability lengthwise.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup StrengthStabilityLengthwise { get; }
+
+ ///
+ /// Gets the assembly result for dune erosion.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup DuneErosion { get; }
+
+ ///
+ /// Gets the assembly result for technical innovation.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup TechnicalInnovation { get; }
+
+ ///
+ /// Container for properties for constructing a .
+ /// s
+ public class ConstructionProperties
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ public ConstructionProperties()
+ {
+ Piping = FailureMechanismSectionAssemblyCategoryGroup.None;
+ GrassCoverErosionInwards = FailureMechanismSectionAssemblyCategoryGroup.None;
+ MacroStabilityInwards = FailureMechanismSectionAssemblyCategoryGroup.None;
+ MacroStabilityOutwards = FailureMechanismSectionAssemblyCategoryGroup.None;
+ Microstability = FailureMechanismSectionAssemblyCategoryGroup.None;
+ StabilityStoneCover = FailureMechanismSectionAssemblyCategoryGroup.None;
+ WaveImpactAsphaltCover = FailureMechanismSectionAssemblyCategoryGroup.None;
+ WaterPressureAsphaltCover = FailureMechanismSectionAssemblyCategoryGroup.None;
+ GrassCoverErosionOutwards = FailureMechanismSectionAssemblyCategoryGroup.None;
+ GrassCoverSlipOffOutwards = FailureMechanismSectionAssemblyCategoryGroup.None;
+ GrassCoverSlipOffInwards = FailureMechanismSectionAssemblyCategoryGroup.None;
+ HeightStructures = FailureMechanismSectionAssemblyCategoryGroup.None;
+ ClosingStructures = FailureMechanismSectionAssemblyCategoryGroup.None;
+ PipingStructures = FailureMechanismSectionAssemblyCategoryGroup.None;
+ StabilityPointStructures = FailureMechanismSectionAssemblyCategoryGroup.None;
+ StrengthStabilityLengthwise = FailureMechanismSectionAssemblyCategoryGroup.None;
+ DuneErosion = FailureMechanismSectionAssemblyCategoryGroup.None;
+ TechnicalInnovation = FailureMechanismSectionAssemblyCategoryGroup.None;
+ }
+
+ ///
+ /// Gets or sets the assembly result for piping.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup Piping { internal get; set; }
+
+ ///
+ /// Gets or sets the assembly result for grass cover erosion inwards.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup GrassCoverErosionInwards { internal get; set; }
+
+ ///
+ /// Gets or sets the assembly result for macro stability inwards.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup MacroStabilityInwards { internal get; set; }
+
+ ///
+ /// Gets or sets the assembly result for macro stability outwards.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup MacroStabilityOutwards { internal get; set; }
+
+ ///
+ /// Gets or sets the assembly result for microstability.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup Microstability { internal get; set; }
+
+ ///
+ /// Gets or sets the assembly result for stability stone cover.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup StabilityStoneCover { internal get; set; }
+
+ ///
+ /// Gets or sets the assembly result for wave impact asphalt cover.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup WaveImpactAsphaltCover { internal get; set; }
+
+ ///
+ /// Gets or sets the assembly result for water pressure asphalt cover.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup WaterPressureAsphaltCover { internal get; set; }
+
+ ///
+ /// Gets or sets the assembly result for grass cover erosion outwards.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup GrassCoverErosionOutwards { internal get; set; }
+
+ ///
+ /// Gets or sets the assembly result for grass cover slip off outwards.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup GrassCoverSlipOffOutwards { internal get; set; }
+
+ ///
+ /// Gets or sets the assembly result for grass cover slip off inwards.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup GrassCoverSlipOffInwards { internal get; set; }
+
+ ///
+ /// Gets or sets the assembly result for height structures.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup HeightStructures { internal get; set; }
+
+ ///
+ /// Gets or sets the assembly result for closing structures.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup ClosingStructures { internal get; set; }
+
+ ///
+ /// Gets or sets the assembly result for piping structures.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup PipingStructures { internal get; set; }
+
+ ///
+ /// Gets or sets the assembly result for stability point structures.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup StabilityPointStructures { internal get; set; }
+
+ ///
+ /// Gets or sets the assembly result for strength stability lengthwise.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup StrengthStabilityLengthwise { internal get; set; }
+
+ ///
+ /// Gets or sets the assembly result for dune erosion.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup DuneErosion { internal get; set; }
+
+ ///
+ /// Gets or sets the assembly result for technical innovation.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup TechnicalInnovation { internal get; set; }
+ }
+ }
+}
\ No newline at end of file
Fisheye: Tag e6dce9f10ba6b2e89fa58977a50fb7e4c9ceb647 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSectionAssemblyFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag e6dce9f10ba6b2e89fa58977a50fb7e4c9ceb647 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.Data/CombinedFailureMechanismSectionAssemblyResult.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/Ringtoets.Integration.Data.csproj
===================================================================
diff -u -r092446a2a287098fe2fdd448f662a60cf6d42f89 -re6dce9f10ba6b2e89fa58977a50fb7e4c9ceb647
--- Ringtoets/Integration/src/Ringtoets.Integration.Data/Ringtoets.Integration.Data.csproj (.../Ringtoets.Integration.Data.csproj) (revision 092446a2a287098fe2fdd448f662a60cf6d42f89)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Data/Ringtoets.Integration.Data.csproj (.../Ringtoets.Integration.Data.csproj) (revision e6dce9f10ba6b2e89fa58977a50fb7e4c9ceb647)
@@ -12,8 +12,8 @@
-
-
+
+
Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/AssemblyResultTotalView.cs
===================================================================
diff -u -rc40fc95d49f6873726c4c1ae544f5b0ed17a2601 -re6dce9f10ba6b2e89fa58977a50fb7e4c9ceb647
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/AssemblyResultTotalView.cs (.../AssemblyResultTotalView.cs) (revision c40fc95d49f6873726c4c1ae544f5b0ed17a2601)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/AssemblyResultTotalView.cs (.../AssemblyResultTotalView.cs) (revision e6dce9f10ba6b2e89fa58977a50fb7e4c9ceb647)
@@ -32,6 +32,7 @@
using Ringtoets.GrassCoverErosionOutwards.Data;
using Ringtoets.HeightStructures.Data;
using Ringtoets.Integration.Data;
+using Ringtoets.Integration.Data.Assembly;
using Ringtoets.Integration.Data.StandAlone;
using Ringtoets.Integration.Data.StandAlone.AssemblyFactories;
using Ringtoets.Integration.Forms.Properties;
Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Assembly/AssessmentSectionAssemblyFactoryTest.cs
===================================================================
diff -u
--- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Assembly/AssessmentSectionAssemblyFactoryTest.cs (revision 0)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Assembly/AssessmentSectionAssemblyFactoryTest.cs (revision e6dce9f10ba6b2e89fa58977a50fb7e4c9ceb647)
@@ -0,0 +1,359 @@
+// Copyright (C) Stichting Deltares 2017. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Core.Common.TestUtil;
+using NUnit.Framework;
+using Ringtoets.AssemblyTool.Data;
+using Ringtoets.AssemblyTool.KernelWrapper.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.Calculators.Assembly;
+using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators.Assembly;
+using Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.Contribution;
+using Ringtoets.Common.Data.Exceptions;
+using Ringtoets.Common.Data.FailureMechanism;
+using Ringtoets.Integration.Data.Assembly;
+
+namespace Ringtoets.Integration.Data.Test.Assembly
+{
+ [TestFixture]
+ public class AssessmentSectionAssemblyFactoryTest
+ {
+ [Test]
+ public void AssembleFailureMechanismsWithProbability_AssessmentSectionNull_ThrowsArgumentNullException()
+ {
+ // Call
+ TestDelegate call = () => AssessmentSectionAssemblyFactory.AssembleFailureMechanismsWithProbability(null);
+
+ // Assert
+ var exception = Assert.Throws(call);
+ Assert.AreEqual("assessmentSection", exception.ParamName);
+ }
+
+ [Test]
+ public void AssembleFailureMechanismsWithProbability_WithAssessmentSection_SetsInputOnCalculator()
+ {
+ // Setup
+ var random = new Random(21);
+ AssessmentSection assessmentSection = CreateAssessmentSection();
+
+ using (new AssemblyToolCalculatorFactoryConfig())
+ {
+ var calculatorfactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance;
+ FailureMechanismAssemblyCalculatorStub failureMechanismAssemblyCalculator = calculatorfactory.LastCreatedFailureMechanismAssemblyCalculator;
+ failureMechanismAssemblyCalculator.FailureMechanismAssemblyOutput = new FailureMechanismAssembly(random.NextDouble(),
+ random.NextEnumValue());
+
+ AssessmentSectionAssemblyCalculatorStub assessmentSectionAssemblyCalculator = calculatorfactory.LastCreatedAssessmentSectionAssemblyCalculator;
+
+ // Call
+ AssessmentSectionAssemblyFactory.AssembleFailureMechanismsWithProbability(assessmentSection);
+
+ // Assert
+ FailureMechanismContribution failureMechanismContribution = assessmentSection.FailureMechanismContribution;
+ Assert.AreEqual(failureMechanismContribution.LowerLimitNorm, assessmentSectionAssemblyCalculator.LowerLimitNormInput);
+ Assert.AreEqual(failureMechanismContribution.SignalingNorm, assessmentSectionAssemblyCalculator.SignalingNormInput);
+
+ AssertGroup1And2FailureMechanismInputs(assessmentSection,
+ failureMechanismAssemblyCalculator.FailureMechanismAssemblyOutput,
+ assessmentSectionAssemblyCalculator);
+ }
+ }
+
+ [Test]
+ public void AssembleFailureMechanismsWithProbability_AssemblyRan_ReturnsOutput()
+ {
+ // Setup
+ var random = new Random(21);
+ AssessmentSection assessmentSection = CreateAssessmentSection();
+
+ using (new AssemblyToolCalculatorFactoryConfig())
+ {
+ var calculatorfactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance;
+ AssessmentSectionAssemblyCalculatorStub calculator = calculatorfactory.LastCreatedAssessmentSectionAssemblyCalculator;
+ calculator.AssembleFailureMechanismsAssemblyOutput = new AssessmentSectionAssembly(random.NextDouble(),
+ random.NextEnumValue());
+
+ // Call
+ AssessmentSectionAssembly output = AssessmentSectionAssemblyFactory.AssembleFailureMechanismsWithProbability(assessmentSection);
+
+ // Assert
+ Assert.AreSame(calculator.AssembleFailureMechanismsAssemblyOutput, output);
+ }
+ }
+
+ [Test]
+ public void AssembleFailureMechanismsWithProbability_CalculatorThrowsException_ThrowsAssemblyException()
+ {
+ // Setup
+ using (new AssemblyToolCalculatorFactoryConfig())
+ {
+ var calculatorfactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance;
+ AssessmentSectionAssemblyCalculatorStub calculator = calculatorfactory.LastCreatedAssessmentSectionAssemblyCalculator;
+ calculator.ThrowExceptionOnCalculate = true;
+
+ // Call
+ TestDelegate call = () => AssessmentSectionAssemblyFactory.AssembleFailureMechanismsWithProbability(CreateAssessmentSection());
+
+ // Assert
+ var exception = Assert.Throws(call);
+ Exception innerException = exception.InnerException;
+ Assert.IsInstanceOf(innerException);
+ Assert.AreEqual(innerException.Message, exception.Message);
+ }
+ }
+
+ [Test]
+ public void AssemblyFailureMechanismsWithoutProbability_AssessmentSectionNull_ThrowsArgumentNullException()
+ {
+ // Call
+ TestDelegate call = () => AssessmentSectionAssemblyFactory.AssembleFailureMechanismsWithoutProbability(null);
+
+ // Assert
+ var exception = Assert.Throws(call);
+ Assert.AreEqual("assessmentSection", exception.ParamName);
+ }
+
+ [Test]
+ public void AssembleFailureMechanismsWithoutProbability_WithAssessmentSection_SetsInputOnCalculator()
+ {
+ // Setup
+ var random = new Random(21);
+ AssessmentSection assessmentSection = CreateAssessmentSection();
+
+ using (new AssemblyToolCalculatorFactoryConfig())
+ {
+ var calculatorfactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance;
+ FailureMechanismAssemblyCalculatorStub failureMechanismAssemblyCalculator = calculatorfactory.LastCreatedFailureMechanismAssemblyCalculator;
+ failureMechanismAssemblyCalculator.FailureMechanismAssemblyCategoryGroupOutput = random.NextEnumValue();
+
+ AssessmentSectionAssemblyCalculatorStub assessmentSectionAssemblyCalculator = calculatorfactory.LastCreatedAssessmentSectionAssemblyCalculator;
+
+ // Call
+ AssessmentSectionAssemblyFactory.AssembleFailureMechanismsWithoutProbability(assessmentSection);
+
+ // Assert
+ AssertGroup3And4FailureMechanismInputs(assessmentSection,
+ failureMechanismAssemblyCalculator.FailureMechanismAssemblyCategoryGroupOutput.Value,
+ assessmentSectionAssemblyCalculator);
+ }
+ }
+
+ [Test]
+ public void AssembleFailureMechanismsWithoutProbability_AssemblyRan_ReturnsOutput()
+ {
+ // Setup
+ var random = new Random(21);
+ AssessmentSection assessmentSection = CreateAssessmentSection();
+
+ using (new AssemblyToolCalculatorFactoryConfig())
+ {
+ var calculatorfactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance;
+ AssessmentSectionAssemblyCalculatorStub calculator = calculatorfactory.LastCreatedAssessmentSectionAssemblyCalculator;
+ calculator.AssembleFailureMechanismsAssemblyCategoryGroupOutput = random.NextEnumValue();
+
+ // Call
+ AssessmentSectionAssemblyCategoryGroup output = AssessmentSectionAssemblyFactory.AssembleFailureMechanismsWithoutProbability(assessmentSection);
+
+ // Assert
+ Assert.AreEqual(calculator.AssembleFailureMechanismsAssemblyCategoryGroupOutput, output);
+ }
+ }
+
+ [Test]
+ public void AssembleFailureMechanismsWithoutProbability_CalculatorThrowsException_ThrowsAssemblyException()
+ {
+ // Setup
+ using (new AssemblyToolCalculatorFactoryConfig())
+ {
+ var calculatorfactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance;
+ AssessmentSectionAssemblyCalculatorStub calculator = calculatorfactory.LastCreatedAssessmentSectionAssemblyCalculator;
+ calculator.ThrowExceptionOnCalculate = true;
+
+ // Call
+ TestDelegate call = () => AssessmentSectionAssemblyFactory.AssembleFailureMechanismsWithoutProbability(CreateAssessmentSection());
+
+ // Assert
+ var exception = Assert.Throws(call);
+ Exception innerException = exception.InnerException;
+ Assert.IsInstanceOf(innerException);
+ Assert.AreEqual(innerException.Message, exception.Message);
+ }
+ }
+
+ [Test]
+ public void AssembleAssessmentSection_AssessmentSectionNull_ThrowsArgumentNullException()
+ {
+ // Call
+ TestDelegate call = () => AssessmentSectionAssemblyFactory.AssembleAssessmentSection(null);
+
+ // Assert
+ var exception = Assert.Throws(call);
+ Assert.AreEqual("assessmentSection", exception.ParamName);
+ }
+
+ [Test]
+ public void AssembleAssessmentSection_WithAssessmentSection_SetsInputOnCalculator()
+ {
+ // Setup
+ var random = new Random(21);
+ AssessmentSection assessmentSection = CreateAssessmentSection();
+
+ using (new AssemblyToolCalculatorFactoryConfig())
+ {
+ var calculatorfactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance;
+ FailureMechanismAssemblyCalculatorStub failureMechanismAssemblyCalculator = calculatorfactory.LastCreatedFailureMechanismAssemblyCalculator;
+
+ AssessmentSectionAssemblyCalculatorStub assessmentSectionAssemblyCalculator = calculatorfactory.LastCreatedAssessmentSectionAssemblyCalculator;
+ assessmentSectionAssemblyCalculator.AssembleFailureMechanismsAssemblyOutput = new AssessmentSectionAssembly(random.NextDouble(),
+ random.NextEnumValue());
+ assessmentSectionAssemblyCalculator.AssembleFailureMechanismsAssemblyCategoryGroupOutput = random.NextEnumValue();
+
+ // Call
+ AssessmentSectionAssemblyFactory.AssembleAssessmentSection(assessmentSection);
+
+ // Assert
+ AssertGroup1And2FailureMechanismInputs(assessmentSection,
+ failureMechanismAssemblyCalculator.FailureMechanismAssemblyOutput,
+ assessmentSectionAssemblyCalculator);
+
+ AssertGroup3And4FailureMechanismInputs(assessmentSection,
+ failureMechanismAssemblyCalculator.FailureMechanismAssemblyCategoryGroupOutput.Value,
+ assessmentSectionAssemblyCalculator);
+
+ Assert.AreSame(assessmentSectionAssemblyCalculator.AssembleFailureMechanismsAssemblyOutput,
+ assessmentSectionAssemblyCalculator.FailureMechanismsWithProbabilityInput);
+ Assert.AreEqual(assessmentSectionAssemblyCalculator.AssembleFailureMechanismsAssemblyCategoryGroupOutput,
+ assessmentSectionAssemblyCalculator.FailureMechanismsWithoutProbabilityInput);
+ }
+ }
+
+ [Test]
+ public void AssembleAssessmentSection_AssemblyRan_ReturnsOutput()
+ {
+ // Setup
+ var random = new Random(21);
+ AssessmentSection assessmentSection = CreateAssessmentSection();
+
+ using (new AssemblyToolCalculatorFactoryConfig())
+ {
+ var calculatorfactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance;
+ AssessmentSectionAssemblyCalculatorStub calculator = calculatorfactory.LastCreatedAssessmentSectionAssemblyCalculator;
+ calculator.AssembleFailureMechanismsAssemblyOutput = new AssessmentSectionAssembly(random.NextDouble(),
+ random.NextEnumValue());
+ calculator.AssembleAssessmentSectionCategoryGroupOutput = random.NextEnumValue();
+
+ // Call
+ AssessmentSectionAssemblyCategoryGroup output = AssessmentSectionAssemblyFactory.AssembleAssessmentSection(assessmentSection);
+
+ // Assert
+ Assert.AreEqual(calculator.AssembleAssessmentSectionCategoryGroupOutput, output);
+ }
+ }
+
+ [Test]
+ public void AssembleAssessmentSection_CalculatorThrowsException_ThrowsAssemblyException()
+ {
+ // Setup
+ using (new AssemblyToolCalculatorFactoryConfig())
+ {
+ var calculatorfactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance;
+ AssessmentSectionAssemblyCalculatorStub calculator = calculatorfactory.LastCreatedAssessmentSectionAssemblyCalculator;
+ calculator.ThrowExceptionOnCalculate = true;
+
+ // Call
+ TestDelegate call = () => AssessmentSectionAssemblyFactory.AssembleAssessmentSection(CreateAssessmentSection());
+
+ // Assert
+ var exception = Assert.Throws(call);
+ Exception innerException = exception.InnerException;
+ Assert.IsInstanceOf(innerException);
+ Assert.AreEqual(innerException.Message, exception.Message);
+ }
+ }
+
+ private static void AssertGroup1And2FailureMechanismInputs(AssessmentSection assessmentSection,
+ FailureMechanismAssembly expectedFailureMechanismAssembly,
+ AssessmentSectionAssemblyCalculatorStub assessmentSectionAssemblyCalculator)
+ {
+ IEnumerable expectedFailureMechanisms = GetExpectedGroup1And2FailureMechanisms(assessmentSection);
+ IEnumerable failureMechanismAssemblyInput = assessmentSectionAssemblyCalculator.FailureMechanismAssemblyInput;
+ Assert.AreEqual(expectedFailureMechanisms.Count(), failureMechanismAssemblyInput.Count());
+ foreach (FailureMechanismAssembly failureMechanismAssembly in failureMechanismAssemblyInput)
+ {
+ Assert.AreEqual(expectedFailureMechanismAssembly.Group, failureMechanismAssembly.Group);
+ Assert.AreEqual(expectedFailureMechanismAssembly.Probability, failureMechanismAssembly.Probability);
+ }
+ }
+
+ private static void AssertGroup3And4FailureMechanismInputs(AssessmentSection assessmentSection,
+ FailureMechanismAssemblyCategoryGroup expectedAssemblyCategoryGroup,
+ AssessmentSectionAssemblyCalculatorStub assessmentSectionAssemblyCalculator)
+ {
+ IEnumerable expectedFailureMechanisms = GetExpectedGroup3And4FailureMechanisms(assessmentSection);
+ IEnumerable failureMechanismAssemblyInput =
+ assessmentSectionAssemblyCalculator.FailureMechanismAssemblyCategoryGroupInput;
+ Assert.AreEqual(expectedFailureMechanisms.Count(), failureMechanismAssemblyInput.Count());
+ Assert.IsTrue(failureMechanismAssemblyInput.All(i => i == expectedAssemblyCategoryGroup));
+ }
+
+ private static AssessmentSection CreateAssessmentSection()
+ {
+ var random = new Random(21);
+ return new AssessmentSection(random.NextEnumValue());
+ }
+
+ private static IEnumerable GetExpectedGroup1And2FailureMechanisms(AssessmentSection assessmentSection)
+ {
+ return new IFailureMechanism[]
+ {
+ assessmentSection.GrassCoverErosionInwards,
+ assessmentSection.HeightStructures,
+ assessmentSection.ClosingStructures,
+ assessmentSection.StabilityPointStructures,
+ assessmentSection.Piping,
+ assessmentSection.MacroStabilityInwards
+ };
+ }
+
+ private static IEnumerable GetExpectedGroup3And4FailureMechanisms(AssessmentSection assessmentSection)
+ {
+ return new IFailureMechanism[]
+ {
+ assessmentSection.StabilityStoneCover,
+ assessmentSection.WaveImpactAsphaltCover,
+ assessmentSection.GrassCoverErosionOutwards,
+ assessmentSection.DuneErosion,
+ assessmentSection.MacroStabilityOutwards,
+ assessmentSection.Microstability,
+ assessmentSection.WaterPressureAsphaltCover,
+ assessmentSection.GrassCoverSlipOffOutwards,
+ assessmentSection.GrassCoverSlipOffInwards,
+ assessmentSection.PipingStructure,
+ assessmentSection.StrengthStabilityLengthwiseConstruction,
+ assessmentSection.TechnicalInnovation
+ };
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Assembly/CombinedFailureMechanismSectionAssemblyResultTest.cs
===================================================================
diff -u
--- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Assembly/CombinedFailureMechanismSectionAssemblyResultTest.cs (revision 0)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Assembly/CombinedFailureMechanismSectionAssemblyResultTest.cs (revision e6dce9f10ba6b2e89fa58977a50fb7e4c9ceb647)
@@ -0,0 +1,160 @@
+// Copyright (C) Stichting Deltares 2017. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using Core.Common.TestUtil;
+using NUnit.Framework;
+using Ringtoets.AssemblyTool.Data;
+using Ringtoets.Integration.Data.Assembly;
+
+namespace Ringtoets.Integration.Data.Test.Assembly
+{
+ [TestFixture]
+ public class CombinedFailureMechanismSectionAssemblyResultTest
+ {
+ [Test]
+ public void Constructor_PropertiesNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var random = new Random(21);
+
+ // Call
+ TestDelegate call = () => new CombinedFailureMechanismSectionAssemblyResult(random.NextDouble(), random.NextDouble(),
+ random.NextEnumValue(), null);
+
+ // Assert
+ var exception = Assert.Throws(call);
+ Assert.AreEqual("properties", exception.ParamName);
+ }
+
+ [Test]
+ public void Constructor_WithEmptyConstructionProperties_ExpectedValues()
+ {
+ // Setup
+ var random = new Random(21);
+ double sectionStart = random.NextDouble();
+ double sectionEnd = random.NextDouble();
+ var totalResult = random.NextEnumValue();
+
+ // Call
+ var result = new CombinedFailureMechanismSectionAssemblyResult(sectionStart, sectionEnd, totalResult,
+ new CombinedFailureMechanismSectionAssemblyResult.ConstructionProperties());
+
+ // Assert
+ Assert.AreEqual(sectionStart, result.SectionStart);
+ Assert.AreEqual(sectionEnd, result.SectionEnd);
+ Assert.AreEqual(totalResult, result.TotalResult);
+ Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.None, result.Piping);
+ Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.None, result.GrassCoverErosionInwards);
+ Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.None, result.MacroStabilityInwards);
+ Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.None, result.MacroStabilityOutwards);
+ Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.None, result.Microstability);
+ Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.None, result.StabilityStoneCover);
+ Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.None, result.WaveImpactAsphaltCover);
+ Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.None, result.WaterPressureAsphaltCover);
+ Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.None, result.GrassCoverErosionOutwards);
+ Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.None, result.GrassCoverSlipOffOutwards);
+ Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.None, result.GrassCoverSlipOffInwards);
+ Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.None, result.HeightStructures);
+ Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.None, result.ClosingStructures);
+ Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.None, result.PipingStructures);
+ Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.None, result.StabilityPointStructures);
+ Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.None, result.StrengthStabilityLengthwise);
+ Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.None, result.DuneErosion);
+ Assert.AreEqual(FailureMechanismSectionAssemblyCategoryGroup.None, result.TechnicalInnovation);
+ }
+
+ [Test]
+ public void Constructor_WithConstructionProperties_ExpectedValues()
+ {
+ // Setup
+ var random = new Random(21);
+ double sectionStart = random.NextDouble();
+ double sectionEnd = random.NextDouble();
+ var totalResult = random.NextEnumValue();
+ var pipingResult = random.NextEnumValue();
+ var grassCoverErosionInwardsResult = random.NextEnumValue();
+ var macroStabilityInwardsResult = random.NextEnumValue();
+ var macroStabilityOutwardsResult = random.NextEnumValue();
+ var microstabilityResult = random.NextEnumValue();
+ var stabilityStoneCoverResult = random.NextEnumValue();
+ var waveImpactAsphaltCoverResult = random.NextEnumValue();
+ var waterPressureAsphaltCoverResult = random.NextEnumValue();
+ var grassCoverErosionOutwardsResult = random.NextEnumValue();
+ var grassCoverSlipOffOutwardsResult = random.NextEnumValue();
+ var grassCoverSlipOffInwardsResult = random.NextEnumValue();
+ var heightStructuresResult = random.NextEnumValue();
+ var closingStructuresResult = random.NextEnumValue();
+ var pipingStructuresResult = random.NextEnumValue();
+ var stabilityPointStructuresResult = random.NextEnumValue();
+ var strengthStabilityLengthwiseResult = random.NextEnumValue();
+ var duneErosionResult = random.NextEnumValue();
+ var technicalInnovationResult = random.NextEnumValue();
+
+ // Call
+ var result = new CombinedFailureMechanismSectionAssemblyResult(sectionStart, sectionEnd, totalResult,
+ new CombinedFailureMechanismSectionAssemblyResult.ConstructionProperties
+ {
+ Piping = pipingResult,
+ GrassCoverErosionInwards = grassCoverErosionInwardsResult,
+ MacroStabilityInwards = macroStabilityInwardsResult,
+ MacroStabilityOutwards = macroStabilityOutwardsResult,
+ Microstability = microstabilityResult,
+ StabilityStoneCover = stabilityStoneCoverResult,
+ WaveImpactAsphaltCover = waveImpactAsphaltCoverResult,
+ WaterPressureAsphaltCover = waterPressureAsphaltCoverResult,
+ GrassCoverErosionOutwards = grassCoverErosionOutwardsResult,
+ GrassCoverSlipOffOutwards = grassCoverSlipOffOutwardsResult,
+ GrassCoverSlipOffInwards = grassCoverSlipOffInwardsResult,
+ HeightStructures = heightStructuresResult,
+ ClosingStructures = closingStructuresResult,
+ PipingStructures = pipingStructuresResult,
+ StabilityPointStructures = stabilityPointStructuresResult,
+ StrengthStabilityLengthwise = strengthStabilityLengthwiseResult,
+ DuneErosion = duneErosionResult,
+ TechnicalInnovation = technicalInnovationResult
+ });
+
+ // Assert
+ Assert.AreEqual(sectionStart, result.SectionStart);
+ Assert.AreEqual(sectionEnd, result.SectionEnd);
+ Assert.AreEqual(totalResult, result.TotalResult);
+ Assert.AreEqual(pipingResult, result.Piping);
+ Assert.AreEqual(grassCoverErosionInwardsResult, result.GrassCoverErosionInwards);
+ Assert.AreEqual(macroStabilityInwardsResult, result.MacroStabilityInwards);
+ Assert.AreEqual(macroStabilityOutwardsResult, result.MacroStabilityOutwards);
+ Assert.AreEqual(microstabilityResult, result.Microstability);
+ Assert.AreEqual(stabilityStoneCoverResult, result.StabilityStoneCover);
+ Assert.AreEqual(waveImpactAsphaltCoverResult, result.WaveImpactAsphaltCover);
+ Assert.AreEqual(waterPressureAsphaltCoverResult, result.WaterPressureAsphaltCover);
+ Assert.AreEqual(grassCoverErosionOutwardsResult, result.GrassCoverErosionOutwards);
+ Assert.AreEqual(grassCoverSlipOffOutwardsResult, result.GrassCoverSlipOffOutwards);
+ Assert.AreEqual(grassCoverSlipOffInwardsResult, result.GrassCoverSlipOffInwards);
+ Assert.AreEqual(heightStructuresResult, result.HeightStructures);
+ Assert.AreEqual(closingStructuresResult, result.ClosingStructures);
+ Assert.AreEqual(pipingStructuresResult, result.PipingStructures);
+ Assert.AreEqual(stabilityPointStructuresResult, result.StabilityPointStructures);
+ Assert.AreEqual(strengthStabilityLengthwiseResult, result.StrengthStabilityLengthwise);
+ Assert.AreEqual(duneErosionResult, result.DuneErosion);
+ Assert.AreEqual(technicalInnovationResult, result.TechnicalInnovation);
+ }
+ }
+}
\ No newline at end of file
Fisheye: Tag e6dce9f10ba6b2e89fa58977a50fb7e4c9ceb647 refers to a dead (removed) revision in file `Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/AssessmentSectionAssemblyFactoryTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag e6dce9f10ba6b2e89fa58977a50fb7e4c9ceb647 refers to a dead (removed) revision in file `Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/CombinedFailureMechanismSectionAssemblyResultTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Ringtoets.Integration.Data.Test.csproj
===================================================================
diff -u -r092446a2a287098fe2fdd448f662a60cf6d42f89 -re6dce9f10ba6b2e89fa58977a50fb7e4c9ceb647
--- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Ringtoets.Integration.Data.Test.csproj (.../Ringtoets.Integration.Data.Test.csproj) (revision 092446a2a287098fe2fdd448f662a60cf6d42f89)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Ringtoets.Integration.Data.Test.csproj (.../Ringtoets.Integration.Data.Test.csproj) (revision e6dce9f10ba6b2e89fa58977a50fb7e4c9ceb647)
@@ -18,9 +18,9 @@
-
+
-
+