Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.cs =================================================================== diff -u -rf5a2d607a5b8053b232c1f3ad572a0acba6a4e3a -rbd3056331b8727d6f9758d1f4e5979694d439398 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.cs (.../GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.cs) (revision f5a2d607a5b8053b232c1f3ad572a0acba6a4e3a) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.cs (.../GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.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.GrassCoverErosionInwards.Data; @@ -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 GrassCoverErosionInwardsFailureMechanismSectionResult(section); + result.Attach(observer); + var row = new GrassCoverErosionInwardsFailureMechanismSectionResultRow(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]