Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs =================================================================== diff -u -rc1d26c85ae973bcea8b126849492de2e93845b05 -reec9f1ac3701c6155c49101fcc9649d51ffdc319 --- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision c1d26c85ae973bcea8b126849492de2e93845b05) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision eec9f1ac3701c6155c49101fcc9649d51ffdc319) @@ -23,6 +23,7 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; +using Core.Common.Base; using Core.Common.Base.Data; using Core.Common.Base.Geometry; using Ringtoets.Common.Data.AssessmentSection; @@ -74,23 +75,28 @@ grassCoverErosionInwardsFailureMechanism.Calculations.OfType()); GrassCoverErosionOutwardsFailureMechanism grassCoverErosionOutwardsFailureMechanism = assessmentSection.GrassCoverErosionOutwards; + AddForeshoreProfiles(grassCoverErosionOutwardsFailureMechanism.ForeshoreProfiles); ConfigureGrassCoverErosionOutwardsFailureMechanism(grassCoverErosionOutwardsFailureMechanism); AddSections(grassCoverErosionOutwardsFailureMechanism); SetSectionResults(grassCoverErosionOutwardsFailureMechanism.SectionResults); StabilityStoneCoverFailureMechanism stabilityStoneCoverFailureMechanism = assessmentSection.StabilityStoneCover; + AddForeshoreProfiles(stabilityStoneCoverFailureMechanism.ForeshoreProfiles); ConfigureStabilityStoneCoverFailureMechanism(stabilityStoneCoverFailureMechanism, assessmentSection); AddSections(stabilityStoneCoverFailureMechanism); SetSectionResults(stabilityStoneCoverFailureMechanism.SectionResults); + WaveImpactAsphaltCoverFailureMechanism waveImpactAsphaltCoverFailureMechanism = assessmentSection.WaveImpactAsphaltCover; + AddForeshoreProfiles(waveImpactAsphaltCoverFailureMechanism.ForeshoreProfiles); + AddSections(waveImpactAsphaltCoverFailureMechanism); + SetSectionResults(waveImpactAsphaltCoverFailureMechanism.SectionResults); + AddSections(assessmentSection.MacrostabilityInwards); SetSectionResults(assessmentSection.MacrostabilityInwards.SectionResults); AddSections(assessmentSection.MacrostabilityOutwards); SetSectionResults(assessmentSection.MacrostabilityOutwards.SectionResults); AddSections(assessmentSection.Microstability); SetSectionResults(assessmentSection.Microstability.SectionResults); - AddSections(assessmentSection.WaveImpactAsphaltCover); - SetSectionResults(assessmentSection.WaveImpactAsphaltCover.SectionResults); AddSections(assessmentSection.WaterPressureAsphaltCover); SetSectionResults(assessmentSection.WaterPressureAsphaltCover.SectionResults); AddSections(assessmentSection.GrassCoverSlipOffInwards); @@ -349,18 +355,12 @@ { Name = "GEKB B" }); - failureMechanism.CalculationsGroup.Children.Add(new CalculationGroup - { - Name = "GEKB C", - Children = + failureMechanism.CalculationsGroup.Children.Add( + new GrassCoverErosionInwardsCalculation { - new GrassCoverErosionInwardsCalculation - { - Name = "Calculation 2", - Comments = "Comments about Calculation 2" - } - } - }); + Name = "Calculation 2", + Comments = "Comments about Calculation 2" + }); } private static void ConfigureGrassCoverErosionOutwardsFailureMechanism(GrassCoverErosionOutwardsFailureMechanism failureMechanism) @@ -375,37 +375,11 @@ { Name = "GCEO A" }); - failureMechanism.WaveConditionsCalculationGroup.Children.Add(new CalculationGroup - { - Name = "GCEO B", - Children = - { - new CalculationGroup - { - Name = "GCEO B 1", - } - } - }); } private static void ConfigureStabilityStoneCoverFailureMechanism(StabilityStoneCoverFailureMechanism failureMechanism, IAssessmentSection assessmentSection) { - var foreshoreProfile = new ForeshoreProfile( - new Point2D(2,5), new [] - { - new Point2D(1, 6), - new Point2D(8, 5), - }, new BreakWater(BreakWaterType.Caisson, 2.5), new ForeshoreProfile.ConstructionProperties - { - Name = "FP", - Orientation = 95.5, - X0 = 22.1 - }); - failureMechanism.ForeshoreProfiles.Add(foreshoreProfile); - - failureMechanism.ForeshoreProfiles.Add(new ForeshoreProfile( - new Point2D(2,5), Enumerable.Empty(), null, new ForeshoreProfile.ConstructionProperties())); - + ForeshoreProfile foreshoreProfile = failureMechanism.ForeshoreProfiles[0]; failureMechanism.WaveConditionsCalculationGroup.Children.Add(new CalculationGroup { Name = "GEKB A", @@ -440,17 +414,30 @@ { Name = "SSC A" }); - failureMechanism.WaveConditionsCalculationGroup.Children.Add(new CalculationGroup - { - Name = "SSC B", - Children = + failureMechanism.WaveConditionsCalculationGroup.Children.Add( + new StabilityStoneCoverWaveConditionsCalculation { - new CalculationGroup + Name = "Calculation 2", + Comments = "Comments for Calculation 2", + InputParameters = { - Name = "SSC B 1", + ForeshoreProfile = null, + HydraulicBoundaryLocation = assessmentSection.HydraulicBoundaryDatabase.Locations[0], + BreakWater = + { + Height = (RoundedDouble)(foreshoreProfile.BreakWater.Height + 0.1), + Type = BreakWaterType.Dam + }, + Orientation = foreshoreProfile.Orientation, + UseForeshore = false, + UseBreakWater = false, + UpperBoundaryRevetment = (RoundedDouble)12.3, + LowerBoundaryRevetment = (RoundedDouble)(-3.5), + UpperBoundaryWaterLevels = (RoundedDouble)13.3, + LowerBoundaryWaterLevels = (RoundedDouble)(-1.9), + StepSize = WaveConditionsInputStepSize.One } - } - }); + }); } private static void SetSectionResults(IEnumerable sectionResults) @@ -683,6 +670,23 @@ })); } + private static void AddForeshoreProfiles(ObservableList foreshoreProfiles) + { + foreshoreProfiles.Add(new ForeshoreProfile( + new Point2D(2, 5), new[] + { + new Point2D(1, 6), + new Point2D(8, 5), + }, new BreakWater(BreakWaterType.Caisson, 2.5), new ForeshoreProfile.ConstructionProperties + { + Name = "FP", + Orientation = 95.5, + X0 = 22.1 + })); + foreshoreProfiles.Add(new ForeshoreProfile( + new Point2D(2, 5), Enumerable.Empty(), null, new ForeshoreProfile.ConstructionProperties())); + } + private static RingtoetsPipingSurfaceLine GetSurfaceLine() { var surfaceLine = new RingtoetsPipingSurfaceLine