Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectHelper.cs =================================================================== diff -u -r4a12b47ea94488f0716d7c61c6cefba235d7db48 -r0e4717786f2f1a865e48da9fde2089a789bfe02c --- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectHelper.cs (.../RingtoetsProjectHelper.cs) (revision 4a12b47ea94488f0716d7c61c6cefba235d7db48) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectHelper.cs (.../RingtoetsProjectHelper.cs) (revision 0e4717786f2f1a865e48da9fde2089a789bfe02c) @@ -221,15 +221,18 @@ AddSections(assessmentSection.MacrostabilityOutwards); SetSectionResults(assessmentSection.MacrostabilityOutwards.SectionResults); AddSections(assessmentSection.Microstability); + SetSectionResults(assessmentSection.Microstability.SectionResults); AddSections(assessmentSection.StabilityStoneCover); AddSections(assessmentSection.WaveImpactAsphaltCover); SetSectionResults(assessmentSection.WaveImpactAsphaltCover.SectionResults); AddSections(assessmentSection.WaterPressureAsphaltCover); SetSectionResults(assessmentSection.WaterPressureAsphaltCover.SectionResults); AddSections(assessmentSection.GrassCoverErosionOutwards); SetSectionResults(assessmentSection.GrassCoverErosionOutwards.SectionResults); - AddSections(assessmentSection.GrassCoverSlipOffOutwards); AddSections(assessmentSection.GrassCoverSlipOffInwards); + SetSectionResults(assessmentSection.GrassCoverSlipOffInwards.SectionResults); + AddSections(assessmentSection.GrassCoverSlipOffOutwards); + SetSectionResults(assessmentSection.GrassCoverSlipOffOutwards.SectionResults); AddSections(assessmentSection.HeightStructures); SetSectionResults(assessmentSection.HeightStructures.SectionResults); AddSections(assessmentSection.ClosingStructure); @@ -238,6 +241,7 @@ AddSections(assessmentSection.StrengthStabilityLengthwiseConstruction); SetSectionResults(assessmentSection.StrengthStabilityLengthwiseConstruction.SectionResults); AddSections(assessmentSection.PipingStructure); + SetSectionResults(assessmentSection.PipingStructure.SectionResults); AddSections(assessmentSection.DuneErosion); AddSections(assessmentSection.TechnicalInnovation); SetSectionResults(assessmentSection.TechnicalInnovation.SectionResults); @@ -362,6 +366,58 @@ } } + private static void SetSectionResults(IEnumerable sectionResults) + { + var random = new Random(21); + foreach (var sectionResult in sectionResults) + { + var randomLayer2AResult = (AssessmentLayerTwoAResult) random.Next(0, Enum.GetValues(typeof(AssessmentLayerTwoAResult)).Length); + + sectionResult.AssessmentLayerOne = Convert.ToBoolean(random.Next(0, 2)); + sectionResult.AssessmentLayerTwoA = randomLayer2AResult; + sectionResult.AssessmentLayerThree = (RoundedDouble)random.NextDouble(); + } + } + + private static void SetSectionResults(IEnumerable sectionResults) + { + var random = new Random(21); + foreach (var sectionResult in sectionResults) + { + var randomLayer2AResult = (AssessmentLayerTwoAResult) random.Next(0, Enum.GetValues(typeof(AssessmentLayerTwoAResult)).Length); + + sectionResult.AssessmentLayerOne = Convert.ToBoolean(random.Next(0, 2)); + sectionResult.AssessmentLayerTwoA = randomLayer2AResult; + sectionResult.AssessmentLayerThree = (RoundedDouble)random.NextDouble(); + } + } + + private static void SetSectionResults(IEnumerable sectionResults) + { + var random = new Random(21); + foreach (var sectionResult in sectionResults) + { + var randomLayer2AResult = (AssessmentLayerTwoAResult) random.Next(0, Enum.GetValues(typeof(AssessmentLayerTwoAResult)).Length); + + sectionResult.AssessmentLayerOne = Convert.ToBoolean(random.Next(0, 2)); + sectionResult.AssessmentLayerTwoA = randomLayer2AResult; + sectionResult.AssessmentLayerThree = (RoundedDouble)random.NextDouble(); + } + } + + private static void SetSectionResults(IEnumerable sectionResults) + { + var random = new Random(21); + foreach (var sectionResult in sectionResults) + { + var randomLayer2AResult = (AssessmentLayerTwoAResult) random.Next(0, Enum.GetValues(typeof(AssessmentLayerTwoAResult)).Length); + + sectionResult.AssessmentLayerOne = Convert.ToBoolean(random.Next(0, 2)); + sectionResult.AssessmentLayerTwoA = randomLayer2AResult; + sectionResult.AssessmentLayerThree = (RoundedDouble)random.NextDouble(); + } + } + private static void AddSections(IFailureMechanism failureMechanism) { failureMechanism.AddSection(new FailureMechanismSection("section 1", new[]