Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectHelper.cs =================================================================== diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r15583423fc85999780f51034039e46af720211ab --- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectHelper.cs (.../RingtoetsProjectHelper.cs) (revision ce94b8228bc7e51779b3754217580f13cb35e475) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectHelper.cs (.../RingtoetsProjectHelper.cs) (revision 15583423fc85999780f51034039e46af720211ab) @@ -51,9 +51,71 @@ /// A new complete instance of . public static Project GetFullTestProject() { - ReferenceLine referenceLine = GetReferenceLine(); - Point2D[] referenceLineGeometryPoints = referenceLine.Points.ToArray(); + var assessmentSection = new AssessmentSection(AssessmentSectionComposition.Dike) + { + Name = "assessmentSection", + HydraulicBoundaryDatabase = GetHydraulicBoundaryDatabase(), + ReferenceLine = GetReferenceLine() + }; + PipingFailureMechanism pipingFailureMechanism = assessmentSection.PipingFailureMechanism; + ConfigurePipingFailureMechanism(pipingFailureMechanism, assessmentSection); + AddSections(pipingFailureMechanism); + SetSectionResults(pipingFailureMechanism.SectionResults); + GrassCoverErosionInwardsFailureMechanism grassCoverErosionInwardsFailureMechanism = assessmentSection.GrassCoverErosionInwards; + ConfigureGrassCoverErosionInwardsFailureMechanism(grassCoverErosionInwardsFailureMechanism); + AddSections(grassCoverErosionInwardsFailureMechanism); + SetSectionResults(grassCoverErosionInwardsFailureMechanism.SectionResults); + + AddSections(assessmentSection.MacrostabilityInwards); + SetSectionResults(assessmentSection.MacrostabilityInwards.SectionResults); + AddSections(assessmentSection.MacrostabilityOutwards); + SetSectionResults(assessmentSection.MacrostabilityOutwards.SectionResults); + AddSections(assessmentSection.Microstability); + SetSectionResults(assessmentSection.Microstability.SectionResults); + AddSections(assessmentSection.StabilityStoneCover); + SetSectionResults(assessmentSection.StabilityStoneCover.SectionResults); + AddSections(assessmentSection.WaveImpactAsphaltCover); + SetSectionResults(assessmentSection.WaveImpactAsphaltCover.SectionResults); + AddSections(assessmentSection.WaterPressureAsphaltCover); + SetSectionResults(assessmentSection.WaterPressureAsphaltCover.SectionResults); + AddSections(assessmentSection.GrassCoverErosionOutwards); + SetSectionResults(assessmentSection.GrassCoverErosionOutwards.SectionResults); + AddSections(assessmentSection.GrassCoverSlipOffInwards); + SetSectionResults(assessmentSection.GrassCoverSlipOffInwards.SectionResults); + AddSections(assessmentSection.GrassCoverSlipOffOutwards); + SetSectionResults(assessmentSection.GrassCoverSlipOffOutwards.SectionResults); + AddSections(assessmentSection.HeightStructures); + SetSectionResults(assessmentSection.HeightStructures.SectionResults); + AddSections(assessmentSection.ClosingStructure); + SetSectionResults(assessmentSection.ClosingStructure.SectionResults); + AddSections(assessmentSection.StrengthStabilityPointConstruction); + SetSectionResults(assessmentSection.StrengthStabilityPointConstruction.SectionResults); + AddSections(assessmentSection.StrengthStabilityLengthwiseConstruction); + SetSectionResults(assessmentSection.StrengthStabilityLengthwiseConstruction.SectionResults); + AddSections(assessmentSection.PipingStructure); + SetSectionResults(assessmentSection.PipingStructure.SectionResults); + AddSections(assessmentSection.DuneErosion); + SetSectionResults(assessmentSection.DuneErosion.SectionResults); + AddSections(assessmentSection.TechnicalInnovation); + SetSectionResults(assessmentSection.TechnicalInnovation.SectionResults); + + var fullTestProject = new Project + { + Name = "tempProjectFile", + Description = "description", + Items = + { + assessmentSection + } + }; + return fullTestProject; + } + + private static void ConfigurePipingFailureMechanism(PipingFailureMechanism pipingFailureMechanism, AssessmentSection assessmentSection) + { + var referenceLineGeometryPoints = assessmentSection.ReferenceLine.Points.ToArray(); + PipingSoilProfile pipingSoilProfile = new TestPipingSoilProfile(); PipingSoilLayer pipingSoilLayer = pipingSoilProfile.Layers.First(); pipingSoilLayer.AbovePhreaticLevel = 1.1; @@ -62,16 +124,7 @@ pipingSoilLayer.Color = Color.HotPink; pipingSoilLayer.MaterialName = "HotPinkLayer"; - var assessmentSection = new AssessmentSection(AssessmentSectionComposition.Dike) - { - Name = "assessmentSection", - HydraulicBoundaryDatabase = GetHydraulicBoundaryDatabase(), - ReferenceLine = referenceLine, - PipingFailureMechanism = - { - StochasticSoilModels = - { - new StochasticSoilModel(-1, "modelName", "modelSegmentName") + pipingFailureMechanism.StochasticSoilModels.Add(new StochasticSoilModel(-1, "modelName", "modelSegmentName") { Geometry = { @@ -90,15 +143,9 @@ SoilProfile = new TestPipingSoilProfile() } } - } - }, - SurfaceLines = - { - GetSurfaceLine() - } - } - }; - PipingFailureMechanism pipingFailureMechanism = assessmentSection.PipingFailureMechanism; + }); + pipingFailureMechanism.SurfaceLines.Add(GetSurfaceLine()); + CalculationGroup pipingCalculationGroup = pipingFailureMechanism.CalculationsGroup; pipingCalculationGroup.Children.Add(new CalculationGroup { @@ -205,55 +252,11 @@ Output = null, SemiProbabilisticOutput = null }); + } - var fullTestProject = new Project - { - Name = "tempProjectFile", - Description = "description", - Items = - { - assessmentSection - } - }; - - AddSections(pipingFailureMechanism); - SetSectionResults(pipingFailureMechanism.SectionResults); - AddSections(assessmentSection.GrassCoverErosionInwards); - SetSectionResults(assessmentSection.GrassCoverErosionInwards.SectionResults); - AddSections(assessmentSection.MacrostabilityInwards); - SetSectionResults(assessmentSection.MacrostabilityInwards.SectionResults); - AddSections(assessmentSection.MacrostabilityOutwards); - SetSectionResults(assessmentSection.MacrostabilityOutwards.SectionResults); - AddSections(assessmentSection.Microstability); - SetSectionResults(assessmentSection.Microstability.SectionResults); - AddSections(assessmentSection.StabilityStoneCover); - SetSectionResults(assessmentSection.StabilityStoneCover.SectionResults); - AddSections(assessmentSection.WaveImpactAsphaltCover); - SetSectionResults(assessmentSection.WaveImpactAsphaltCover.SectionResults); - AddSections(assessmentSection.WaterPressureAsphaltCover); - SetSectionResults(assessmentSection.WaterPressureAsphaltCover.SectionResults); - AddSections(assessmentSection.GrassCoverErosionOutwards); - SetSectionResults(assessmentSection.GrassCoverErosionOutwards.SectionResults); - AddSections(assessmentSection.GrassCoverSlipOffInwards); - SetSectionResults(assessmentSection.GrassCoverSlipOffInwards.SectionResults); - AddSections(assessmentSection.GrassCoverSlipOffOutwards); - SetSectionResults(assessmentSection.GrassCoverSlipOffOutwards.SectionResults); - AddSections(assessmentSection.HeightStructures); - SetSectionResults(assessmentSection.HeightStructures.SectionResults); - AddSections(assessmentSection.ClosingStructure); - SetSectionResults(assessmentSection.ClosingStructure.SectionResults); - AddSections(assessmentSection.StrengthStabilityPointConstruction); - SetSectionResults(assessmentSection.StrengthStabilityPointConstruction.SectionResults); - AddSections(assessmentSection.StrengthStabilityLengthwiseConstruction); - SetSectionResults(assessmentSection.StrengthStabilityLengthwiseConstruction.SectionResults); - AddSections(assessmentSection.PipingStructure); - SetSectionResults(assessmentSection.PipingStructure.SectionResults); - AddSections(assessmentSection.DuneErosion); - SetSectionResults(assessmentSection.DuneErosion.SectionResults); - AddSections(assessmentSection.TechnicalInnovation); - SetSectionResults(assessmentSection.TechnicalInnovation.SectionResults); - - return fullTestProject; + private static void ConfigureGrassCoverErosionInwardsFailureMechanism(GrassCoverErosionInwardsFailureMechanism failureMechanism) + { + failureMechanism.GeneralInput.N = 15; } private static void SetSectionResults(IEnumerable sectionResults)