Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil.Test/HeightStructurePermutationHelperTest.cs =================================================================== diff -u -rb869895cec4a159381b5d2db15b48744dd66ab60 -r62fd869059a7705683e46d4bf9c6566fa7d66218 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil.Test/HeightStructurePermutationHelperTest.cs (.../HeightStructurePermutationHelperTest.cs) (revision b869895cec4a159381b5d2db15b48744dd66ab60) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil.Test/HeightStructurePermutationHelperTest.cs (.../HeightStructurePermutationHelperTest.cs) (revision 62fd869059a7705683e46d4bf9c6566fa7d66218) @@ -39,30 +39,36 @@ List testCaseDatas = HeightStructurePermutationHelper.DifferentHeightStructures("A", "B").ToList(); // Assert - Assert.AreEqual(11, testCaseDatas.Count); + Assert.AreEqual(17, testCaseDatas.Count); IEnumerable testNames = testCaseDatas .Select(tcd => tcd.TestName) .ToList(); - Assert.AreEqual(11, testNames.Distinct().Count()); + Assert.AreEqual(17, testNames.Distinct().Count()); Assert.IsTrue(testNames.All(tn => tn.StartsWith("A_"))); Assert.IsTrue(testNames.All(tn => tn.EndsWith("_B"))); IEnumerable structures = testCaseDatas .Select(tcd => tcd.Arguments[0]) .OfType() .ToList(); - Assert.AreEqual(11, structures.Count()); + Assert.AreEqual(17, structures.Count()); differentStructures.Add(structures.Single(s => !s.Id.Equals(referenceStructure.Id))); differentStructures.Add(structures.Single(s => !s.Name.Equals(referenceStructure.Name))); differentStructures.Add(structures.Single(s => !s.Location.Equals(referenceStructure.Location))); - differentStructures.Add(structures.Single(s => !s.AllowedLevelIncreaseStorage.Equals(referenceStructure.AllowedLevelIncreaseStorage))); - differentStructures.Add(structures.Single(s => !s.CriticalOvertoppingDischarge.Equals(referenceStructure.CriticalOvertoppingDischarge))); - differentStructures.Add(structures.Single(s => !s.FlowWidthAtBottomProtection.Equals(referenceStructure.FlowWidthAtBottomProtection))); - differentStructures.Add(structures.Single(s => !s.LevelCrestStructure.Equals(referenceStructure.LevelCrestStructure))); - differentStructures.Add(structures.Single(s => !s.StorageStructureArea.Equals(referenceStructure.StorageStructureArea))); - differentStructures.Add(structures.Single(s => !s.WidthFlowApertures.Equals(referenceStructure.WidthFlowApertures))); + differentStructures.Add(structures.Single(s => !s.AllowedLevelIncreaseStorage.Mean.Equals(referenceStructure.AllowedLevelIncreaseStorage.Mean))); + differentStructures.Add(structures.Single(s => !s.AllowedLevelIncreaseStorage.StandardDeviation.Equals(referenceStructure.AllowedLevelIncreaseStorage.StandardDeviation))); + differentStructures.Add(structures.Single(s => !s.CriticalOvertoppingDischarge.Mean.Equals(referenceStructure.CriticalOvertoppingDischarge.Mean))); + differentStructures.Add(structures.Single(s => !s.CriticalOvertoppingDischarge.CoefficientOfVariation.Equals(referenceStructure.CriticalOvertoppingDischarge.CoefficientOfVariation))); + differentStructures.Add(structures.Single(s => !s.FlowWidthAtBottomProtection.Mean.Equals(referenceStructure.FlowWidthAtBottomProtection.Mean))); + differentStructures.Add(structures.Single(s => !s.FlowWidthAtBottomProtection.StandardDeviation.Equals(referenceStructure.FlowWidthAtBottomProtection.StandardDeviation))); + differentStructures.Add(structures.Single(s => !s.LevelCrestStructure.Mean.Equals(referenceStructure.LevelCrestStructure.Mean))); + differentStructures.Add(structures.Single(s => !s.LevelCrestStructure.StandardDeviation.Equals(referenceStructure.LevelCrestStructure.StandardDeviation))); + differentStructures.Add(structures.Single(s => !s.StorageStructureArea.Mean.Equals(referenceStructure.StorageStructureArea.Mean))); + differentStructures.Add(structures.Single(s => !s.StorageStructureArea.CoefficientOfVariation.Equals(referenceStructure.StorageStructureArea.CoefficientOfVariation))); + differentStructures.Add(structures.Single(s => !s.WidthFlowApertures.Mean.Equals(referenceStructure.WidthFlowApertures.Mean))); + differentStructures.Add(structures.Single(s => !s.WidthFlowApertures.StandardDeviation.Equals(referenceStructure.WidthFlowApertures.StandardDeviation))); differentStructures.Add(structures.Single(s => !s.FailureProbabilityStructureWithErosion.Equals(referenceStructure.FailureProbabilityStructureWithErosion))); differentStructures.Add(structures.Single(s => !s.StructureNormalOrientation.Equals(referenceStructure.StructureNormalOrientation))); - Assert.AreEqual(11, differentStructures.Distinct().Count()); + Assert.AreEqual(17, differentStructures.Distinct().Count()); } [Test] @@ -76,30 +82,36 @@ List testCaseDatas = HeightStructurePermutationHelper.DifferentHeightStructuresWithSameId("A", "B").ToList(); // Assert - Assert.AreEqual(10, testCaseDatas.Count); + Assert.AreEqual(16, testCaseDatas.Count); IEnumerable testNames = testCaseDatas .Select(tcd => tcd.TestName) .ToList(); - Assert.AreEqual(10, testNames.Distinct().Count()); + Assert.AreEqual(16, testNames.Distinct().Count()); Assert.IsTrue(testNames.All(tn => tn.StartsWith("A_"))); Assert.IsTrue(testNames.All(tn => tn.EndsWith("_B"))); IEnumerable structures = testCaseDatas .Select(tcd => tcd.Arguments[0]) .OfType() .ToList(); - Assert.AreEqual(10, structures.Count()); + Assert.AreEqual(16, structures.Count()); Assert.IsTrue(structures.All(s => s.Id == referenceStructure.Id)); differentStructures.Add(structures.Single(s => !s.Name.Equals(referenceStructure.Name))); differentStructures.Add(structures.Single(s => !s.Location.Equals(referenceStructure.Location))); - differentStructures.Add(structures.Single(s => !s.AllowedLevelIncreaseStorage.Equals(referenceStructure.AllowedLevelIncreaseStorage))); - differentStructures.Add(structures.Single(s => !s.CriticalOvertoppingDischarge.Equals(referenceStructure.CriticalOvertoppingDischarge))); - differentStructures.Add(structures.Single(s => !s.FlowWidthAtBottomProtection.Equals(referenceStructure.FlowWidthAtBottomProtection))); - differentStructures.Add(structures.Single(s => !s.LevelCrestStructure.Equals(referenceStructure.LevelCrestStructure))); - differentStructures.Add(structures.Single(s => !s.StorageStructureArea.Equals(referenceStructure.StorageStructureArea))); - differentStructures.Add(structures.Single(s => !s.WidthFlowApertures.Equals(referenceStructure.WidthFlowApertures))); + differentStructures.Add(structures.Single(s => !s.AllowedLevelIncreaseStorage.Mean.Equals(referenceStructure.AllowedLevelIncreaseStorage.Mean))); + differentStructures.Add(structures.Single(s => !s.AllowedLevelIncreaseStorage.StandardDeviation.Equals(referenceStructure.AllowedLevelIncreaseStorage.StandardDeviation))); + differentStructures.Add(structures.Single(s => !s.CriticalOvertoppingDischarge.Mean.Equals(referenceStructure.CriticalOvertoppingDischarge.Mean))); + differentStructures.Add(structures.Single(s => !s.CriticalOvertoppingDischarge.CoefficientOfVariation.Equals(referenceStructure.CriticalOvertoppingDischarge.CoefficientOfVariation))); + differentStructures.Add(structures.Single(s => !s.FlowWidthAtBottomProtection.Mean.Equals(referenceStructure.FlowWidthAtBottomProtection.Mean))); + differentStructures.Add(structures.Single(s => !s.FlowWidthAtBottomProtection.StandardDeviation.Equals(referenceStructure.FlowWidthAtBottomProtection.StandardDeviation))); + differentStructures.Add(structures.Single(s => !s.LevelCrestStructure.Mean.Equals(referenceStructure.LevelCrestStructure.Mean))); + differentStructures.Add(structures.Single(s => !s.LevelCrestStructure.StandardDeviation.Equals(referenceStructure.LevelCrestStructure.StandardDeviation))); + differentStructures.Add(structures.Single(s => !s.StorageStructureArea.Mean.Equals(referenceStructure.StorageStructureArea.Mean))); + differentStructures.Add(structures.Single(s => !s.StorageStructureArea.CoefficientOfVariation.Equals(referenceStructure.StorageStructureArea.CoefficientOfVariation))); + differentStructures.Add(structures.Single(s => !s.WidthFlowApertures.Mean.Equals(referenceStructure.WidthFlowApertures.Mean))); + differentStructures.Add(structures.Single(s => !s.WidthFlowApertures.StandardDeviation.Equals(referenceStructure.WidthFlowApertures.StandardDeviation))); differentStructures.Add(structures.Single(s => !s.FailureProbabilityStructureWithErosion.Equals(referenceStructure.FailureProbabilityStructureWithErosion))); differentStructures.Add(structures.Single(s => !s.StructureNormalOrientation.Equals(referenceStructure.StructureNormalOrientation))); - Assert.AreEqual(10, differentStructures.Distinct().Count()); + Assert.AreEqual(16, differentStructures.Distinct().Count()); } [Test] @@ -113,30 +125,36 @@ List testCaseDatas = HeightStructurePermutationHelper.DifferentHeightStructuresWithSameIdNameAndLocation("C", "D").ToList(); // Assert - Assert.AreEqual(8, testCaseDatas.Count); + Assert.AreEqual(14, testCaseDatas.Count); IEnumerable testNames = testCaseDatas .Select(tcd => tcd.TestName) .ToList(); - Assert.AreEqual(8, testNames.Distinct().Count()); + Assert.AreEqual(14, testNames.Distinct().Count()); Assert.IsTrue(testNames.All(tn => tn.StartsWith("C_"))); Assert.IsTrue(testNames.All(tn => tn.EndsWith("_D"))); IEnumerable structures = testCaseDatas .Select(tcd => tcd.Arguments[0]) .OfType() .ToList(); - Assert.AreEqual(8, structures.Count()); + Assert.AreEqual(14, structures.Count()); Assert.IsTrue(structures.All(s => s.Id == referenceStructure.Id)); Assert.IsTrue(structures.All(s => s.Name == referenceStructure.Name)); Assert.IsTrue(structures.All(s => s.Location.Equals(referenceStructure.Location))); - differentStructures.Add(structures.Single(s => !s.AllowedLevelIncreaseStorage.Equals(referenceStructure.AllowedLevelIncreaseStorage))); - differentStructures.Add(structures.Single(s => !s.CriticalOvertoppingDischarge.Equals(referenceStructure.CriticalOvertoppingDischarge))); - differentStructures.Add(structures.Single(s => !s.FlowWidthAtBottomProtection.Equals(referenceStructure.FlowWidthAtBottomProtection))); - differentStructures.Add(structures.Single(s => !s.LevelCrestStructure.Equals(referenceStructure.LevelCrestStructure))); - differentStructures.Add(structures.Single(s => !s.StorageStructureArea.Equals(referenceStructure.StorageStructureArea))); - differentStructures.Add(structures.Single(s => !s.WidthFlowApertures.Equals(referenceStructure.WidthFlowApertures))); + differentStructures.Add(structures.Single(s => !s.AllowedLevelIncreaseStorage.Mean.Equals(referenceStructure.AllowedLevelIncreaseStorage.Mean))); + differentStructures.Add(structures.Single(s => !s.AllowedLevelIncreaseStorage.StandardDeviation.Equals(referenceStructure.AllowedLevelIncreaseStorage.StandardDeviation))); + differentStructures.Add(structures.Single(s => !s.CriticalOvertoppingDischarge.Mean.Equals(referenceStructure.CriticalOvertoppingDischarge.Mean))); + differentStructures.Add(structures.Single(s => !s.CriticalOvertoppingDischarge.CoefficientOfVariation.Equals(referenceStructure.CriticalOvertoppingDischarge.CoefficientOfVariation))); + differentStructures.Add(structures.Single(s => !s.FlowWidthAtBottomProtection.Mean.Equals(referenceStructure.FlowWidthAtBottomProtection.Mean))); + differentStructures.Add(structures.Single(s => !s.FlowWidthAtBottomProtection.StandardDeviation.Equals(referenceStructure.FlowWidthAtBottomProtection.StandardDeviation))); + differentStructures.Add(structures.Single(s => !s.LevelCrestStructure.Mean.Equals(referenceStructure.LevelCrestStructure.Mean))); + differentStructures.Add(structures.Single(s => !s.LevelCrestStructure.StandardDeviation.Equals(referenceStructure.LevelCrestStructure.StandardDeviation))); + differentStructures.Add(structures.Single(s => !s.StorageStructureArea.Mean.Equals(referenceStructure.StorageStructureArea.Mean))); + differentStructures.Add(structures.Single(s => !s.StorageStructureArea.CoefficientOfVariation.Equals(referenceStructure.StorageStructureArea.CoefficientOfVariation))); + differentStructures.Add(structures.Single(s => !s.WidthFlowApertures.Mean.Equals(referenceStructure.WidthFlowApertures.Mean))); + differentStructures.Add(structures.Single(s => !s.WidthFlowApertures.StandardDeviation.Equals(referenceStructure.WidthFlowApertures.StandardDeviation))); differentStructures.Add(structures.Single(s => !s.FailureProbabilityStructureWithErosion.Equals(referenceStructure.FailureProbabilityStructureWithErosion))); differentStructures.Add(structures.Single(s => !s.StructureNormalOrientation.Equals(referenceStructure.StructureNormalOrientation))); - Assert.AreEqual(8, differentStructures.Distinct().Count()); + Assert.AreEqual(14, differentStructures.Distinct().Count()); } } } \ No newline at end of file Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil/HeightStructurePermutationHelper.cs =================================================================== diff -u -r4d4b20488a5b3b562c3745f46975a848761c3a19 -r62fd869059a7705683e46d4bf9c6566fa7d66218 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil/HeightStructurePermutationHelper.cs (.../HeightStructurePermutationHelper.cs) (revision 4d4b20488a5b3b562c3745f46975a848761c3a19) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil/HeightStructurePermutationHelper.cs (.../HeightStructurePermutationHelper.cs) (revision 62fd869059a7705683e46d4bf9c6566fa7d66218) @@ -118,55 +118,97 @@ { AllowedLevelIncreaseStorage = { - Mean = random.NextRoundedDouble(), + Mean = random.NextRoundedDouble() + } + }).SetName($"{targetName}_DifferentAllowedLevelIncreaseStorageMean_{testResultDescription}"); + + yield return new TestCaseData(new TestHeightStructure + { + AllowedLevelIncreaseStorage = + { StandardDeviation = random.NextRoundedDouble() } - }).SetName($"{targetName}_DifferentAllowedLevelIncreaseStorage_{testResultDescription}"); + }).SetName($"{targetName}_DifferentAllowedLevelIncreaseStorageStandardDeviation_{testResultDescription}"); yield return new TestCaseData(new TestHeightStructure { CriticalOvertoppingDischarge = { - Mean = random.NextRoundedDouble(), + Mean = random.NextRoundedDouble() + } + }).SetName($"{targetName}_DifferentCriticalOvertoppingDischargeMean_{testResultDescription}"); + + yield return new TestCaseData(new TestHeightStructure + { + CriticalOvertoppingDischarge = + { CoefficientOfVariation = random.NextRoundedDouble() } - }).SetName($"{targetName}_DifferentCriticalOvertoppingDischarge_{testResultDescription}"); + }).SetName($"{targetName}_DifferentCriticalOvertoppingDischargeCoefficientOfVariation_{testResultDescription}"); yield return new TestCaseData(new TestHeightStructure { FlowWidthAtBottomProtection = { - Mean = random.NextRoundedDouble(), + Mean = random.NextRoundedDouble() + } + }).SetName($"{targetName}_DifferentFlowWidthAtBottomProtectionMean_{testResultDescription}"); + + yield return new TestCaseData(new TestHeightStructure + { + FlowWidthAtBottomProtection = + { StandardDeviation = random.NextRoundedDouble() } - }).SetName($"{targetName}_DifferentFlowWidthAtBottomProtection_{testResultDescription}"); + }).SetName($"{targetName}_DifferentFlowWidthAtBottomProtectionStandardDeviation_{testResultDescription}"); yield return new TestCaseData(new TestHeightStructure { LevelCrestStructure = { - Mean = random.NextRoundedDouble(), + Mean = random.NextRoundedDouble() + } + }).SetName($"{targetName}_DifferentLevelCrestStructureMean_{testResultDescription}"); + + yield return new TestCaseData(new TestHeightStructure + { + LevelCrestStructure = + { StandardDeviation = random.NextRoundedDouble() } - }).SetName($"{targetName}_DifferentLevelCrestStructure_{testResultDescription}"); + }).SetName($"{targetName}_DifferentLevelCrestStructureStandardDeviation_{testResultDescription}"); yield return new TestCaseData(new TestHeightStructure { StorageStructureArea = { - Mean = random.NextRoundedDouble(), + Mean = random.NextRoundedDouble() + } + }).SetName($"{targetName}_DifferentStorageStructureAreaMean_{testResultDescription}"); + + yield return new TestCaseData(new TestHeightStructure + { + StorageStructureArea = + { CoefficientOfVariation = random.NextRoundedDouble() } - }).SetName($"{targetName}_DifferentStorageStructureArea_{testResultDescription}"); + }).SetName($"{targetName}_DifferentStorageStructureAreaCoefficientOfVariation_{testResultDescription}"); yield return new TestCaseData(new TestHeightStructure { WidthFlowApertures = { - Mean = random.NextRoundedDouble(), + Mean = random.NextRoundedDouble() + } + }).SetName($"{targetName}_DifferentWidthFlowAperturesMean_{testResultDescription}"); + + yield return new TestCaseData(new TestHeightStructure + { + WidthFlowApertures = + { StandardDeviation = random.NextRoundedDouble() } - }).SetName($"{targetName}_DifferentWidthFlowApertures_{testResultDescription}"); + }).SetName($"{targetName}_DifferentWidthFlowAperturesStandardDeviation_{testResultDescription}"); HeightStructure.ConstructionProperties differentFailureProbabilityStructureWithErosionConstructionProperties = CreateTestHeightStructureConstructionProperties(); differentFailureProbabilityStructureWithErosionConstructionProperties.FailureProbabilityStructureWithErosion = random.NextDouble();