Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil/HeightStructurePermutationHelper.cs =================================================================== diff -u -r51ead7e5a2422ca9f35e65c2ca327fdd9b8d1a48 -r6077633f3df6394b0af989aaa1d252773fdff297 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil/HeightStructurePermutationHelper.cs (.../HeightStructurePermutationHelper.cs) (revision 51ead7e5a2422ca9f35e65c2ca327fdd9b8d1a48) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil/HeightStructurePermutationHelper.cs (.../HeightStructurePermutationHelper.cs) (revision 6077633f3df6394b0af989aaa1d252773fdff297) @@ -38,30 +38,38 @@ /// Returns a collection of modified entities, which all differ /// except for their id. /// + /// The name of the test method to use the test case source for. + /// A description of the result of the test to use the test + /// case source for. + /// The collection of test case data. /// [TestCaseSource(typeof(HeightStructurePermutationHelper), nameof(HeightStructurePermutationHelper.DifferentHeightStructureWithSameId))] - public static IEnumerable DifferentHeightStructuresWithSameId() + public static IEnumerable DifferentHeightStructuresWithSameId(string testMethodName, string testResultDescription) { var referenceStructure = new TestHeightStructure(); var testCaseData = new List { - new TestCaseData(new TestHeightStructure(referenceStructure.Id, "Different Name")) - .SetName("Different Name"), + new TestCaseData(new TestHeightStructure(referenceStructure.Id, "Different name")) + .SetName($"{testMethodName}_DifferentName_{testResultDescription}"), new TestCaseData(new TestHeightStructure(new Point2D(1, 1), referenceStructure.Id)) - .SetName("Different Location") + .SetName($"{testMethodName}_DifferentLocation_{testResultDescription}") }; - testCaseData.AddRange(DifferentHeightStructuresWithSameIdNameAndLocation()); + testCaseData.AddRange(DifferentHeightStructuresWithSameIdNameAndLocation(testMethodName, testResultDescription)); return testCaseData; } /// - /// Returns a collection of modified entities, which all - /// differ except for their id, name and location. + /// Returns a collection of modified entities, which all differ + /// except for their id, name and location. /// + /// The name of the test method to use the test case source for. + /// A description of the result of the test to use the test + /// case source for. + /// The collection of test case data. /// [TestCaseSource(typeof(HeightStructurePermutationHelper), nameof(HeightStructurePermutationHelper.DifferentHeightStructureWithSameIdLocationAndName))] - public static IEnumerable DifferentHeightStructuresWithSameIdNameAndLocation() + public static IEnumerable DifferentHeightStructuresWithSameIdNameAndLocation(string testMethodName, string testResultDescription) { var random = new Random(532); var referenceStructure = new TestHeightStructure(); @@ -74,15 +82,15 @@ Shift = random.NextRoundedDouble(), StandardDeviation = random.NextRoundedDouble() } - }).SetName("Different AllowedLevelIncreaseStorage"); + }).SetName($"{testMethodName}_DifferentAllowedLevelIncreaseStorage_{testResultDescription}"); yield return new TestCaseData(new TestHeightStructure { CriticalOvertoppingDischarge = { Mean = (RoundedDouble) random.Next(), CoefficientOfVariation = random.NextRoundedDouble() } - }).SetName("Different CriticalOvertoppingDischarge"); + }).SetName($"{testMethodName}_DifferentCriticalOvertoppingDischarge_{testResultDescription}"); yield return new TestCaseData(new TestHeightStructure { FlowWidthAtBottomProtection = @@ -91,31 +99,31 @@ Shift = random.NextRoundedDouble(), StandardDeviation = random.NextRoundedDouble() } - }).SetName("Different FlowWidthAtBottomProtection"); + }).SetName($"{testMethodName}_DifferentFlowWidthAtBottomProtection_{testResultDescription}"); yield return new TestCaseData(new TestHeightStructure { LevelCrestStructure = { Mean = (RoundedDouble) random.Next(), StandardDeviation = random.NextRoundedDouble() } - }).SetName("Different LevelCrestStructure"); + }).SetName($"{testMethodName}_DifferentLevelCrestStructure_{testResultDescription}"); yield return new TestCaseData(new TestHeightStructure { StorageStructureArea = { Mean = (RoundedDouble) random.Next(), CoefficientOfVariation = random.NextRoundedDouble() } - }).SetName("Different StorageStructureArea"); + }).SetName($"{testMethodName}_DifferentStorageStructureArea_{testResultDescription}"); yield return new TestCaseData(new TestHeightStructure { WidthFlowApertures = { Mean = (RoundedDouble) random.Next(), StandardDeviation = random.NextRoundedDouble() } - }).SetName("Different WidthFlowApertures"); + }).SetName($"{testMethodName}_DifferentWidthFlowApertures_{testResultDescription}"); yield return new TestCaseData(new HeightStructure(new HeightStructure.ConstructionProperties { @@ -156,7 +164,7 @@ }, FailureProbabilityStructureWithErosion = random.NextRoundedDouble(), StructureNormalOrientation = referenceStructure.StructureNormalOrientation - })).SetName("Different FailureProbabilityStructureWithErosion"); + })).SetName($"{testMethodName}_DifferentFailureProbabilityStructureWithErosion_{testResultDescription}"); yield return new TestCaseData(new HeightStructure(new HeightStructure.ConstructionProperties { Name = referenceStructure.Name, @@ -196,7 +204,7 @@ }, FailureProbabilityStructureWithErosion = referenceStructure.FailureProbabilityStructureWithErosion, StructureNormalOrientation = random.NextRoundedDouble() - })).SetName("Different StructureNormalOrientation"); + })).SetName($"{testMethodName}_DifferentStructureNormalOrientation_{testResultDescription}"); } } } \ No newline at end of file