Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/GrassCoverErosionOutwardsSectionResultRowTest.cs =================================================================== diff -u -rf72f906a6875250a4378945ce814997ff8aaf1a7 -rbd3056331b8727d6f9758d1f4e5979694d439398 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/GrassCoverErosionOutwardsSectionResultRowTest.cs (.../GrassCoverErosionOutwardsSectionResultRowTest.cs) (revision f72f906a6875250a4378945ce814997ff8aaf1a7) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/GrassCoverErosionOutwardsSectionResultRowTest.cs (.../GrassCoverErosionOutwardsSectionResultRowTest.cs) (revision bd3056331b8727d6f9758d1f4e5979694d439398) @@ -24,6 +24,9 @@ using Core.Common.Base.Data; using Core.Common.Base.Geometry; using NUnit.Framework; + +using Rhino.Mocks; + using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Integration.Data.StandAlone.SectionResults; @@ -68,23 +71,24 @@ public void AssessmentLayerOne_AlwaysOnChange_NotifyObserversOfResultAndResultPropertyChanged(bool newValue) { // Setup + var mocks = new MockRepository(); + var observer = mocks.StrictMock(); + observer.Expect(o => o.UpdateObserver()); + mocks.ReplayAll(); + var section = CreateSection(); var result = new GrassCoverErosionOutwardsFailureMechanismSectionResult(section); + result.Attach(observer); + var row = new GrassCoverErosionOutwardsSectionResultRow(result); - int counter = 0; - using (new Observer(() => counter++) - { - Observable = result - }) - { - // Call - row.AssessmentLayerOne = newValue; + // Call + row.AssessmentLayerOne = newValue; - // Assert - Assert.AreEqual(1, counter); - Assert.AreEqual(newValue, result.AssessmentLayerOne); - } + // Assert + Assert.AreEqual(newValue, result.AssessmentLayerOne); + + mocks.VerifyAll(); } [Test]