Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismResultViewTest.cs =================================================================== diff -u -re6671f07e31bef1e5617d8998ce01be60cc648d2 -rb28a844780b613e1901fa82328ba3917f485c729 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismResultViewTest.cs (.../HeightStructuresFailureMechanismResultViewTest.cs) (revision e6671f07e31bef1e5617d8998ce01be60cc648d2) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismResultViewTest.cs (.../HeightStructuresFailureMechanismResultViewTest.cs) (revision b28a844780b613e1901fa82328ba3917f485c729) @@ -29,10 +29,8 @@ using NUnit.Extensions.Forms; using NUnit.Framework; using Ringtoets.Common.Data.FailureMechanism; -using Ringtoets.Common.Data.IllustrationPoints; -using Ringtoets.Common.Data.Probability; using Ringtoets.Common.Data.Structures; -using Ringtoets.Common.Data.TestUtil.IllustrationPoints; +using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Forms.Helpers; using Ringtoets.Common.Forms.Views; using Ringtoets.HeightStructures.Data; @@ -341,20 +339,16 @@ } [Test] - [Combinatorial] - public void GivenSectionResultAndFailedCalculation_ThenLayerTwoAErrorTooltip( - [Values(AssessmentLayerOneState.NotAssessed, AssessmentLayerOneState.NoVerdict)] AssessmentLayerOneState assessmentLayerOneState, - [Values(true, false)] bool withIllustrationPoints) + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NoVerdict)] + public void GivenSectionResultAndFailedCalculation_ThenLayerTwoAErrorTooltip(AssessmentLayerOneState assessmentLayerOneState) { // Given using (HeightStructuresFailureMechanismResultView view = ShowFailureMechanismResultsView()) { - GeneralResult generalResult = withIllustrationPoints - ? new TestGeneralResultFaultTreeIllustrationPoint() - : null; var calculation = new StructuresCalculation { - Output = new StructuresOutput(new ProbabilityAssessmentOutput(1.0, 1.0, double.NaN, 1.0, 1.0), generalResult) + Output = new TestStructuresOutput(double.NaN) }; FailureMechanismSection section = CreateSimpleFailureMechanismSection(); var sectionResult = new HeightStructuresFailureMechanismSectionResult(section) @@ -383,21 +377,17 @@ } [Test] - [Combinatorial] - public void GivenSectionResultAndSuccessfulCalculation_ThenLayerTwoANoError( - [Values(AssessmentLayerOneState.NotAssessed, AssessmentLayerOneState.NoVerdict)] AssessmentLayerOneState assessmentLayerOneState, - [Values(true, false)] bool withIllustrationPoints) + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NoVerdict)] + public void GivenSectionResultAndSuccessfulCalculation_ThenLayerTwoANoError(AssessmentLayerOneState assessmentLayerOneState) { // Given using (HeightStructuresFailureMechanismResultView view = ShowFailureMechanismResultsView()) { const double probability = 0.56789; - GeneralResult generalResult = withIllustrationPoints - ? new TestGeneralResultFaultTreeIllustrationPoint() - : null; var calculation = new StructuresCalculation { - Output = new StructuresOutput(new ProbabilityAssessmentOutput(1.0, 1.0, probability, 1.0, 1.0), generalResult) + Output = new TestStructuresOutput(probability) }; FailureMechanismSection section = CreateSimpleFailureMechanismSection(); var sectionResult = new HeightStructuresFailureMechanismSectionResult(section) @@ -452,26 +442,23 @@ } [Test] - [Combinatorial] + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NoVerdict)] public void GivenSectionResultAndSuccessfulCalculation_WhenChangingCalculationToFailed_ThenLayerTwoAHasError( - [Values(AssessmentLayerOneState.NotAssessed, AssessmentLayerOneState.NoVerdict)] AssessmentLayerOneState assessmentLayerOneState, - [Values(true, false)] bool withIllustrationPoints) + AssessmentLayerOneState assessmentLayerOneState) { // Given using (HeightStructuresFailureMechanismResultView view = ShowFailureMechanismResultsView()) { const double probability = 0.56789; - GeneralResult generalResult = withIllustrationPoints - ? new TestGeneralResultFaultTreeIllustrationPoint() - : null; var successfulCalculation = new StructuresCalculation { - Output = new StructuresOutput(new ProbabilityAssessmentOutput(1.0, 1.0, probability, 1.0, 1.0), generalResult) + Output = new TestStructuresOutput(probability) }; var failedCalculation = new StructuresCalculation { - Output = new StructuresOutput(new ProbabilityAssessmentOutput(1.0, 1.0, double.NaN, 1.0, 1.0), generalResult) + Output = new TestStructuresOutput(double.NaN) }; FailureMechanismSection section = CreateSimpleFailureMechanismSection(); var sectionResult = new HeightStructuresFailureMechanismSectionResult(section) @@ -524,35 +511,17 @@ AssessmentLayerOne = AssessmentLayerOneState.Sufficient, Calculation = new StructuresCalculation { - Output = new StructuresOutput(new ProbabilityAssessmentOutput(1.0, 1.0, double.NaN, 1.0, 1.0), null) + Output = new TestStructuresOutput(double.NaN) } - }, "-").SetName("SectionWithInvalidCalculationOutputWithoutGeneralResult"); + }, "-").SetName("SectionWithInvalidCalculationOutput"); yield return new TestCaseData(new HeightStructuresFailureMechanismSectionResult(section) { AssessmentLayerOne = AssessmentLayerOneState.Sufficient, Calculation = new StructuresCalculation { - Output = new StructuresOutput(new ProbabilityAssessmentOutput(1.0, 1.0, probability, 1.0, 1.0), null) + Output = new TestStructuresOutput(probability) } - }, ProbabilityFormattingHelper.Format(probability)).SetName("SectionWithValidCalculationOutputWithoutGeneralResult"); - yield return new TestCaseData(new HeightStructuresFailureMechanismSectionResult(section) - { - AssessmentLayerOne = AssessmentLayerOneState.Sufficient, - Calculation = new StructuresCalculation - { - Output = new StructuresOutput(new ProbabilityAssessmentOutput(1.0, 1.0, double.NaN, 1.0, 1.0), - new TestGeneralResultFaultTreeIllustrationPoint()) - } - }, "-").SetName("SectionWithInvalidCalculationOutputWithGeneralResult"); - yield return new TestCaseData(new HeightStructuresFailureMechanismSectionResult(section) - { - AssessmentLayerOne = AssessmentLayerOneState.Sufficient, - Calculation = new StructuresCalculation - { - Output = new StructuresOutput(new ProbabilityAssessmentOutput(1.0, 1.0, probability, 1.0, 1.0), - new TestGeneralResultFaultTreeIllustrationPoint()) - } - }, ProbabilityFormattingHelper.Format(probability)).SetName("SectionWithValidCalculationOutputWithGeneralResult"); + }, ProbabilityFormattingHelper.Format(probability)).SetName("SectionWithValidCalculationOutput"); } private static FailureMechanismSection CreateSimpleFailureMechanismSection()