Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Integration.Test/MacroStabilityInwardsFailureMechanismResultViewIntegrationTest.cs =================================================================== diff -u -r5d822eca2d7467c9781a4a3a54d796ac4229e4a3 -rfb3c4216478c0f072cf2f1a94053e81756ced5c7 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Integration.Test/MacroStabilityInwardsFailureMechanismResultViewIntegrationTest.cs (.../MacroStabilityInwardsFailureMechanismResultViewIntegrationTest.cs) (revision 5d822eca2d7467c9781a4a3a54d796ac4229e4a3) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Integration.Test/MacroStabilityInwardsFailureMechanismResultViewIntegrationTest.cs (.../MacroStabilityInwardsFailureMechanismResultViewIntegrationTest.cs) (revision fb3c4216478c0f072cf2f1a94053e81756ced5c7) @@ -47,15 +47,16 @@ using (var form = new Form()) { // Show the view - var failureMechanismResultView = new MacroStabilityInwardsFailureMechanismResultView(); + var assessmentSection = new AssessmentSection(AssessmentSectionComposition.Dike); + + var failureMechanismResultView = new MacroStabilityInwardsFailureMechanismResultView(assessmentSection); form.Controls.Add(failureMechanismResultView); form.Show(); // Obtain the data grid view var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; // Set all necessary data to the view - var assessmentSection = new AssessmentSection(AssessmentSectionComposition.Dike); failureMechanismResultView.Data = assessmentSection.MacroStabilityInwards.SectionResults; failureMechanismResultView.FailureMechanism = assessmentSection.MacroStabilityInwards; @@ -119,19 +120,17 @@ dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].ErrorText); // Execute the first calculation and ensure the data grid view is updated - const double probability = 1.0 / 31846382.0; - calculation1.Output = MacroStabilityInwardsOutputTestFactory.CreateOutput(); - calculation1.SemiProbabilisticOutput = MacroStabilityInwardsSemiProbabilisticOutputTestFactory.CreateOutput(probability); + calculation1.Output = MacroStabilityInwardsOutputTestFactory.CreateRandomOutput(); calculation1.NotifyObservers(); - Assert.AreEqual($"1/{1.0 / calculation1.Probability:N0}", + Assert.AreEqual("1/14", dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].FormattedValue); Assert.IsEmpty(dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].ErrorText); // Add another, nested calculation without surface line and ensure the data grid view is updated when the surface line is set var calculation3 = new MacroStabilityInwardsCalculationScenario(); nestedCalculationGroup.Children.Add(calculation3); nestedCalculationGroup.NotifyObservers(); - Assert.AreEqual($"1/{1.0 / calculation1.Probability:N0}", + Assert.AreEqual("1/14", dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].FormattedValue); Assert.IsEmpty(dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].ErrorText); @@ -165,7 +164,7 @@ // Set contribution again so we have a probability. calculation1.Contribution = (RoundedDouble) 1.0; calculation1.NotifyObservers(); - Assert.AreEqual($"1/{1.0 / calculation1.Probability:N0}", + Assert.AreEqual("1/14", dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].FormattedValue); Assert.IsEmpty(dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].ErrorText);