Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/AssemblyResultPerSectionViewTest.cs =================================================================== diff -u -rc86784582a2554ad186869e541c928d3293191a3 -r8f7a19a208f1acd5bd20bd602e4c8627a4f76ac7 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/AssemblyResultPerSectionViewTest.cs (.../AssemblyResultPerSectionViewTest.cs) (revision c86784582a2554ad186869e541c928d3293191a3) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/AssemblyResultPerSectionViewTest.cs (.../AssemblyResultPerSectionViewTest.cs) (revision 8f7a19a208f1acd5bd20bd602e4c8627a4f76ac7) @@ -22,6 +22,7 @@ using System; using System.Collections.Generic; using System.Drawing; +using System.Linq; using System.Windows.Forms; using Core.Common.Controls.DataGrid; using Core.Common.Controls.Views; @@ -31,6 +32,7 @@ using NUnit.Framework; using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators; using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.HeightStructures.Data.TestUtil; using Ringtoets.Integration.Data; using Ringtoets.Integration.Forms.Views; @@ -267,8 +269,8 @@ public void GivenFormWithAssemblyResultPerSectionView_WhenFailureMechanismNotifiesObservers_ThenRefreshButtonEnabledAndWarningSet() { // Given - AssessmentSection assessmentSection = TestDataGenerator.GetAssessmensectionWithAllFailureMechanismSectionsAndResults( - new Random(21).NextEnumValue()); + var random = new Random(21); + var assessmentSection = new AssessmentSection(random.NextEnumValue()); using (new AssemblyToolCalculatorFactoryConfig()) using (AssemblyResultPerSectionView view = ShowAssemblyResultPerSectionView(assessmentSection)) @@ -281,7 +283,8 @@ Assert.IsEmpty(warningProvider.GetError(button)); // When - view.AssessmentSection.StabilityStoneCover.NotifyObservers(); + IEnumerable failureMechanisms = assessmentSection.GetFailureMechanisms(); + failureMechanisms.ElementAt(random.Next(failureMechanisms.Count())).NotifyObservers(); // Then Assert.IsTrue(buttonTester.Properties.Enabled);