Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/AssessmentSectionHelper.cs =================================================================== diff -u -rb6c5a6803f86609b579a26f76efebe2ed658d829 -r1a6b52d906627a8e50b6675c1bbdee644854b959 --- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/AssessmentSectionHelper.cs (.../AssessmentSectionHelper.cs) (revision b6c5a6803f86609b579a26f76efebe2ed658d829) +++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/AssessmentSectionHelper.cs (.../AssessmentSectionHelper.cs) (revision 1a6b52d906627a8e50b6675c1bbdee644854b959) @@ -20,9 +20,11 @@ // All rights reserved. using System; +using System.Collections; using System.Linq; using Core.Common.Base.Data; using Core.Common.TestUtil; +using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Contribution; @@ -91,6 +93,58 @@ return testNormativeAssessmentLevel; } + /// + /// Gets a collection of containing an assessment level + /// configuration for all types of . + /// + /// A collection of , in which each item contains: + /// + /// the configured assessment section; + /// the hydraulic boundary location for which the assessment level output has been set; + /// the category type at stake; + /// the set assessment level (which makes it the "expected assessment level" given the combination + /// of the before-mentioned assessment section, hydraulic boundary location and category type). + /// + /// + public static IEnumerable GetAssessmentLevelConfigurationPerAssessmentSectionCategoryType() + { + var assessmentSection = new AssessmentSectionStub(); + var hydraulicBoundaryLocation = new TestHydraulicBoundaryLocation(); + + assessmentSection.SetHydraulicBoundaryLocationCalculations(new[] + { + hydraulicBoundaryLocation + }, true); + + yield return new TestCaseData( + assessmentSection, + hydraulicBoundaryLocation, + AssessmentSectionCategoryType.FactorizedSignalingNorm, + assessmentSection.WaterLevelCalculationsForFactorizedSignalingNorm.ElementAt(0).Output.Result + ).SetName("FactorizedSignalingNorm"); + + yield return new TestCaseData( + assessmentSection, + hydraulicBoundaryLocation, + AssessmentSectionCategoryType.SignalingNorm, + assessmentSection.WaterLevelCalculationsForSignalingNorm.ElementAt(0).Output.Result + ).SetName("SignalingNorm"); + + yield return new TestCaseData( + assessmentSection, + hydraulicBoundaryLocation, + AssessmentSectionCategoryType.LowerLimitNorm, + assessmentSection.WaterLevelCalculationsForLowerLimitNorm.ElementAt(0).Output.Result + ).SetName("LowerLimitNorm"); + + yield return new TestCaseData( + assessmentSection, + hydraulicBoundaryLocation, + AssessmentSectionCategoryType.FactorizedLowerLimitNorm, + assessmentSection.WaterLevelCalculationsForFactorizedLowerLimitNorm.ElementAt(0).Output.Result + ).SetName("FactorizedLowerLimitNorm"); + } + private static IFailureMechanism[] GetFailureMechanisms(IFailureMechanism failureMechanism) { return failureMechanism == null